chore(tooling): prune 7 stale file-size exceptions that were hiding real warnings - #438
Merged
Merged
Conversation
…eal warnings
`EXCEPTIONS` is consulted BEFORE any size comparison:
if (EXCEPTIONS[normalized]) continue;
so an entry suppresses the WARN tier as well as the ERROR tier. An entry for a
file that is no longer over the *error* threshold is therefore not a no-op — it
silently hides a legitimate warning. Seven entries were in that state. Line
counts verified with the gate's own countLines(), not wc.
Removed (all verified UNDER their error threshold, so the gate still exits 0):
src-tauri/src/analysis_rerank.rs 866 / 1000 (warn 700)
Entry was self-described TEMPORARY, owed a split back to #423. #430
(02c105d) DID the split (1032 -> 866) but only touched the two .rs
files — it never removed the exception it was owed.
src/components/preemption/PreemptionCard.tsx 388 / 500 (warn 350)
Justification claimed "9 lines over". It is 38 over WARN and 112 UNDER
ERROR — the stated reason was false.
src/components/enterprise/SsoConfigPanel.tsx 355 / 500 (warn 350)
Justification claimed "5 lines over". 5 over WARN, 145 under ERROR.
src-tauri/src/scoring/pipeline_tests.rs FILE DELETED in #421
Same class as the five dead entries #421 already swept; it missed this
one. (src-tauri/src/briefing_pipeline_tests.rs is a different file and
was never in the map.)
src-tauri/src/settings/types.rs 908 / 1000 (warn 700)
src/store/slice-types.ts 446 / 500 (warn 300)
src-tauri/src/sources/adapter_resilience_tests.rs 1802 / 2000 (test file)
Test file, so warn-exempt — removing it changes no output today, but it
left the 2000-line hard limit silently unenforceable on a file that is
actively grown.
Kept: every other entry is genuinely over its ERROR threshold and is doing its
job. src/types/i18n-resources.d.ts is kept despite not resolving on disk — it is
gitignored and generated by `pnpm run i18n:types`, which `validate:all` runs
before this gate (already documented inline).
Gate: 42 warnings / exit 0 before, 47 warnings / exit 0 after. The 5 new
warnings are exactly the suppressed files now reporting honestly. No file
crosses an ERROR threshold, so the pre-commit gate cannot block the fleet — the
failure mode that took every developer offline on 2026-08-14.
Note: 4 of the 7 (pipeline_tests.rs, settings/types.rs, slice-types.ts,
adapter_resilience_tests.rs) were found by auditing all 38 entries rather than
being named up front; each is an independent line and can be dropped in review
without affecting the others.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUeKTKwNmdow8yUk3q8RB2
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.
Why
EXCEPTIONSinscripts/check-file-sizes.cjsis consulted before any size comparison:So an entry suppresses the warn tier as well as the error tier. An entry for a file that is no longer over the error threshold is not a harmless leftover — it silently hides a legitimate warning, and it disarms the hard limit on a file that may keep growing.
Seven entries were in that state. All line counts below were measured with the gate's own
countLines(), notwc.Removed
src-tauri/src/analysis_rerank.rsTEMPORARY, owed a split back to #423. #430 (02c105d9) did the split (1032 → 866) but only touched the two.rsfiles — it never removed the exception it was owed.src/components/preemption/PreemptionCard.tsxsrc/components/enterprise/SsoConfigPanel.tsxsrc-tauri/src/scoring/pipeline_tests.rssrc-tauri/src/settings/types.rssrc/store/slice-types.tssrc-tauri/src/sources/adapter_resilience_tests.rsKept
Every other entry is genuinely over its error threshold and is doing its job — those were left alone.
One deliberate keep that looks like a miss:
src/types/i18n-resources.d.tsdoes not resolve on disk, but it is gitignored and generated bypnpm run i18n:types, whichvalidate:allruns before this gate. That is already documented inline; the entry stays.src-tauri/src/briefing_pipeline_tests.rsis a different file from the deletedscoring/pipeline_tests.rsand was never in the map.Verification
The 5 new warnings are exactly the suppressed files now reporting honestly (
settings/types.rs908,analysis_rerank.rs866,slice-types.ts446,PreemptionCard.tsx388,SsoConfigPanel.tsx355).No file crosses an ERROR threshold, so the pre-commit gate cannot block the fleet — the failure mode that took every developer offline on 2026-08-14 (#423 → #430). Every consumer of this script (
.husky/pre-commit, therepo-guardsCI job,build-guardian.cjs,compound-quality-check.cjs,sentinel-scan.cjs) keys on exit code orERRORlines only, so warnings are safe everywhere.Also verified: after this change every remaining entry passes the "file exists and is over its error threshold" test, except the documented generated-file case above.
Scope
scripts/check-file-sizes.cjsonly — 12 deletions, no source file touched, nothing split.4 of the 7 (
pipeline_tests.rs,settings/types.rs,slice-types.ts,adapter_resilience_tests.rs) were found by auditing all 38 entries rather than being named up front. Each is an independent line and can be dropped in review without affecting the others.Hook note
This worktree has no
node_modules, so.husky/_does not exist andcore.hooksPathresolves to nothing — git silently ran no hooks.--no-verifywas not used. The gates were run manually instead, all green:check-file-sizes·check-doc-location·check-llm-gate-honesty·check-vanity-metrics·check-release-channel·i18n-guard·validate-boundary-calls·compound-quality-check· push-rangescan-secrets --diff-added·private-asset-guardNot runnable here (no
node_modules):tsc, ESLint, and the frontend suite. This change is a Node tooling script with no TypeScript or frontend surface; CI's required gates cover them.🤖 Generated with Claude Code
https://claude.ai/code/session_01AUeKTKwNmdow8yUk3q8RB2