fix: build determinism + loop-guard poll exemption + provider-failure recovery (#106 #85 #84) - #140
Merged
Merged
Conversation
| /// keeps polling far past any sane job-wait budget. 120 polls ≈ hours | ||
| /// of attached waiting; a real loop still trips well before token ruin. | ||
| pub const POLL_LOOP_TRIP_AFTER: usize = 120; | ||
|
|
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
… provider-failure recovery (#106, #85, #84) #106 — Cargo.lock committed (rmcp pinned at the verified 3.4.0) and removed from .gitignore: CI resolved fresh every run while local machines carried stale locks — 'what compiles' depended on WHEN you resolved, not the commit. Fresh clone → cargo build --workspace now reproduces CI's dependency set deterministically (verified from a clean clone). #85 — loop guard poll exemption: job_poll with identical input is the CORRECT pattern (arguments name the job; the RESULT carries the change) — the old guard aborted healthy 14-minute-render missions at the 3rd poll. Poll tools now trip at 120 (patience ceiling, still guards a true stuck-poll); non-poll tools trip at 3 unchanged. Regression test: 25 identical polls complete; identical non-poll calls still trip. Live-verified: a 16s detached job polled 6 times to completion, no trip. #84 — terminal provider failures now SETTLE the turn (Planning→Final with a durable error record) instead of wedging at pc=Planning: a plain 'tole resume <id> "prompt"' works next, matching the E5 crash-resume guarantee. (The malformed-intent replay guard — the other half of the original wedge — landed with the scan-3 triage #135.) Tests updated to the new contract: provider-failure lands Final and the follow-up turn drives cleanly; the mid-flight refusal test now constructs its wedge state directly. Live-verified: connection-refused failure → pc Final → prompt resume answers RECOVERED.
ajianaz
force-pushed
the
fix/batch-106-85-84
branch
from
September 29, 2026 02:36
c94e9b0 to
feaa6c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three live-mission findings fixed together (all from the parallel-session wave):
Cargo.lockcommitted (rmcp pinned at verified 3.4.0), removed from.gitignorejob_pollidentical-input streaks trip at 120 instead of 3Planning→Final+ durable error) —resume <id> "prompt"just worksWhy
ClientConfig✓) while local stale locks held 3.3.0 (noClientConfig✗) — "what compiles" depended on resolve time, not the commit. Repo ships a binary; the lock is the fix.pc=Planning; prompt-resume was refused and the approvals-only recovery is interactive — sessions stranded.Changes
turn.rs:POLL_LOOP_TRIP_AFTER = 120+is_poll_tool; provider-failure path commitsPlanning→Finalafter the durable error recordturn_loop.rstests: 25-identical-polls pass / non-poll still trips at 3; provider-failure lands Final + next turn drives; mid-flight-refusal test constructs its wedge directly (CAS seq ordering fixed).gitignore/Cargo.lock: lock committedTesting
cargo build --workspacegreen with the committed lock (deterministic)job_start) polled 6× identical → mission completed, reportedframe 8, no trippc: Final→resume <id> "Say exactly: RECOVERED"→RECOVERED(the exact wedge scenario from the issue)Closes #106, closes #85, closes #84.