Repository navigation
Carry out Operator Handoffs in the conformance harness (#383) - #386
Merged
Merged
Conversation
The harness executor now carries the real executor's operator seams: a pending `handoff now` is picked up at the next poll, reported delivered then begun, and the attempt ends with the `handoff` outcome and an `operator_request` Handoff note. The engine's own finalization decides `completed` or `not_fulfilled`. Running that path against the real GitWorkspace exposed two engine bugs: - The handoff rechecks after cleanup re-read the note from a working tree that cleanup had already returned to the base, so every Operator Handoff ended `not_fulfilled`. The note is validated on the attempt's tree before release; the post-cleanup rechecks now only apply the whole-command budget. - After a crash mid-handoff, recovery completed the handoff. Per contract spec section 14 an interrupted handoff is `not_fulfilled`: startup reconciliation now fails a still-accepted handoff of a non-finalized attempt, and recovery still finalizes the attempt with its verdict. Also pins agent-operator-contract to v1.0.1 and adds the Operator Handoff glossary entry. Co-Authored-By: Claude Opus 5.5 <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.
Closes #383 (narrowed scope:
handoff+handoff-crash; the rest is split out to #385).What changes
Harness.
BlockingExecutornow has the same operator seams as the real executor (set_operator_handoff_provider,set_operator_handoff_reporter,operator_request_id). It picks up a pendinghandoff nowat its next poll, reportsdeliveredthenbegun(so a secondhandoff nowis rejected), and ends the attempt with thehandoffoutcome and anoperator_requestHandoff note. The engine's own finalization decidescompletedornot_fulfilled.Engine (
lifecycle.py). Running that path against the realGitWorkspaceexposed two bugs:not_fulfilled. After cleanup returned the tree to the base, the handoff rechecks re-read the note from the working tree and found nothing. The note is still validated on the attempt's tree before release. The post-cleanup rechecks now only apply the 360 s whole-command budget.completedafter recovery. Contract spec §14 requires an interrupted handoff to benot_fulfilled, with partial work retained. Startup reconciliation now fails a still-acceptedhandoff of a non-finalized attempt. Recovery still finishes the attempt's recorded effects and finalizes it with its verdict. The already-finalized replay path is unchanged.Other.
agent-operator-contractis pinned tov1.0.1.uv.lockis gitignored in this repo, so onlypyproject.tomlchanges here.CONTEXT.mdgains the Operator Handoff glossary entry from the brief.Tests
handoffoutcome with anoperator_requestnote, a secondhandoff nowrejected once begun, and no latch without a pending handoff.GitWorkspace: the Operator Handoff completes after cleanup.not_fulfilled, and recovery still finalizes the attempt.handoff nowcompletes, and the crash → restart → recovery sequence endsnot_fulfilled.Verification
uv run pytest: 1962 passed, 10 failed. The same 10 (test_attempt_processes,test_control_offline) also fail onmainlocally (macOS environment). They are unrelated to this change.handoff,handoff-crashandoffline-while-runningpass. The native engine always advertisesoperator-handoff, so in the--capabilities ""variant these scenarios run and pass rather than reporting not-run.producerjob is not green yet:sealed-after-outcome,export-torn-readandhalt-records-last-haltare Producer suite: after-outcome hold, grow-archive lookup and halted event across restart #384.recovery-retry,recovery-releaseanderrors-resetare engine-vs-suite semantic mismatches, not the cascade that Producer suite: sealing under hold, halted event, handoff acknowledgement and agent_unreachable cascade #383 assumed.offline-readsfails on state left by an earlier scenario. All four are tracked in Producer suite v1.0.1: recovery retry, recovery release and errors reset disagree with the engine #385.🤖 Generated with Claude Code