Recover terminal model failures and preserve verification evidence - #147
Merged
Merged
Conversation
added 8 commits
September 11, 2026 21:46
added 6 commits
September 12, 2026 03:12
Preserve upstream review-and-fix settlement and action-fusion behavior while keeping typed terminal recovery identities. Reconcile the existing stall regressions, retain all assertions, and extract helpers/tests to satisfy the unchanged file-size and strict Clippy gates.
Remove metadata-only digest reuse so rapid or preserved-mtime edits invalidate every verification boundary. Keep source pruning and cancellation, validate the opened descriptor, and enforce the actual streaming size limit. Cover restored-mtime fast checks, final UI edits, FIFO replacement, growth and cancellation.
added 11 commits
September 12, 2026 03:41
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.
A bounded recovery from terminal
503 tool_protocol_errorcan resend an unchanged body with the failed generation’s request identity, causing the API to replay the failed admission. Give this specific recovery a fresh identity and preserve that replacement identity if its response is lost. Transport, unknown 503, partial-stream, and payment retries retain their existing identity and bounds. A real HTTP regression exercises the public flat error envelope, identity rotation, a lost replacement response, and successful replay.Keep final outcomes tied to execution and verification evidence. Passing local checks alone cannot turn a failed provider request into completed work. Preserve visible model text while appending required failure or unverified-work diagnostics. Keep
/plan statususable, stop exhausted implementation continuations after inspection-only recaps, and preserve disabled-continuation behavior.Read-cache reuse compares freshly read bounded bytes, and source-ledger reconciliation hashes current content before sealing verification. Existing pruning, size limits, and cancellation remain. Box two large tool-batch futures so cold secret-scrubber initialization fits the default stack; fresh-process regressions cover both original stack failures.
Preserve SQLite DB and WAL-index locks during permission adjustment: validate already-private files without opening data descriptors, use inode-bound Linux metadata descriptors, and perform portable Unix mutations in a syscall-only child. Peer-process regressions cover reopen, permission tightening, connection close, and inode/link/FIFO protections. Native macOS CI exercises the portable path.
Retain search-launch diagnostics instead of reporting every exit 1 as no matches. Recognize the Linux sandbox’s specific missing-ripgrep result so the existing bounded fallback runs. An enforced subprocess regression removes ripgrep from PATH while retaining the helper probe; ordinary Core CI installs and probes native ripgrep. Process cleanup fixtures observe actual host PIDs while retaining sandbox enforcement and the original cleanup assertions. Mechanical module extractions keep the existing file-size ratchet unchanged.
Validation: all exact-revision CI jobs passed for
c31c542e, including Linux tests and integration gates, native macOS SQLite checks, and terminal smoke. The full local suite passed 4,683 tests (13 existing skips), strict lint across 13 packages, 25 terminal scenarios and 12 chaos cases with actual sandbox enforcement. Targeted HTTP recovery, cold-stack, live SQLite locks, process cleanup, and native/missing-ripgrep regressions pass. The ordinary release build and isolated startup checks also pass.The companion gateway fix is deployed. All three live Flash aliases and eight coding tasks passed through the new gateway.