Skip to content

chore: dead-code ratchet is failing on main (knip count 81 > baseline 78) #607

Description

@isadeks

Summary

scripts/check-deadcode-ratchet.mjs fails on main today, independent of any open PR: the knip issue count is 81 vs the committed baseline of 78 in knip-baseline.json. Because the same ratchet runs inside mise run build (which the repo mandates green before commit), every contributor's local build is currently red on main.

Discovered while fixing the dead-export nit on #503 — the count is +3 over baseline from exports/deps that drifted unused via other merges, not from any single PR. Stack A's #503 removes its own contribution (82→81) but can't get the ratchet back to 78 on its own.

The 3 categories over baseline

  • Unused devDependencies (3): @types/pdf-parse (cdk), markdown-link-check (docs), @astrojs/check (root).
  • Plus drifted unused exports/types (run yarn knip for the current list; several pre-date this and are already in the count).

Options

  1. Remove the genuinely-dead items and lower the baseline in the same PR (the file's own guidance — "when the count drops, lower this value to lock in the gain"), or
  2. Re-baseline to the current honest count if the findings are intentional (suppress per-category false positives in knip.json, not the baseline).

Acceptance criteria

  • node scripts/check-deadcode-ratchet.mjs exits 0 on main.
  • knip-baseline.json reflects the true post-cleanup count.

Metadata

Metadata

Labels

approvedWhen an issue has been approved and readybugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions