Skip to content

fix(ci): drain unit test base-reds (i18n pt-BR, inventory, CC provider route) (#9985) - #10795

Closed
rqzbeh wants to merge 4 commits into
cheaper-inference:release/v3.8.50from
rqzbeh:fix/release-v3.8.50-basereds-shard-fixes
Closed

rqzbeh wants to merge 4 commits into
cheaper-inference:release/v3.8.50from
rqzbeh:fix/release-v3.8.50-basereds-shard-fixes

Conversation

@rqzbeh

@rqzbeh rqzbeh commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on PR #10778 to drain the remaining 5 unit test base-red failures on release/v3.8.50 (#9985):

  1. src/app/api/providers/[id]/models/route.ts: Moved isClaudeCodeCompatibleProvider check before cached discovery lookups so CC-compatible connections return HTTP 400 instead of returning HTTP 200 with cached models.
  2. src/i18n/messages/pt-BR.json: Added 6 missing Portuguese translation keys to match en.json (settings.compressionOutputStyle.i-have-adhd.label, description, reasoningTokenBuffer, reasoningTokenBufferDesc, zeroLatencyOptimizations, zeroLatencyOptimizationsDesc).
  3. tests/unit/hard-session-lease-bypass-inventory.test.ts: Updated EXPECTED.credential and EXPECTED.executor inventory baselines for 7 new connection/credential call sites (speechCombo.ts, videoCombo.ts, videoModelResolution.ts, transcriptions/route.ts, classify/route.ts, segment/route.ts, geminiWeb.ts).

Verification

  • node --import tsx/esm --test tests/unit/i18n-pt-br.test.ts (3/3 passed)
  • node --import tsx/esm --test tests/unit/cc-compatible-provider.test.ts (27/27 passed)
  • node --import tsx/esm --test tests/unit/hard-session-lease-bypass-inventory.test.ts (3/3 passed)

@rqzbeh
rqzbeh requested a review from diegosouzapw as a code owner August 19, 2026 23:34
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks for this — verified all three fixes locally against release/v3.8.50 (worktree + gh pr checkout):

  • tests/unit/i18n-pt-br.test.ts — 3/3 pass.
  • tests/unit/cc-compatible-provider.test.ts — 27/27 pass. I reverted just the route.ts reorder to confirm causality: without it, exactly 1 test fails with 200 !== 400 on the CC-compatible-provider assertion, so this is a real fix, not incidental.
  • tests/unit/hard-session-lease-bypass-inventory.test.ts — 3/3 pass. Reverting just the test file to the old baseline reproduces a deepStrictEqual failure listing the same 7 new call sites you added (speechCombo.ts, videoCombo.ts, videoModelResolution.ts, transcriptions/route.ts, classify/route.ts, segment/route.ts, geminiWeb.ts), confirming these are real new call sites in the codebase and the baseline update isn't masking anything.

One thing worth flagging before merge: this branch is stacked on #10778, which is still open. gh pr diff 10795 currently shows #10778's full diff (eslint-suppressions.json, quality-baseline.json, the providerCapabilities.ts dead-code removal, the tieredRotation timeout widen) bundled in ahead of your own commit. Merging #10795 as-is would also merge #10778's content before it's been reviewed/merged on its own. Suggest holding until #10778 lands, at which point this PR's diff will shrink down to just your 3 files and can merge cleanly. No overlap with #10796 (different files entirely — stream-utils.test.ts only).

Nice narrow, TDD-proven drain of the #9985 shards.

@rqzbeh

rqzbeh commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Hi @diegosouzapw, thanks for the detailed review!

Quick update: we just pushed a new commit (fdea79752) to this branch resolving the cascading CI quality gate failures (open-sse-typecheck, public-creds, check-fabricated-docs, and stryker.conf.json test-coverage drift).

Could you please take a look at the latest changes when you have a moment?

@rqzbeh
rqzbeh force-pushed the fix/release-v3.8.50-basereds-shard-fixes branch 2 times, most recently from 30b5493 to 8f414e2 Compare August 21, 2026 13:08
@rqzbeh
rqzbeh force-pushed the fix/release-v3.8.50-basereds-shard-fixes branch 4 times, most recently from 0d72426 to bd87b9a Compare August 22, 2026 09:52
@rqzbeh
rqzbeh force-pushed the fix/release-v3.8.50-basereds-shard-fixes branch from bd87b9a to 5799ab6 Compare August 22, 2026 12:17
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Closing with credit — this drain PR's substance has been absorbed by the release tip:

Your single-value PRs (#11078/#11079/#11117/#11120/#11122/#11123/#11125/#11132) are the right shape and are being landed individually. Thank you @rqzbeh!

arminanton added a commit to arminanton/OmniRoute that referenced this pull request Aug 22, 2026
…s before cached fallback

Two release/v3.8.50 base-red unit failures in tests/unit/cc-compatible-provider.test.ts
(part of the cheaper-inference#9985 "release branch not green" set), re-derived and fixed against the
current tip rather than cherry-picked, since the base-red set has drifted since the
originating PRs were written.

1. models route (genuine code bug; ref cheaper-inference#10795 fix cheaper-inference#1, closes the gap in cheaper-inference#10863):
   GET /api/providers/:id/models returned HTTP 200 with an empty/cached model list
   for a Claude-Code-compatible (anthropic-compatible-cc-*) connection instead of the
   documented HTTP 400 "does not support models listing". The isClaudeCodeCompatibleProvider
   check sat AFTER maybeReturnCachedDiscovery() / maybeReturnAutoFetchDisabled() inside
   the isAnthropicCompatibleProvider block, so a freshly-created CC connection with no
   synced models hit the auto-fetch-disabled 200 fallback first. Hoisted the CC 400
   check to the top of that block so the unsupported-listing contract always wins.

2. stale test assertion (test-only; the code is correct per cheaper-inference#10684): the
   "preserves client cache markers" test asserted a client message marker sent with no
   ttl defaults to 1h even when a system block carries an explicit 5m marker. cheaper-inference#10684
   ("advance Claude cache breakpoints on growing tails") changed normalizeCacheControlTtl
   to "default missing ttl to 5m after a 5m breakpoint" (sections processed
   tools -> system -> messages) and updated claude-code-parity.test.ts /
   chatcore-translation-paths.test.ts to match, but missed this third assertion.
   Updated it to expect 5m, matching the intended breakpoint semantics.

Verified: tests/unit/cc-compatible-provider.test.ts 27/27, claude-code-parity 40/40,
chatcore-translation-paths 75/75, typecheck:core clean.

Refs cheaper-inference#9985, cheaper-inference#10795, cheaper-inference#10863, cheaper-inference#10684.

(cherry picked from commit 674606963abc8ed3e9ba89f2544e9f3aad6c8fa5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants