Skip to content

[URGENT] test(ci): align turn pins with provider cooldown window gate - #12259

Closed
backryun wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
backryun:codex/fix-provider-cooldown-turn-pin-tests
Closed

backryun wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
backryun:codex/fix-provider-cooldown-turn-pin-tests

Conversation

@backryun

@backryun backryun commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Aligns two stale native Codex turn-pin tests with the provider-level cooldown contract introduced by #12247.

#12247 changed whole-provider cooldowns from “one recorded failure starts cooldown” to the PROVIDER_PROFILES window gate: the provider only enters cooldown after providerFailureThreshold failures within providerFailureWindowMs. The production implementation and its new focused tests are correct, but two pre-existing turn-pin tests still recorded only one Antigravity failure before asserting that the whole provider was cooling.

That drift currently fails release fast-path shards 3/4 and 4/4, including on #12258:

  • native-codex-turn-pin-10379.test.ts expected a provider outage to mask an existing model lockout, but had not actually tripped provider cooldown.
  • native-codex-turn-pin-model-scoped-fallback.test.ts asserted isProviderInCooldown(...) === true after only one provider-level failure.

Change

Both tests now record PROVIDER_PROFILES.oauth.providerFailureThreshold failures for Antigravity before exercising their global-cooldown assertions.

This is test-only. No production routing, cooldown, provider, dependency, or bundler behavior changes.

Validation

Before the fix, the exact two files reproduced 2 failures / 15 tests locally, matching CI.

After the fix, the turn-pin files plus #12247's provider cooldown suites pass:

  • 38/38 tests passed
  • Prettier passed
  • ESLint passed
  • git diff --check passed

Unblocks the inherited release checks on #12258.

diegosouzapw added a commit that referenced this pull request Sep 1, 2026
…estFiles (#12263)

Gate check:mutation-test-coverage --strict red→verde local (registro dos 2 testes turn-pin no tap.testFiles, drift da mesma classe do #12170). O único check vermelho desta PR (Unit shard 4/4) é o base-red dos próprios testes turn-pin desalinhados pelo #12247 — corrigido pela #12259, mergeada na sequência. Reds circulares: cada PR só está vermelha no item que a outra corrige.
@backryun

backryun commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #12255 and #12263. The release branch now contains the same turn-pin window-gate alignment plus the required Stryker tap registration, so this PR has no unique change left to preserve.

@backryun backryun closed this Sep 1, 2026
@backryun
backryun deleted the codex/fix-provider-cooldown-turn-pin-tests branch September 1, 2026 06:33
@diegosouzapw

Copy link
Copy Markdown
Owner

Obrigado pelo diagnóstico e fix rápidos, @backryun — o root cause e a direção estavam exatamente certos! 🙏 Enquanto esta PR aguardava, o mesmo alinhamento (loop até providerFailureThreshold nos dois testes turn-pin) chegou à release/v3.8.51 via #12255, e por tocar as mesmas linhas esta branch ficou em conflito. O conteúdo dela está integralmente coberto na base atual (git show origin/release/v3.8.51:tests/unit/native-codex-turn-pin-model-scoped-fallback.test.ts já contém o gate por janela). Deixo aberta para o @diegosouzapw decidir o fechamento como subsumida.

muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…estFiles (diegosouzapw#12263)

Gate check:mutation-test-coverage --strict red→verde local (registro dos 2 testes turn-pin no tap.testFiles, drift da mesma classe do diegosouzapw#12170). O único check vermelho desta PR (Unit shard 4/4) é o base-red dos próprios testes turn-pin desalinhados pelo diegosouzapw#12247 — corrigido pela diegosouzapw#12259, mergeada na sequência. Reds circulares: cada PR só está vermelha no item que a outra corrige.
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