Repository navigation
chore(gate): drive the dead-export guard with knip, drop ts-prune - #1427
Merged
TheGreatAxios merged 4 commits intoOct 15, 2026
Merged
TheGreatAxios merged 4 commits into
TheGreatAxios merged 4 commits into
Conversation
ts-prune has been unmaintained since 2022 and pulls ts-morph@13 plus a hand-rolled output parser that false-positived on satisfies/boolean/ Record narrowing and could not resolve path-alias fan-in. The guard unions knip's default scan with a production agent-workspace scan (knip.agents.json; --production ignores test-file consumers so the director surface stays enforced); parsing is fail-closed and config carries no spawn args, so the tsPruneArgs race is gone. Allowlist semantics are unchanged. Entries go 70 to 83: 42 superseded ts-prune artifacts removed; tax entries added for 22 consumer-less exports plus 4 unreachable files (owner-reason blocks, pending cleanup lanes) and the 29 director-surface names consumed only by workspace package tests. Deleting them belongs to the cleanup lanes.
Contributor
|
Superseded by the comment below. |
Contributor
|
Superseded by the comment below. |
Contributor
|
Triage: Fail @TheGreatAxios, please address the following:
|
TheGreatAxios
changed the base branch from
cl-10652-arktype-228-generate-inputschema-via-tojsonschema-delete-ha
to
main
October 15, 2026 20:07
…doned-ts-prune-with-knip-in-dead-export # Conflicts: # bun.lock
The allowlist now names only the agent-package contract. Exports with no production importer are removed, and vendor plus path-loaded eval fixtures stay outside the knip scan.
Discover agent packages from agents/ instead of the allowlist, so a new package whose entry is imported only by its own test fails the dead-export guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ts-prune0.10.3 (+ itsts-morph@13dependency tree) with maintainedknip6.41.0 in the dead-export gate. The guard now unions two scans: knip's default scan (ts-prune parity scope) and a--productionscan over the tenagents/<id>workspaces (knip.agents.json) —--productionignores test-file consumers, which restores enforcement of the director-extract bar's six-name surface that the default scan alone lost (workspace package tests count as consumers there).tsPruneArgsinjection vector is gone), coverage floor kept, live parity tests pin both scans' semantics (38 tests), a real-subprocess negative test proves the fail path.Verification
bun run checkexit 0: lint/typecheck/build/projects-dir guard green; guarded suite 8945 pass / 0 fail; guard output deterministic across runs:361 consumer-less exports or unreachable files, 361 allowlisted, 0 violations, 1323 scanned files (floor 1240).directorconsumed viaDIRECTOR_REGISTRYnot reported; the production pass resurfacestools/systemPrompt/configfor workspace packages).agents/<id>/src/index.tsis consumed only by that package's contract test — the AGENTS.md production-importer bar is surfaced by the gate again.Fixes CL-10655