Repository navigation
fix(kiro): retry rebuilt requests at the rebuilt destination - #6374
Conversation
…dget A reset-triggered rebuild retargets the request to a new region's canonical host. Treat that move as authorized rebasing, not a failover transition, so the region's own legacy gateway rotation still fits the one-transition budget. The legacy host is also resolved from the current request URL so rebuilt credentials are never sent to the original region's gateway.
…-following legacy host
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (2)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 (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughKiro reset retries now use rebuilt request destinations and derive legacy gateway fallbacks from the current request URL. The request execution budget records validated rebases without charging target-transition or alternate-target allowances, while retaining replay-safety and total-send checks. ChangesKiro reset retry and budget handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Caller
participant fetchWithResetRecovery
participant createRequestExecutionBudget
participant fetchKiroAttempt
fetchWithResetRecovery->>createRequestExecutionBudget: Reserve dispatch for current destination
fetchWithResetRecovery->>fetchKiroAttempt: Send request
fetchKiroAttempt-->>fetchWithResetRecovery: Return connection reset
Caller->>fetchWithResetRecovery: Rebuild request with updated URL and credentials
fetchWithResetRecovery->>createRequestExecutionBudget: Reserve rebased destination
fetchWithResetRecovery->>fetchKiroAttempt: Retry rebuilt request
fetchKiroAttempt-->>fetchWithResetRecovery: Return endpoint failure
fetchWithResetRecovery->>fetchKiroAttempt: Send to legacy gateway for current request URL
Merge Risk: ⚪ Minimal · up to Kiro reset retries now follow a rebuilt request's destination while replay-safety and total-send limits still apply. No concrete merge-blocking issue was identified, and focused tests plus CI are reported as passing. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected recovery path keeps rebuilt credentials and request bodies aligned with their destination while retaining physical-send limits. No newly reachable attack path was established, but the rebuild exemption relies on trusted callers and concurrency coverage remains incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (2 skipped: 2 unsupported.)
✨ 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. |
|
Maintainer integration record (MAINTAINERS.md, dev-only) — draft by release lane L2
|
Summary
A Kiro connection-reset retry could combine rebuilt credentials and body with the old captured destination. Use the rebuilt request URL for both physical retries and send-budget admission, and derive legacy gateway fallback from the rebuilt region. Record an authorized request rebuild separately from the one permitted alternate-target transition so the new region retains its normal gateway fallback. The accounting still enforces physical-send limits.
Source history is preserved through commit
9361d31d5b2fc296c5e8d41a19b734c3198aaba6. The local validation below used the integration withdevat0328373fb88fe0d019b29ae278e153d7fed4bcc7.Verification
Current upstream integration:
a6114b62ed1b65dede802359ccd373d913979b24; published HEAD2534809a7445f1d0f4be9fefccbc7bb08269400a. The source history throughefa286fde6912a1dad6656fc349f6c0fd0c98358is 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/lib/execution-budget-permits.test.ts: 23 passed, 0 failed, 138 assertions. This focused run verifies budget accounting, including rebuild and alternate-target admission. It does not claim a live Kiro endpoint or reset retry was exercised.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 and
test:changedwere not run under the focused-validation exception because of the resource and synthetic-test limits of this maintenance pass. The focused accounting suite ran; live Kiro transport and reset behavior were not exercised. Exact-HEAD CI succeeded; results from another HEAD are not its verification.Checklist
2534809a7445f1d0f4be9fefccbc7bb08269400a, 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