fix(release): drain v3.8.50 base-reds — getTokenLimit contract, Vietnamese i18n parity, eslint gate - #11153
Merged
diegosouzapw merged 4 commits intoAug 22, 2026
Conversation
…11034 contract (#9985) The 'does not force 1M onto non-hyperagent providers' assertion expected windsurf's per-model 200000 pin for claude-opus-4.7-max. That premise is stale after two intentional base merges, both already on release/v3.8.50: - acc066d (#8228) retired windsurf as a built-in provider (replaced by devin-desktop), removing its explicit contextLength pin; - 00dfdad (#11034) added effort-suffix variant resolution in getResolvedModelCapabilities: when no direct source resolves, stripKnownEffortSuffix maps claude-opus-4.7-max to its base model claude-opus-4.7 -> canonical claude-opus-4-7, whose real catalog window is 1M (cursor catalogs the same id as 'Opus 4.7 1M Max'). So the 1M now comes from the shared model catalog via legitimate base-model resolution, not from the forbidden hyperagent-default leak the test guards against. Discrimination evidence: reproduces on the pure tip with zero diff (git log -p origin/release/v3.8.50 on both source and test); the test file itself was untouched since d54a659 while both source merges landed later. The bluesminds/claude-opus-4-5 -> 200000 assertion is unchanged and still guards the original #8496 intent: a non-hyperagent provider's own pin must win over name heuristics and sibling windows.
…ings (#9985) Two gaps left the vi locale red on the release tip: - 6cd4d38 (#11069) added 14 providers.harImport* keys (HAR-import UX for the m365 Copilot web flow) to en.json without vi translations, so key parity, ICU placeholder and ICU parse tests all failed on the same missing set. Added the 14 Vietnamese translations with the {minutes} ICU placeholder preserved verbatim. - agentSkills.catalog.omni-webhooks.description carried a literal __MISSING__: fallback; replaced with a real Vietnamese translation, keeping technical event names (request.completed, request.failed, quota.exceeded) untouched. tests/unit/i18n-vi-completeness.test.ts: 5/5 green.
#9985) 0ff0490 (#10906) rewrote this suite keeping four module-level holders typed as any for the dynamically imported src/lib/db/core.ts exports — 4 new unsuppressed @typescript-eslint/no-explicit-any errors that failed the 'No new ESLint warnings' fast gate (npm run lint:json -- --max-warnings 0, exit 1 on the pure tip; CI run 32403951361). Replaces the any holders with a type-only CoreModule reference (typeof import(...)), so the runtime dynamic-import timing that motivates the pattern (DATA_DIR must be set before core.ts loads) stays untouched. Purely typal: file lints clean and its 7 assertions still pass.
… translated upstream)
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.
Refs #9985
Drains the 3 base-reds that reproduce on the pure tip of
release/v3.8.50(discriminated: each failure reproduced with zero local diff before any change).1) getTokenLimit non-hyperagent — test aligned to the new contract
Symptom:
tests/unit/context-manager.test.ts"does not force 1M onto non-hyperagent providers serving the same model ids" expectedgetTokenLimit("windsurf", "claude-opus-4.7-max")→ 200000, code returns 1000000.Discrimination: reproduces on the pure tip with zero diff.
git log -p origin/release/v3.8.50on source vs test: the test file is untouched since d54a659, while TWO intentional merges changed the resolution chain underneath it:contextLength: 200000pin the assert relied on.getResolvedModelCapabilities: with no direct source left,stripKnownEffortSuffixmapsclaude-opus-4.7-max→ baseclaude-opus-4.7→ canonicalclaude-opus-4-7, whose real catalog window is 1M (cursor catalogs the same id as "Opus 4.7 1M Max").Decision: align the test (code is right, assert was stale). The 1M now comes from the shared model catalog via legitimate base-model resolution — NOT the forbidden hyperagent-default leak the test guards.
bluesminds/claude-opus-4-5 → 200000kept unchanged and still guards the original #8496 intent. Proof:node --import tsx/esm --test tests/unit/context-manager.test.ts→ 29/29.2) Vietnamese i18n parity — translations added
Symptom:
tests/unit/i18n-vi-completeness.test.ts— 4 failures (key parity, missing markers/empty fallbacks, ICU placeholders, ICU parse).Root cause: 6cd4d38 (#11069) added 14
providers.harImport*keys toen.jsonwith no vi translations;agentSkills.catalog.omni-webhooks.descriptioncarried a literal__MISSING__:fallback.Fix: 14 Vietnamese translations added to
src/i18n/messages/vi.json(mirroring en.json placement,{minutes}ICU placeholder preserved verbatim, no__MISSING__markers) + real translation for the omni-webhooks description (technical event names kept as-is). Proof: same test file → 5/5. User-visible change → changelog fragmentchangelog.d/fixes/release-v3850-basereds-tests-i18n.md.3) ESLint gate — 4 new unsuppressed no-explicit-any errors fixed
Symptom:
env -u OMNIROUTE_API_KEY npm run lint:json -- --max-warnings 0→ exit 1 on the pure tip (CI run 32403951361, job "No new ESLint warnings").Discrimination: NOT orphaned suppressions (JSON inventory: 0 warnings, no stale entries). The full inventory shows exactly 4 errors —
@typescript-eslint/no-explicit-anyintests/unit/capture-critical-db-state.test.ts:11-14, introduced by 0ff0490 (#10906) which rewrote the suite keepinganyholders for dynamically importedcore.tsexports.Fix (trivial/safe, purely typal):
type CoreModule = typeof import("../../src/lib/db/core.ts")+ typed holders — the runtime dynamic-import timing (DATA_DIR must be set before core.ts loads) is untouched. No suppression changes needed. Proof: file lints clean; fullnpm run lint:json -- --max-warnings 0re-run → exit 0.Gates
tests/unit/context-manager.test.ts29/29,tests/unit/i18n-vi-completeness.test.ts5/5,tests/unit/capture-critical-db-state.test.ts7/7 (41/41 combined)typecheck:corecleancheck:file-sizeOKcheck:changelog-integrityOK (no base bullets lost)npm run lint:json -- --max-warnings 0exit 0