Repository navigation
chore(quality): bank completed file-size shrinks (shrink-only --update on current tip) - #8585
Merged
diegosouzapw merged 1 commit intoJul 27, 2026
Conversation
This was referenced Jul 25, 2026
MumuTW
added a commit
to MumuTW/OmniRoute
that referenced
this pull request
Jul 26, 2026
…he cap `check:file-size --update` could only ever delete an entry from inside the improvement branch (`loc < frozen[file]`). An entry sitting at EXACTLY its frozen value while already within the 800-line new-file cap therefore never qualified for removal, however far under the cap it was — it stayed in the baseline permanently. Three real cases on release/v3.8.49 @ 4053e23 survived a full `--update` run for this reason: src/app/(dashboard)/dashboard/providers/[id]/ProviderDetailPageClient.tsx 798 src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderModels.ts 155 src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderSettings.ts 264 `evaluateFileSizes` now reports a third bucket, `redundant` — in `frozen`, not a violation, not an improvement, and `loc <= cap` — and the `--update` path deletes those entries alongside the shrinks. Same treatment for the testFrozen/testCap half, which had the identical gap. The non-update gate path is untouched: `redundant` entries were already passing and still pass, so no PR's result changes. Only `--update` behaves differently. TDD: 7 new failing tests first (16 total in tests/unit/check-file-size.test.ts, 9 pre-existing all still passing), then the fix, then 16/16 green. End-to-end on the real baseline, `--update` now reports "74 arquivo(s) encolheram, 3 entrada(s) redundante(s) removida(s)" and removes 17 entries instead of 14, with 0 caps raised. That baseline diff is deliberately NOT in this commit — banking the data belongs to cheaper-inference#8585. Refs cheaper-inference#8584
MumuTW
force-pushed
the
chore/file-size-bank-completed-shrinks
branch
from
July 26, 2026 09:51
3052acc to
8dc5916
Compare
MumuTW
force-pushed
the
chore/file-size-bank-completed-shrinks
branch
from
July 27, 2026 04:42
d7b6ee0 to
a482c39
Compare
MumuTW
force-pushed
the
chore/file-size-bank-completed-shrinks
branch
from
July 27, 2026 16:36
a482c39 to
f1f5a44
Compare
Regenerate file-size-baseline.json with shrink-only `--update` measured on the current tip (5f365ba), after cheaper-inference#8741 (--update removes at-cap entries) and cheaper-inference#8767 (OWNER-APPROVED temporary cap/testCap 800->1000 for the v3.8.50-.54 PREPARE phase) both landed. frozen 186 -> 120 entries (75 shrank, 66 removed as redundant) testFrozen 58 -> 43 entries (19 shrank, 15 removed as redundant) Shrink-only, verified against the pre-rebase baseline: no entry grew, no entry was added, every removed entry measures <= cap, and `cap`/`testCap` stay at the 1000 that cheaper-inference#8767 set. All `_rebaseline_*` audit notes are preserved verbatim, including both cheaper-inference#8767 relax entries. The earlier SKILL.md sync and the `--update` removal fix are dropped from this branch — both landed upstream via cheaper-inference#8741.
MumuTW
force-pushed
the
chore/file-size-bank-completed-shrinks
branch
from
July 27, 2026 16:56
f1f5a44 to
dd7f7cb
Compare
diegosouzapw
merged commit Jul 27, 2026
41fe8dc
into
cheaper-inference:release/v3.8.49
15 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Jul 27, 2026
…stryker drift
file-size: nine frozen entries could not absorb the combined result of the
31-PR train. Two distinct causes, kept apart in the baseline note on purpose:
(1) GENUINE irreducible growth at existing chokepoints —
providerLimits/auth (#8632), rateLimitManager (#8616),
models-catalog-route.test (#8610).
(2) COLLISION with #8585, which banked shrinks measured on the pre-train
release tip while 30 sibling PRs in the SAME train grew those files
again — chat/accountFallback (#8628), chatCore (#8613),
videoGeneration (#8581), imageGeneration.
Ceilings re-pinned to the post-merge tip. #8612 (also in this train) automates
shrink-banking so this self-inflicted drift stops recurring.
stryker: three covering unit tests were missing from tap.testFiles —
isLocalStreamLifecycleError-abort-shape (circuitBreaker.ts, a shared base-red
that was reddening Fast Quality Gates on every open PR),
noauth-autocombo-lockout-7623 (accountFallback.ts) and
kimi-quota-reset-recovery (auth.ts), the latter two landed with this train.
This was referenced Jul 28, 2026
Merged
This was referenced Jul 28, 2026
[v3.8.50] fix(api): serve last /v1/models snapshot instead of blocking on cold rebuild (#8697)
#8801
Closed
[v3.8.50] fix(open-sse): filter non-numeric values in comboTargetLimits before min calculation
#8774
Merged
Merged
Merged
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…per-inference#8585) Regenerate file-size-baseline.json with shrink-only `--update` measured on the current tip (3eef45f), after cheaper-inference#8741 (--update removes at-cap entries) and cheaper-inference#8767 (OWNER-APPROVED temporary cap/testCap 800->1000 for the v3.8.50-.54 PREPARE phase) both landed. frozen 186 -> 120 entries (75 shrank, 66 removed as redundant) testFrozen 58 -> 43 entries (19 shrank, 15 removed as redundant) Shrink-only, verified against the pre-rebase baseline: no entry grew, no entry was added, every removed entry measures <= cap, and `cap`/`testCap` stay at the 1000 that cheaper-inference#8767 set. All `_rebaseline_*` audit notes are preserved verbatim, including both cheaper-inference#8767 relax entries. The earlier SKILL.md sync and the `--update` removal fix are dropped from this branch — both landed upstream via cheaper-inference#8741.
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…stryker drift
file-size: nine frozen entries could not absorb the combined result of the
31-PR train. Two distinct causes, kept apart in the baseline note on purpose:
(1) GENUINE irreducible growth at existing chokepoints —
providerLimits/auth (cheaper-inference#8632), rateLimitManager (cheaper-inference#8616),
models-catalog-route.test (cheaper-inference#8610).
(2) COLLISION with cheaper-inference#8585, which banked shrinks measured on the pre-train
release tip while 30 sibling PRs in the SAME train grew those files
again — chat/accountFallback (cheaper-inference#8628), chatCore (cheaper-inference#8613),
videoGeneration (cheaper-inference#8581), imageGeneration.
Ceilings re-pinned to the post-merge tip. cheaper-inference#8612 (also in this train) automates
shrink-banking so this self-inflicted drift stops recurring.
stryker: three covering unit tests were missing from tap.testFiles —
isLocalStreamLifecycleError-abort-shape (circuitBreaker.ts, a shared base-red
that was reddening Fast Quality Gates on every open PR),
noauth-autocombo-lockout-7623 (accountFallback.ts) and
kimi-quota-reset-recovery (auth.ts), the latter two landed with this train.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…per-inference#8585) Regenerate file-size-baseline.json with shrink-only `--update` measured on the current tip (b78b9b3), after cheaper-inference#8741 (--update removes at-cap entries) and cheaper-inference#8767 (OWNER-APPROVED temporary cap/testCap 800->1000 for the v3.8.50-.54 PREPARE phase) both landed. frozen 186 -> 120 entries (75 shrank, 66 removed as redundant) testFrozen 58 -> 43 entries (19 shrank, 15 removed as redundant) Shrink-only, verified against the pre-rebase baseline: no entry grew, no entry was added, every removed entry measures <= cap, and `cap`/`testCap` stay at the 1000 that cheaper-inference#8767 set. All `_rebaseline_*` audit notes are preserved verbatim, including both cheaper-inference#8767 relax entries. The earlier SKILL.md sync and the `--update` removal fix are dropped from this branch — both landed upstream via cheaper-inference#8741.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…stryker drift
file-size: nine frozen entries could not absorb the combined result of the
31-PR train. Two distinct causes, kept apart in the baseline note on purpose:
(1) GENUINE irreducible growth at existing chokepoints —
providerLimits/auth (cheaper-inference#8632), rateLimitManager (cheaper-inference#8616),
models-catalog-route.test (cheaper-inference#8610).
(2) COLLISION with cheaper-inference#8585, which banked shrinks measured on the pre-train
release tip while 30 sibling PRs in the SAME train grew those files
again — chat/accountFallback (cheaper-inference#8628), chatCore (cheaper-inference#8613),
videoGeneration (cheaper-inference#8581), imageGeneration.
Ceilings re-pinned to the post-merge tip. cheaper-inference#8612 (also in this train) automates
shrink-banking so this self-inflicted drift stops recurring.
stryker: three covering unit tests were missing from tap.testFiles —
isLocalStreamLifecycleError-abort-shape (circuitBreaker.ts, a shared base-red
that was reddening Fast Quality Gates on every open PR),
noauth-autocombo-lockout-7623 (accountFallback.ts) and
kimi-quota-reset-recovery (auth.ts), the latter two landed with this train.
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.
Implements proposal 1 of #8584. One JSON file, no product code, no test changes.
What this does
Runs
node scripts/check/check-file-size.mjs --update— the shrink-only ratchet path — apparently for the first time.capandtestCapuntouched. All 55_rebaseline_*documentation note keys preserved. Verified by a key-by-key diff of the pre/post JSON rather than by reading the diff, so "zero raised" is a measured claim.The gate is green before and after. This is a pure tightening, not a base-red repair — nothing here unblocks anything, it just stops the ceiling from being a one-way valve.
Why it was needed
--updateis shrink-only by construction (if (loc <= cap) delete frozen[file]; else frozen[file] = loc), so it can't be abused. But grepping.github/workflows/for--updatefinds onlywiki-sync.yml(unrelated) andci.yml:221, which runscheck-quality-ratchet.mjs --require-tighten— a different script against a different metric. Neithercheck:file-size --updatenorcheck:complexity-ratchets --updateis invoked anywhere in CI.The result is an asymmetry: raising a cap is a manual ten-second edit and the fastest way to unblock a PR; lowering requires a command that is nobody's job. So caps outlive the code that earned them:
src/shared/validation/schemas.tssrc/shared/constants/pricing.tsopen-sse/config/providerRegistry.tssrc/shared/constants/providers.tssrc/shared/constants/sidebarVisibility.tssrc/lib/evals/evalRunner.tsA 19-line file carrying a 2,523-line cap isn't a gate on that file — it's permission to add 2,504 lines with the gate silent. Every one of those numbers is a decomposition that succeeded and whose gain was never banked.
The part worth reading twice
Three of the entries tightened here had already been decomposed once, and the gain was never recorded:
src/lib/providers/validation.tsopen-sse/services/usage.tsopen-sse/services/tokenRefresh.tsThose are the same three files being decomposed a second time right now in #8546, #8545 and #8547. Round one took them from ~4.5k/3.5k/2.2k down to ~1k and left the caps at the round-zero high-water mark, so the ledger reflects none of it. That is the clearest illustration I found of why the baseline reads as pure inflation: the shrinks happened, they were simply never written down.
Largest single tightenings in this diff, for the record:
For comparison,
complexity-baseline.jsonrecords ~37 rebaseline notes since 2026-06-13 with exactly one decrease in it (−1 line). This commit moves 91 entries down.Known residue, deliberately not fixed here
Three entries sit at exactly their frozen value and far below the 800 cap —
ProviderDetailPageClient.tsx798,useProviderModels.ts155,useProviderSettings.ts264. They cannot leave the baseline, because--updateonly reaches the delete branch when the file also shrank in that same run (loc < frozen); an entry already equal to its cap never qualifies. That is a one-line change to the gate's logic and doesn't belong in a mechanical banking commit, so it's noted in #8584 instead.webProvidersA.tsis a legitimate keep: it shrank 809 → 801 but 801 is still above the 800 cap, so it stays frozen at 801, which is correct.Scope
Only
check:file-size --update. I did not runcheck:complexity-ratchets --update, because complexity is currently above its baseline on this tip (2169 vs 2130) and the shrink-only path would refuse to write — that one is #8580's problem, not this PR's.Verification
npm run check:file-size— green before and after (168 arquivos congeladosafter, was 182 keys / 127 real files before; now 113 real files + the 55 notes).Refs #8584