Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(scripts): check:changed no longer skips knip after a removed import #22784

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/22784/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

vp run check:changed from #22767 could pass locally while CI failed. If you removed the last import of a helper, it skipped knip, and CI then failed on the unused export. It also skipped CI's generated GraphQL checks, crashed with a stack trace on a bad base ref, and claimed closer CI parity than it has.

Fix

  • Knip runs for every code or manifest change. The export-line heuristic is gone. This costs about 35 s when code changes.
  • A missing or bad base ref prints one line and exits 1. A ref argument now compares against the merge base with that ref, like the default.
  • The two generate --check commands from CI's Lint job run when apps/server or packages/source-control-github changes. Each takes under 1 s.
  • The script header, AGENTS.md, and docs/operations/development.md now say "CI's fast checks" and note that CI still runs the full test suites. The summary lists the full test suites among the jobs that run only in CI.

Proof

Each sample was an uncommitted edit, checked against HEAD.

CaseBeforeAfter
Remove the last import of SAFE_IMAGE_FILE_EXTENSIONS in attachmentStore.tspass, knip skipped (10.8 s)knip fails: Unused exports (1) SAFE_IMAGE_FILE_EXTENSIONS (41.8 s)
Add a field to pullRequestBatches.graphql without regeneratingnot checkedgraphql fails: "1 generated file is out of date" (9.4 s)
check:changed nonexistent-ref-xyzNode stack traceone line: check:changed: no merge base with nonexistent-ref-xyz., exit 1
No changes (HEAD)no-opno-op, exit 0
This branchformat, lint, knip, and typecheck pass (37 s)

These findings came from two delegated reviews of #22767 after it merged.


Created with Claude Opus 5.5 in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

    1. Approvability

      Verdict: Approved at 0954c1a

      Macroscope's review found this PR approvable — This updates documentation and a development-only changed-file verification script to catch Knip and generated GraphQL issues more reliably. It does not alter product runtime behavior, CI configuration, defaults, or static-analysis suppression.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.