Skip to content

fix(sse): sticky head + store drain for opencode rotation (opt-in) - #14202

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
maxmad64bis:feat/n97-r7-sticky
Sep 22, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
maxmad64bis:feat/n97-r7-sticky

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #13866

Summary

Concurrent requests on the opencode rotation start from the same member and replay the same failing cascade. This PR reuses the last healthy member and skips recently refused members while the opt-in skip flag is on; with the flag off the order is exactly the plain rotation. The saturated fallback serves without recording sticky, so sticky keeps the previous healthy serve.

Related Issues

Validation

  • Change type: provider
  • Focused tests and category gates from the golden path
  • npm run lint — local eslint on the touched files is clean; the full run is red on the base (files outside this PR)
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/account-rotation-sticky.test.ts (new, 11 cases: dispersion, sticky, store drain, flag-off terminal, saturation, eviction, success interplay, custom predicate, 15-member wave).

Coverage Notes

  • open-sse/executors/accountRotation.ts is covered by the new test plus account-rotation.test.ts and account-rotation-lot-c.test.ts, green without modification (57 tests total with the refusal-memory and empty-rejection suites).

Reviewer Notes

@maxmad64bis maxmad64bis changed the title fix(sse): sticky-slot + store-drain head for opencode rotation (opt-in) fix(sse): sticky head + store drain for opencode rotation (opt-in) Sep 19, 2026
@maxmad64bis
maxmad64bis marked this pull request as ready for review September 19, 2026 17:02
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @maxmad64bis — merging via the release merge-train. Validated in local merge-train (mt-train10c) on the devbox @ train tip 4d841aa1c740bbaa03868dc0a403c62099a99a42 with the 72 sibling PRs of this batch: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; changed-area node:test 831/831 (0 failing) and vitest 480/482 — the two reds are autoCombo/provider-family-combos.test.ts timing out at 20s, which reproduces on the PURE release tip under the full vitest suite (and is already tracked by the Release-Green issue #13866), so it is inherited, not this batch's. Merged --admin per merge-gates §3/§4/§7.

@diegosouzapw
diegosouzapw merged commit 985136b into diegosouzapw:release/v3.8.51 Sep 22, 2026
15 of 25 checks passed
@maxmad64bis
maxmad64bis deleted the feat/n97-r7-sticky branch September 23, 2026 00:22
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