Skip to content

test(deadcode): add keeper tests for the dead-export guard - #1061

Merged
TheGreatAxios merged 2 commits into
cl-7971-tighten-dead-export-guard-precision-and-scopefrom
cl-7983-add-guard-keeper-tests
Sep 15, 2026
Merged

TheGreatAxios merged 2 commits into
cl-7971-tighten-dead-export-guard-precision-and-scopefrom
cl-7983-add-guard-keeper-tests

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • The dead-export guard fails on a temp probe export with a nonzero exit that names the export
  • The four deleted barrel paths stay deleted and unimported

Verification

  • bun run check passes: lint, typecheck, check:dead-exports, build, and the guarded suite (7398 pass, 0 fail)
  • bun test scripts/check-dead-exports.test.ts passes: 10 pass, 0 fail

Fixes CL-7983

@linear-code

linear-code Bot commented Sep 14, 2026

Copy link
Copy Markdown

CL-7983

* fix(deadcode): harden dead-export guard against silent weakening

* fix(deadcode): pin guard scan invocation to exact args

parseGuardConfig required only that tsPruneArgs contain the -p tsconfig pair, so narrowing flags like -i/--ignore shrank the scan while the tsc file-count floor stayed flat. Require exact ["-p", "<tsconfig>"] equality so the pin actually pins. Also reword ownership headers to match presence-only enforcement.
@TheGreatAxios
TheGreatAxios merged commit cc8f291 into cl-7971-tighten-dead-export-guard-precision-and-scope Sep 15, 2026
13 checks passed
TheGreatAxios added a commit that referenced this pull request Sep 15, 2026
…#1046)

* fix(deadcode): scope dead-export exemptions and warn on stale entries

Whole-file exemptions hide new dead exports in the covered modules, so the guard can only see what it already knows. Exact-name entries keep the exemption set precise, and stale-entry warnings keep exemptions from outliving the code they cover.

* test(deadcode): add keeper tests for the dead-export guard (#1061)

* test(deadcode): add keeper tests for the dead-export guard

* fix(deadcode): harden dead-export guard against silent weakening (#1065)

* fix(deadcode): harden dead-export guard against silent weakening

* fix(deadcode): pin guard scan invocation to exact args

parseGuardConfig required only that tsPruneArgs contain the -p tsconfig pair, so narrowing flags like -i/--ignore shrank the scan while the tsc file-count floor stayed flat. Require exact ["-p", "<tsconfig>"] equality so the pin actually pins. Also reword ownership headers to match presence-only enforcement.
TheGreatAxios added a commit that referenced this pull request Sep 15, 2026
* chore(deadcode): purge dead exports and guard the count

Triage the ts-prune report; allowlist deliberate-public-surface exports with reasons. Delete consumer-less exports including fully-dead barrel files. Wire the dead-export check into the package check script and CI so the count cannot silently regrow.

* fix(deadcode): scope dead-export exemptions and warn on stale entries (#1046)

* fix(deadcode): scope dead-export exemptions and warn on stale entries

Whole-file exemptions hide new dead exports in the covered modules, so the guard can only see what it already knows. Exact-name entries keep the exemption set precise, and stale-entry warnings keep exemptions from outliving the code they cover.

* test(deadcode): add keeper tests for the dead-export guard (#1061)

* test(deadcode): add keeper tests for the dead-export guard

* fix(deadcode): harden dead-export guard against silent weakening (#1065)

* fix(deadcode): harden dead-export guard against silent weakening

* fix(deadcode): pin guard scan invocation to exact args

parseGuardConfig required only that tsPruneArgs contain the -p tsconfig pair, so narrowing flags like -i/--ignore shrank the scan while the tsc file-count floor stayed flat. Require exact ["-p", "<tsconfig>"] equality so the pin actually pins. Also reword ownership headers to match presence-only enforcement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant