Repository navigation
fix(kiro): rebind continuation ownership after refusal failover - #6376
Conversation
…cope state Replace the source-order-only coverage with a behavioral check: bind the reasoning replay scope under one account snapshot, commit it as served, rebind under the rotated account, and assert the new credential identity wins and the strip/drop flags retire the previous store's state.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe Kiro and non-Kiro generic OAuth failover paths now bind reasoning replay scope to the replay OAuth credential snapshot. Tests cover replay identity changes and refusal retries in buffered and streamed response modes. ChangesOAuth refusal failover
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Retries now use replay and continuation state bound to the replacement OAuth account, with refusal-retry coverage across response modes. No actionable merge-blocking risk was identified. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ation The non-Kiro 429 arm rotated through applyFailoverSnapshot but replayed without rebinding the reasoning replay scope, so the retry could carry the 429'd account's continuation and encrypted reasoning. Bind it to the replacement snapshot before replay, as the Kiro refusal arm now does.
|
Maintainer follow-up (release lane review), commit An independent review of Security re-attestation at |
|
Maintainer integration record (MAINTAINERS.md, dev-only) — draft by release lane L2
|
Summary
Kiro refusal failover replaced the OAuth account snapshot without rebinding the request continuation owner. Bind the continuation and reasoning replay scope after selecting the replacement account and before rebuilding or sending the request. Foreign account continuation state is removed, and response state belongs to the admitted replacement account. Synthetic composition regressions cover both buffered and streamed 400/403 refusal recovery.
Source history is preserved through commit
bb11c93e5ec797f7ee4b8e81380e7fd0baaff347. The local validation below used the integration withdevat0328373fb88fe0d019b29ae278e153d7fed4bcc7.Verification
Current upstream integration:
a6114b62ed1b65dede802359ccd373d913979b24; published HEADea76b2a0776430385d3e7e96e868e1587e4740ff. The source history through71138522313cdac41ea016ed5c66a9d074f9f84dis retained without rewriting authors or commits. The PR-specific change was checked again after this integration; typecheck, structure, privacy and file-size gates passed. Cross-platform CI succeeded for this exact HEAD; its checkout tree matches the published HEAD tree. Skipped jobs remain skipped.Windows, Bun 1.4.0, isolated test temporary directory:
bun test tests/oauth/generic-oauth-refusal-composition.test.ts: 4 passed, 0 failed, 116 assertions. Synthetic credentials, adapter/transport boundaries, and catalog behavior are isolated; the cases exercise continuation ownership through buffered and streamed refusal recovery without a provider connection.bun node_modules/typescript/bin/tsc --noEmit: passed.bun scripts/structure-ssot.ts: passed.bun scripts/privacy-scan.ts: passed.bun scripts/file-size-ratchet.ts: passed.git diff --cached --check 0328373fb88fe0d019b29ae278e153d7fed4bcc7: passed.The full local suite,
test:changed, and broad Kiro transport suites were not run under the focused-validation exception. The narrow composition tests use controlled in-process responses and block real provider transport/credentials. Live transport coverage remains outstanding. Exact-HEAD CI succeeded; results from another HEAD are not its verification.Checklist
ea76b2a0776430385d3e7e96e868e1587e4740ff, known correct findings are addressed, and exact-HEAD CI is complete; author review readiness is confirmed.Independent maintainer approval, explicit security review, and any required
maintainer-sponsoreddecision remain pending before merge. These are separate from author review readiness; no approval or sponsorship is claimed.Summary by CodeRabbit