ci: reject unused files and dependencies with Knip#9962

merged1
t3code/knip-prune-root-dependencies
t3code/knip-ci
openedSep 5, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

Unused files and dependency declarations can otherwise accumulate again after this cleanup.

Run knip:check in the existing CI Check job. It enforces zero unused files and dependencies, including development dependencies. Add concise workspace and production-audit instructions to the development runbook.

The export/type backlog remains visible through the full audit but is not yet a CI gate. This does not introduce an issue-count baseline or suppress the remaining exports.

Verification: the exact CI command passes. Temporarily adding an orphan TypeScript file made it exit 1 and identify that file; removing the probe restored a passing result. Formatting and diff checks passed. No runtime or visual behavior changed, so screenshots do not apply.

Leave this stack unmerged for maintainer review.

Model: gpt-6 astra. Harness: Codex in T3 Code.

Closes discussions

Added 1 commit

  • ci: reject unused files and dependencies with Knip1f344a0
Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—13.5 KiB—15.1 KiB✅
CodexThread snapshot wire—7.0 KiB—7.3 KiB✅
CodexLive turn WebSocket wire—6.5 KiB—7.8 KiB✅
CodexLive turn WebSocket decoded—57.0 KiB—66.4 KiB✅
CodexLive turn messages—8—21✅
ClaudeTotal thread wire—13.6 KiB—15.1 KiB✅
ClaudeThread snapshot wire—7.0 KiB—7.3 KiB✅
ClaudeLive turn WebSocket wire—6.5 KiB—7.8 KiB✅
ClaudeLive turn WebSocket decoded—57.8 KiB—66.4 KiB✅
ClaudeLive turn messages—9—21✅

Baseline: unavailable · PR result: 1f344a0 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Approvability

Verdict: Approved at 1f344a0

Macroscope's review found this PR approvable — This PR only adds an existing Knip check to CI and documents how to run it locally; it does not modify product runtime behavior, defaults, deployment, or sensitive areas. The change is a small, isolated CI enforcement update.

You can add or adjust custom eligibility rules. Learn more.