Skip to content

fix(release): drain v3.8.50 base-reds — getTokenLimit contract, Vietnamese i18n parity, eslint gate - #11153

Merged
diegosouzapw merged 4 commits into
release/v3.8.50from
fix/release-v3850-basereds-tests-i18n
Aug 22, 2026
Merged

diegosouzapw merged 4 commits into
release/v3.8.50from
fix/release-v3850-basereds-tests-i18n

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

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" expected getTokenLimit("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.50 on source vs test: the test file is untouched since d54a659, while TWO intentional merges changed the resolution chain underneath it:

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 → 200000 kept 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 to en.json with no vi translations; agentSkills.catalog.omni-webhooks.description carried 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 fragment changelog.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-any in tests/unit/capture-critical-db-state.test.ts:11-14, introduced by 0ff0490 (#10906) which rewrote the suite keeping any holders for dynamically imported core.ts exports.

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; full npm run lint:json -- --max-warnings 0 re-run → exit 0.

Gates

  • tests/unit/context-manager.test.ts 29/29, tests/unit/i18n-vi-completeness.test.ts 5/5, tests/unit/capture-critical-db-state.test.ts 7/7 (41/41 combined)
  • typecheck:core clean
  • check:file-size OK
  • check:changelog-integrity OK (no base bullets lost)
  • npm run lint:json -- --max-warnings 0 exit 0

…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.
@diegosouzapw
diegosouzapw merged commit b2509bc into release/v3.8.50 Aug 22, 2026
9 of 12 checks passed
@diegosouzapw
diegosouzapw deleted the fix/release-v3850-basereds-tests-i18n branch August 23, 2026 21:46
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