test(sse): repair two base-red gates on release/v3.8.49 - #8490
diegosouzapw merged 4 commits into
Conversation
`release/v3.8.49` is red at its own HEAD (36f8fd1) — `Quality Gates` and `Release-Green (continuous)` both fail — so every PR opened against it inherits four failing checks regardless of content. Two of those causes had no owner: diegosouzapw#8480/diegosouzapw#8481/diegosouzapw#8482 cover the compression ladder, the antigravity catalog, and the resilience/translator regressions respectively, none of them these. 1. `chatcore-client-usage-buffer.test.ts` — 5/5 failing. diegosouzapw#8331/diegosouzapw#8356 (e871978) inserted an `options` parameter between `clientResponseFormat` and `deps` on `applyClientUsageBuffer()`. The five call sites here still passed `deps` in the fourth position, so the injected spies landed in the `options` slot and the real implementations ran — every `calls.*.length` assertion saw 0. The `Parameters<typeof applyClientUsageBuffer>[3]` cast in `makeDeps()` masked the type error, which is why it reached the branch. Call sites updated to `(resp, body, format, {}, deps)` and the cast repointed to `[4]`. Two cases added for the parameter that caused this, since nothing at this layer exercised it: `preserveContextBudgetInVisibleUsage` re-folds `context_budget_*` into the visible fields for the Claude-Code path, and the default path keeps the real unbuffered diegosouzapw#8331 numbers. 2. `claude-to-openai-think-close-5123.test.ts` — 4 unsuppressed `@typescript-eslint/no-explicit-any` errors, failing `npm run lint`. Its suppression entry allows `count: 2` but the file had grown to four `(chunk: any)` callbacks. Rather than raise the frozen count, the cause is fixed: `collectChunks()` returns `StreamChunk[]` instead of `unknown[]`, narrowing once at the boundary so all four callbacks need no annotation. The suppression entry is then stale and removed, which ratchets the file to zero. Test-only plus one allowlist deletion; no production code. Verified on a clean worktree of the base commit: `npm run lint` clean (was 4 errors), `chatcore-client-usage-buffer` 7/7 (was 0/5), `claude-to-openai-think-close-5123` 3/3.
….8.49 `check:file-size` fails on release/v3.8.49 at its own HEAD (36f8fd1), which is what turns `Fast Quality Gates` red for every PR against this base: tokenHealthCheck.ts 832 -> 841 chat.ts 1865 -> 1866 auth.ts 2475 -> 2486 accountFallback.ts 1941 -> 1960 combo.ts 3630 -> 3642 None of these files is touched by this PR. The growth was inherited from already merged PRs that did not bump their entries, so there is no offending branch left to fix — the same situation the baseline already records under `_rebaseline_2026_07_02_5798_release_green`, and the procedure it documents is to raise the frozen values with a justification note. Raised to the current base values only. The files stay frozen and cannot grow further; an in-flight PR that adds lines to them bumps its own entry as usual (diegosouzapw#8482 touches accountFallback.ts and combo.ts and will need that).
|
Pushed a third base-red cause: Five files exceed their frozen line counts on
Growth inherited from already-merged PRs that did not bump their entries, so there is no offending branch left to fix. The baseline already records this exact scenario under Locally on the base commit: Remaining after this PR
|
`check:mutation-test-coverage --strict` fails on release/v3.8.49 at its own HEAD:
11 unit tests that cover mutated modules are absent from `stryker.conf.json`
`tap.testFiles`, so their mutant kills do not count. The gate does not self-heal —
it names the exact files to add.
open-sse/services/accountFallback.ts + 8247-accountfallback-model-unhealthy,
8248-accountfallback-nvidia-degraded,
model-lockout-exact-cooldown-cap,
repro-antigravity-404-family-cooldown-hijack
src/sse/services/auth.ts + 7993-noauth-proxy-routing,
8200-perplexity-web-401-cooldown,
sse-auth-antigravity-credits
src/server/authz/routeGuard.ts + authz/route-guard-vnc-session-local-only
open-sse/utils/error.ts + error-sensitive-redaction
open-sse/utils/publicCreds.ts + adobe-firefly
src/shared/utils/circuitBreaker.ts + 8332-combo-vision-fallback
None is a file this PR touches, and the gate reports the identical 11 on a worktree
carrying none of these base-red fixes. Additions only (11 insertions, 0 deletions);
the array stays sorted. This widens what the mutation run accounts for rather than
relaxing anything.
|
@diegosouzapw — owner decision needed on the complexity ratchet. It is the last base-red gate on this branch and I did not touch it, because every prior rebaseline of this metric is recorded as owner-approved. State
Trust-but-verify: both numbers are identical on a worktree carrying none of this PR's changes, so this PR is complexity-net-zero — it only touches two test files, Why it needs youThe precedent is explicit and recent:
That margin is now spent — the cycle has run 39 past it. Same class as before (inherited merge-burst drift; the ratchet does not run on the PR→release fast path, so it accrues unmeasured), but raising a complexity ceiling is a standing policy loosening, not a mechanical unblock like the file-size and stryker entries in this PR, so I'm not doing it unilaterally. Where the drift sitsConcentrated, if you'd rather extract than raise:
Options
I'd suggest (1): it matches your last call on this exact metric and clears the queue for every PR on this base, not just mine. Numbers are yours to set. Rest of the PRThe other three base-red causes are fixed and verified green locally on the base commit: |
|
Thanks for the thorough diagnosis here — this is exactly the kind of base-red triage we want (root-caused to the actual signature change from #8331/#8356, not just re-suppressed). I reproduced all three claims independently on a clean worktree of the base tip:
One heads-up: I independently opened #8505 about an hour after your last commit here, fixing the same eslint-suppression entry (different approach — a local No production code touched, no missing tests, nothing else to flag. Planning to merge as-is. |
…rrent base tip The entry frozen in this PR (1960) was the value at 36f8fd1; the base has since advanced to 1cafd32 and the file is 1966 there, so check:file-size would still have been red on the merge commit. Re-measured to 1966. Same inherited drift the note already documents: check:file-size does not run on the PR->release fast path, so growth accrues unmeasured between release rebaselines. The other four entries still match the current tip (tokenHealthCheck 841, chat 1866, auth 2486, combo frozen 3642 >= 3640).
|
@diegosouzapw — thanks for the independent reproduction on all three, and for the #8505 heads-up. Pushed one more commit, because this PR as you reviewed it would still have left The I re-checked the other four against the current tip; all still correct:
Worth naming the pattern rather than just patching it: this is the same structural cause the note already cites — On #8505: no conflict from my side either way. It prunes the same suppression entry with a local Still open from my side: the complexity-ratchet decision in my comment above (2130 → 2169 measured, cognitive 951 → 956, both net-zero from this PR). I left it alone deliberately. Since posting it I noticed the release-green bot's own footer on #8007 classifies exactly this drift as "expected mid-cycle and rebaselined at release — NOT a contributor concern", which reads like the answer is "leave it to the captain". If that's right, no action needed and I'll stop raising it — just confirming, because |
|
Correction to my comment above, now that this has merged. I wrote — and put into the The drift is real; the reason is different. These gates compare absolute values against the frozen file rather than the PR's own delta, so once the base is over a cap, every PR is red on that gate — which is why red gets merged past, which is how the next unbumped growth lands. This PR is itself an example: it merged with Traced it end-to-end and filed #8522 with a proposal to make the PR-time comparison base-relative, keeping the absolute check for |
…egistry.test.ts (#8544) * chore(ci): resync stale no-explicit-any suppression count for proxy-registry.test.ts tests/unit/proxy-registry.test.ts is frozen at 55 no-explicit-any violations but only has 54 since #8447 (d7f9475) removed one. ESLint fails the run with "There are suppressions left that do not occur anymore", making `npm run lint` exit 2 on release/v3.8.49 for every PR that branches off it. Same class as #8007 / #8490, different file: no code to fix here — the count simply drifted down, so this resyncs it via --prune-suppressions. Base-red inherited from release/v3.8.49; both the suppressions file and proxy-registry.test.ts are byte-identical to that branch. * docs(changelog): add fragment for this PR
…#8490) * test(sse): repair two base-red gates on release/v3.8.49 `release/v3.8.49` is red at its own HEAD (d61504d) — `Quality Gates` and `Release-Green (continuous)` both fail — so every PR opened against it inherits four failing checks regardless of content. Two of those causes had no owner: diegosouzapw#8480/diegosouzapw#8481/diegosouzapw#8482 cover the compression ladder, the antigravity catalog, and the resilience/translator regressions respectively, none of them these. 1. `chatcore-client-usage-buffer.test.ts` — 5/5 failing. diegosouzapw#8331/diegosouzapw#8356 (f698fec) inserted an `options` parameter between `clientResponseFormat` and `deps` on `applyClientUsageBuffer()`. The five call sites here still passed `deps` in the fourth position, so the injected spies landed in the `options` slot and the real implementations ran — every `calls.*.length` assertion saw 0. The `Parameters<typeof applyClientUsageBuffer>[3]` cast in `makeDeps()` masked the type error, which is why it reached the branch. Call sites updated to `(resp, body, format, {}, deps)` and the cast repointed to `[4]`. Two cases added for the parameter that caused this, since nothing at this layer exercised it: `preserveContextBudgetInVisibleUsage` re-folds `context_budget_*` into the visible fields for the Claude-Code path, and the default path keeps the real unbuffered diegosouzapw#8331 numbers. 2. `claude-to-openai-think-close-5123.test.ts` — 4 unsuppressed `@typescript-eslint/no-explicit-any` errors, failing `npm run lint`. Its suppression entry allows `count: 2` but the file had grown to four `(chunk: any)` callbacks. Rather than raise the frozen count, the cause is fixed: `collectChunks()` returns `StreamChunk[]` instead of `unknown[]`, narrowing once at the boundary so all four callbacks need no annotation. The suppression entry is then stale and removed, which ratchets the file to zero. Test-only plus one allowlist deletion; no production code. Verified on a clean worktree of the base commit: `npm run lint` clean (was 4 errors), `chatcore-client-usage-buffer` 7/7 (was 0/5), `claude-to-openai-think-close-5123` 3/3. * chore(ci): rebaseline five inherited file-size overages on release/v3.8.49 `check:file-size` fails on release/v3.8.49 at its own HEAD (d61504d), which is what turns `Fast Quality Gates` red for every PR against this base: tokenHealthCheck.ts 832 -> 841 chat.ts 1865 -> 1866 auth.ts 2475 -> 2486 accountFallback.ts 1941 -> 1960 combo.ts 3630 -> 3642 None of these files is touched by this PR. The growth was inherited from already merged PRs that did not bump their entries, so there is no offending branch left to fix — the same situation the baseline already records under `_rebaseline_2026_07_02_5798_release_green`, and the procedure it documents is to raise the frozen values with a justification note. Raised to the current base values only. The files stay frozen and cannot grow further; an in-flight PR that adds lines to them bumps its own entry as usual (diegosouzapw#8482 touches accountFallback.ts and combo.ts and will need that). * chore(ci): register 11 covering unit tests in stryker tap.testFiles `check:mutation-test-coverage --strict` fails on release/v3.8.49 at its own HEAD: 11 unit tests that cover mutated modules are absent from `stryker.conf.json` `tap.testFiles`, so their mutant kills do not count. The gate does not self-heal — it names the exact files to add. open-sse/services/accountFallback.ts + 8247-accountfallback-model-unhealthy, 8248-accountfallback-nvidia-degraded, model-lockout-exact-cooldown-cap, repro-antigravity-404-family-cooldown-hijack src/sse/services/auth.ts + 7993-noauth-proxy-routing, 8200-perplexity-web-401-cooldown, sse-auth-antigravity-credits src/server/authz/routeGuard.ts + authz/route-guard-vnc-session-local-only open-sse/utils/error.ts + error-sensitive-redaction open-sse/utils/publicCreds.ts + adobe-firefly src/shared/utils/circuitBreaker.ts + 8332-combo-vision-fallback None is a file this PR touches, and the gate reports the identical 11 on a worktree carrying none of these base-red fixes. Additions only (11 insertions, 0 deletions); the array stays sorted. This widens what the mutation run accounts for rather than relaxing anything. * chore(ci): re-measure accountFallback.ts file-size cap against the current base tip The entry frozen in this PR (1960) was the value at d61504d; the base has since advanced to 59ef81b and the file is 1966 there, so check:file-size would still have been red on the merge commit. Re-measured to 1966. Same inherited drift the note already documents: check:file-size does not run on the PR->release fast path, so growth accrues unmeasured between release rebaselines. The other four entries still match the current tip (tokenHealthCheck 841, chat 1866, auth 2486, combo frozen 3642 >= 3640). --------- Co-authored-by: backryun <busan011@ormbiz.co.kr>
…egistry.test.ts (diegosouzapw#8544) * chore(ci): resync stale no-explicit-any suppression count for proxy-registry.test.ts tests/unit/proxy-registry.test.ts is frozen at 55 no-explicit-any violations but only has 54 since diegosouzapw#8447 (0222e01) removed one. ESLint fails the run with "There are suppressions left that do not occur anymore", making `npm run lint` exit 2 on release/v3.8.49 for every PR that branches off it. Same class as diegosouzapw#8007 / diegosouzapw#8490, different file: no code to fix here — the count simply drifted down, so this resyncs it via --prune-suppressions. Base-red inherited from release/v3.8.49; both the suppressions file and proxy-registry.test.ts are byte-identical to that branch. * docs(changelog): add fragment for this PR
…#8490) * test(sse): repair two base-red gates on release/v3.8.49 `release/v3.8.49` is red at its own HEAD (75eb952) — `Quality Gates` and `Release-Green (continuous)` both fail — so every PR opened against it inherits four failing checks regardless of content. Two of those causes had no owner: diegosouzapw#8480/diegosouzapw#8481/diegosouzapw#8482 cover the compression ladder, the antigravity catalog, and the resilience/translator regressions respectively, none of them these. 1. `chatcore-client-usage-buffer.test.ts` — 5/5 failing. diegosouzapw#8331/diegosouzapw#8356 (d4ab3af) inserted an `options` parameter between `clientResponseFormat` and `deps` on `applyClientUsageBuffer()`. The five call sites here still passed `deps` in the fourth position, so the injected spies landed in the `options` slot and the real implementations ran — every `calls.*.length` assertion saw 0. The `Parameters<typeof applyClientUsageBuffer>[3]` cast in `makeDeps()` masked the type error, which is why it reached the branch. Call sites updated to `(resp, body, format, {}, deps)` and the cast repointed to `[4]`. Two cases added for the parameter that caused this, since nothing at this layer exercised it: `preserveContextBudgetInVisibleUsage` re-folds `context_budget_*` into the visible fields for the Claude-Code path, and the default path keeps the real unbuffered diegosouzapw#8331 numbers. 2. `claude-to-openai-think-close-5123.test.ts` — 4 unsuppressed `@typescript-eslint/no-explicit-any` errors, failing `npm run lint`. Its suppression entry allows `count: 2` but the file had grown to four `(chunk: any)` callbacks. Rather than raise the frozen count, the cause is fixed: `collectChunks()` returns `StreamChunk[]` instead of `unknown[]`, narrowing once at the boundary so all four callbacks need no annotation. The suppression entry is then stale and removed, which ratchets the file to zero. Test-only plus one allowlist deletion; no production code. Verified on a clean worktree of the base commit: `npm run lint` clean (was 4 errors), `chatcore-client-usage-buffer` 7/7 (was 0/5), `claude-to-openai-think-close-5123` 3/3. * chore(ci): rebaseline five inherited file-size overages on release/v3.8.49 `check:file-size` fails on release/v3.8.49 at its own HEAD (75eb952), which is what turns `Fast Quality Gates` red for every PR against this base: tokenHealthCheck.ts 832 -> 841 chat.ts 1865 -> 1866 auth.ts 2475 -> 2486 accountFallback.ts 1941 -> 1960 combo.ts 3630 -> 3642 None of these files is touched by this PR. The growth was inherited from already merged PRs that did not bump their entries, so there is no offending branch left to fix — the same situation the baseline already records under `_rebaseline_2026_07_02_5798_release_green`, and the procedure it documents is to raise the frozen values with a justification note. Raised to the current base values only. The files stay frozen and cannot grow further; an in-flight PR that adds lines to them bumps its own entry as usual (diegosouzapw#8482 touches accountFallback.ts and combo.ts and will need that). * chore(ci): register 11 covering unit tests in stryker tap.testFiles `check:mutation-test-coverage --strict` fails on release/v3.8.49 at its own HEAD: 11 unit tests that cover mutated modules are absent from `stryker.conf.json` `tap.testFiles`, so their mutant kills do not count. The gate does not self-heal — it names the exact files to add. open-sse/services/accountFallback.ts + 8247-accountfallback-model-unhealthy, 8248-accountfallback-nvidia-degraded, model-lockout-exact-cooldown-cap, repro-antigravity-404-family-cooldown-hijack src/sse/services/auth.ts + 7993-noauth-proxy-routing, 8200-perplexity-web-401-cooldown, sse-auth-antigravity-credits src/server/authz/routeGuard.ts + authz/route-guard-vnc-session-local-only open-sse/utils/error.ts + error-sensitive-redaction open-sse/utils/publicCreds.ts + adobe-firefly src/shared/utils/circuitBreaker.ts + 8332-combo-vision-fallback None is a file this PR touches, and the gate reports the identical 11 on a worktree carrying none of these base-red fixes. Additions only (11 insertions, 0 deletions); the array stays sorted. This widens what the mutation run accounts for rather than relaxing anything. * chore(ci): re-measure accountFallback.ts file-size cap against the current base tip The entry frozen in this PR (1960) was the value at 75eb952; the base has since advanced to 1651617 and the file is 1966 there, so check:file-size would still have been red on the merge commit. Re-measured to 1966. Same inherited drift the note already documents: check:file-size does not run on the PR->release fast path, so growth accrues unmeasured between release rebaselines. The other four entries still match the current tip (tokenHealthCheck 841, chat 1866, auth 2486, combo frozen 3642 >= 3640). --------- Co-authored-by: backryun <busan011@ormbiz.co.kr>
…egistry.test.ts (diegosouzapw#8544) * chore(ci): resync stale no-explicit-any suppression count for proxy-registry.test.ts tests/unit/proxy-registry.test.ts is frozen at 55 no-explicit-any violations but only has 54 since diegosouzapw#8447 (c883922) removed one. ESLint fails the run with "There are suppressions left that do not occur anymore", making `npm run lint` exit 2 on release/v3.8.49 for every PR that branches off it. Same class as diegosouzapw#8007 / diegosouzapw#8490, different file: no code to fix here — the count simply drifted down, so this resyncs it via --prune-suppressions. Base-red inherited from release/v3.8.49; both the suppressions file and proxy-registry.test.ts are byte-identical to that branch. * docs(changelog): add fragment for this PR
Why
release/v3.8.49is red at its own HEAD (36f8fd10) —Quality GatesandRelease-Green (continuous)both fail there, with no PR involved. Every PR opened against this base therefore shows the same four red checks regardless of content:Ownership check before touching anything — of the base-red triage already in flight, none of these two causes is covered: #8480 is the compression ladder, #8481 the antigravity catalog, #8482 the resilience/translator regressions (its
eslint-suppressions.jsonhunk adds an entry foroauth-refresh-connection-dedup-8059.test.ts, which has noanyon this base — that's for its own change, not this drift). Shard 2/4 (combo-quota-share-cooldown-wait) does look like #8482's; it is not touched here.1. Unit shard 4/4 —
chatcore-client-usage-buffer.test.ts, 5/5 failing#8331/#8356 (
e8719783e) inserted anoptionsparameter betweenclientResponseFormatanddeps:The five call sites still passed
depsfourth, so the injected spies landed in theoptionsslot and the real implementations ran — everycalls.*.lengthassertion saw0(0 !== 1). TheParameters<typeof applyClientUsageBuffer>[3]cast insidemakeDeps()is what let this compile and reach the branch.Call sites updated to
(resp, body, format, {}, deps); the cast repointed to[4].Two cases added for the parameter that caused the break, since nothing at this layer exercised it:
preserveContextBudgetInVisibleUsage: truere-foldscontext_budget_*into the visible fields (the Claude-Code context-accounting path).2.
No new ESLint warnings—claude-to-openai-think-close-5123.test.ts, 4 errorsIts
eslint-suppressions.jsonentry allowscount: 2, but the file had grown to four(chunk: any)callbacks. Suppressions are count-based, so the two extra ones were unsuppressed andnpm run lint— the exact command the gate runs — exited 1.Bumping the frozen count would have hidden it again, so the cause is fixed instead:
collectChunks()now returnsStreamChunk[]rather thanunknown[], narrowing once at the boundary so all four callbacks need no annotation at all. With zeroanyleft, the suppression entry is stale and is removed — a small ratchet improvement rather than a bigger allowlist.Validation
All on a clean worktree of the base commit:
npm run lintchatcore-client-usage-buffer.test.tsclaude-to-openai-think-close-5123.test.tsTest files plus one allowlist deletion; no production code changes.
Note
I hit this while validating a TS7-readiness series (#8473, #8483, #8485, #8489 — tracked in #8484): all four carry these same four red checks, none of which they cause. Merging this should clear two of them for every open PR on this base, not just mine.