Skip to content

test: align stale integration tests surfaced post-v3.8.28 on main - #4129

Merged
diegosouzapw merged 1 commit into
release/v3.8.29from
fix/main-reds-post-v3828
Jun 18, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.29from
fix/main-reds-post-v3828

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Contexto

Após a release v3.8.28 mergear no main, dois testes de integração ficaram vermelhos no CI de push->main. Eles não apareceram antes porque os testes de integração não gateiam PR->release — só rodam em push/PR para main. Investigação completa confirmou: o código está correto, os testes estavam stale.

Reds corrigidos (test-only, zero mudança de produto)

1. count_tokens — v1-contracts-behavior.test.ts

AssertionError: 4 !== 3. O #4087 trocou o estimador para tiktoken real (countTextTokens). Para o payload do teste: "abcd" => 1, "12345678" => 3 (dígitos quebram em 3 tokens) = 4. A asserção antiga (3) era a heurística ceil(chars/4). Verificado localmente computando countTextTokens. Asserção atualizada 3 → 4.

2. Combo round-robin — combo-routing-e2e.test.ts (2 testes)

actual: ['openai','openai','openai'] em vez de ['openai','claude','gemini']. Pré-existente desde v3.8.26 (não é regressão do v3.8.28): stickyRoundRobinLimit tem default 3 (src/lib/db/settings.ts), e o sticky round-robin passou a valer para combos no #3846. Logo o combo "round-robin" serve 3 requests consecutivos por alvo antes de rotacionar — os testes assumiam rotação 1-por-request.

  • round-robin combo cycles through three providers: agora dispara 9 requests e espera o ciclo completo openai x3 -> claude x3 -> gemini x3.
  • strategy updates take effect...: agora faz 4 requests pós-update; a rotação para claude no 4º request prova que o round-robin assumiu (priority nunca alcançaria claude).

Validação

  • combo-routing-e2e.test.ts — verde (rc=0), ambos os testes corrigidos passam.
  • v1-contracts-behavior.test.ts — verde (rc=0).
  • Alinhamento ao comportamento real (tiktoken verificado + traces de sticky-3 confirmados rodando), não mascaramento.

Não cobre o terceiro red do main (Quality Ratchet drift: eslintWarnings +10, openapi -0.7, i18n -1.0) — esse é tratado separadamente (investigação/limpeza p/ voltar ao baseline, sem afrouxar).

🤖 Generated with Claude Code

Two integration tests were red on `main` after the v3.8.28 release merged.
Integration tests do not gate PR->release, so these only surfaced on
push->main once the cycle's changes landed:

- v1-contracts-behavior count_tokens expected 3 (the old ceil(chars/4)
  heuristic). #4087 switched the estimator to real tiktoken (countTextTokens):
  "abcd" => 1, "12345678" => 3, total 4. Assertion updated to the verified
  tiktoken total.

- combo-routing-e2e round-robin tests assumed one-request-per-target rotation,
  but stickyRoundRobinLimit defaults to 3 and sticky batching has applied to
  combos since v3.8.26 (#3846). Both tests now drive enough requests to observe
  the batched rotation: round-robin cycles openai x3 -> claude x3 -> gemini x3;
  the strategy-update test proves round-robin took over by reaching claude on
  the 4th post-update request (a target priority would never select).

Test-only; no production behavior change. Verified locally: both files green.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@diegosouzapw
diegosouzapw merged commit 9f14c12 into release/v3.8.29 Jun 18, 2026
4 checks passed
@diegosouzapw
diegosouzapw deleted the fix/main-reds-post-v3828 branch June 18, 2026 02:20
diegosouzapw added a commit that referenced this pull request Jun 19, 2026
… test-masking allowlist)

Release-PR (→main) quality gates fired on cumulative cycle drift the PR→release
fast-gates don't run:

- eslintWarnings ratchet 3779 -> 3816: +37 `any` (warn-level) warnings from 115
  cycle commits in open-sse/ and tests/. Release reconciliation adds 0 warnings
  (scripts/check/*.mjs are eslint-ignored; new fabricated-docs test uses no any).
  Same precedent as the v3.8.28 cycle-close rebaseline. Documented in baseline.
- test-masking allowlist += 5 verified-legitimate net-assert reductions from merged
  refactors: #4129 (combo-routing-e2e alignment), #4226 (ccr-marker/session-dedup
  helper removal), #4253 (ultra SLM-seam removal), #4132 (db-backup de-flake).
  Each reduction removed/restructured asserts for removed code — not weakening.
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…eaper-inference#4129)

Two integration tests were red on `main` after the v3.8.28 release merged.
Integration tests do not gate PR->release, so these only surfaced on
push->main once the cycle's changes landed:

- v1-contracts-behavior count_tokens expected 3 (the old ceil(chars/4)
  heuristic). cheaper-inference#4087 switched the estimator to real tiktoken (countTextTokens):
  "abcd" => 1, "12345678" => 3, total 4. Assertion updated to the verified
  tiktoken total.

- combo-routing-e2e round-robin tests assumed one-request-per-target rotation,
  but stickyRoundRobinLimit defaults to 3 and sticky batching has applied to
  combos since v3.8.26 (cheaper-inference#3846). Both tests now drive enough requests to observe
  the batched rotation: round-robin cycles openai x3 -> claude x3 -> gemini x3;
  the strategy-update test proves round-robin took over by reaching claude on
  the 4th post-update request (a target priority would never select).

Test-only; no production behavior change. Verified locally: both files green.
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
… test-masking allowlist)

Release-PR (→main) quality gates fired on cumulative cycle drift the PR→release
fast-gates don't run:

- eslintWarnings ratchet 3779 -> 3816: +37 `any` (warn-level) warnings from 115
  cycle commits in open-sse/ and tests/. Release reconciliation adds 0 warnings
  (scripts/check/*.mjs are eslint-ignored; new fabricated-docs test uses no any).
  Same precedent as the v3.8.28 cycle-close rebaseline. Documented in baseline.
- test-masking allowlist += 5 verified-legitimate net-assert reductions from merged
  refactors: cheaper-inference#4129 (combo-routing-e2e alignment), cheaper-inference#4226 (ccr-marker/session-dedup
  helper removal), cheaper-inference#4253 (ultra SLM-seam removal), cheaper-inference#4132 (db-backup de-flake).
  Each reduction removed/restructured asserts for removed code — not weakening.
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.

1 participant