Repository navigation
Hold after-outcome past finish-attempt, find grown archives, replay the halt (#384) - #387
Merged
Merged
Conversation
…he halt (#384) Three producer-suite scenarios failed: sealed-after-outcome, export-torn-read and halt-records-last-halt. - finish-attempt removed every hold, so an after-outcome hold never applied. It now clears only a hold that blocks the model execution and returns once the engine waits with the outcome recorded. The hold moved from the publisher gate to right after outcome_recorded: at the gate the outcome was not in the archive record yet. release then waits until status shows the attempt finished, so its sealed event is there. - The live summary of an active Attempt dropped an outcome already in the archive record. attempts show and list now carry it, so an Attempt reads active and unsealed with its outcome while finalization still writes. - grow-archive matched the contract Attempt ID against the sanitised directory name and never found it. It now uses the engine's own find_run_directory, skips Sealed archives and never grows attempt.json. - The halted Contract Event died with the in-memory buffer. A start now seeds the buffer from the durable halt record, before anything else is emitted, so recent_events stays oldest first. No record seeds nothing. Fixes #384 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Fixes #384
Makes
sealed-after-outcome,export-torn-readandhalt-records-last-haltpass in the producer suite.Changes
finish-attemptkeeps anafter-outcomehold. It clears only a hold that blocks the model execution (after-claim,native-phase) and returns once the engine waits with the outcome recorded. The nextreleasewaits untilstatusshows the attempt finished, so itssealedevent is already there.grow-archivefinds the archive of a contract Attempt ID. It uses the engine's ownfind_run_directory, skips Sealed archives and never growsattempt.json.haltedContract Event survives a restart. A start seeds the Contract Event buffer from the durable halt record before anything else is emitted, in productionmainand in the harness. No record seeds nothing.Deviations from the brief
after-outcomehold moved from the publisher gate to right afteroutcome_recorded. At the gate the outcome was not in the archive record yet, so the scenario could not pass there.attempts showandattempts listnow carry an outcome already in the archive record for the active Attempt (attempt_history.py). Without it the suite cannot see the outcome while held. In production an active Attempt can briefly show its outcome while finalization still writes.test_harness_smoke_reaches_every_statenow uses anafter-claimhold; it relied on the old behaviour.Verification
--require-allwith all capabilities, and--capabilities ""): 37 PASS, 4 FAIL. The three target scenarios pass. The four failures (recovery-retry,recovery-release,errors-reset,offline-reads) fail identically onmain, where 7 failed; they are out of scope here, so theproducerjob stays red.uv run pytestlocally on macOS: 1972 passed, 10 failed. The 10 (test_attempt_processes.py,test_control_offline.py) fail identically on a cleanmainon that machine.Open points
haltedis replayed on every later start, not only the first one, with its original time. This matcheslast_halt.haltissued while the engine waits in anafter-outcomehold fails (the old publisher gate behaved the same), and anafter-outcomehold survives an engine restart until the nextrelease.🤖 Generated with Claude Code