Repository navigation
fix(runtime): cancel preparation cooperatively before owned settlement - #293
Conversation
Retain credential coalescing, typed review diagnostics and remaining tool allowances for the protocol 31 compatibility line.
Preserve original branch history while selecting current main as the audited baseline. Old early-settlement candidate remains in history and will only be reintroduced where justified by preparation ownership review; exclude unrelated unmerged auth and diagnostics ancestry.
PR #293 gate follow-up: freeze virtual time through preparation, observe provider entry, and explicitly advance the unchanged 100ms deadline. Preserve exact-one request assertions and remove the wall-clock timeout. Relocate existing sleep baseline lines only.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Updated to current main tip New head: Verification on this head:
Benefit: expired/cancelled runtime preparation receives a cooperative stop signal and skips later credential/provider/reviewer/tool/plan phases at safe checkpoints. It still drains owned work before terminal settlement/session release, preventing hidden background construction. Already-running OS credential calls are not forcibly interrupted. The old early-RunFinished approach is not included. |
Summary
Take over the existing PR on its original branch, targeting
main. Stop avoidable runtime-construction work after a run deadline or cancellation without publishing a terminal result while preparation is still alive.This supersedes the old early-settlement design. Terminal settlement continues to follow owned loader drain; the session reservation and scheduler capacity remain held until preparation actually exits.
What changed
RuntimeLoadProgress, preserving default behavior for legacy embedding loaders.Verification
loader must receive cooperative cancellation(expected 1, observed 0).082ffe27de54: 2,474/2,474 passed, 14 skipped; doctests, strict workspace Clippy, formatting and lint passed. Minimal-provider Clippy and 211/211 tests passed. Total 233.9s.Full gate commands:
cargo xtask check --full;cargo xtask check --evidence. Affected gate:cargo xtask check --base origin/main.Design and compatibility
No dependency, wire/protocol, descriptor, or store-schema changes. Legacy loaders remain supported and fully drained. Reused the existing cancellation primitive rather than adding detached teardown tasks or a new runtime.
Cancellation is cooperative, not OS-call interruption: a credential/filesystem call already executing must return before the next checkpoint can stop construction. Cache single-flight waits remain owned and drained. Cancellation racing after the final check may leave a valid complete generation cached; it cannot install an incomplete one. This PR does not claim immediate terminal response during a blocked Keychain call, signing fixes, or native macOS credential acceptance.
History
Original PR history is preserved without force-pushing. Current-main reconciliation excludes the old branch's unrelated unmerged auth/diagnostic stack. No replacement PR or branch was created. Installer work remains separately merged in #287.