Make a dispatched stage's output file the completion signal#12
Draft
Pijukatel wants to merge 1 commit into
Draft
Make a dispatched stage's output file the completion signal#12Pijukatel wants to merge 1 commit into
Pijukatel wants to merge 1 commit into
Conversation
An orchestrator could report stage agents as still running while their output files were already written, stalling the run until a human nudged it (#8). The spec never said how dispatch completes. Stage dispatch now prefers blocking dispatch and treats the stage's output file on disk as the authoritative completion signal everywhere, including parallel reviewer fan-outs: presence is the floor, formats with a terminal marker also require it, and overwrite-in-place re-dispatches compare a content hash recorded at dispatch time. A Hard rules pin forbids claiming a stage is still running without checking disk first, and a contract test anchors the rule. Closes #8 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C7GxHEth3pHrT2EFeytsaq
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 we're solving
Issue #8: on harnesses that dispatch subagents in the background, the orchestrator could report the verify/explore stages as still running while their output files were already written to
.shepherd/— the run stalled until a human nudged it. The spec never said how a stage dispatch completes, so this failure was fully spec-compliant.How
VERDICT:line) also require it, so a parallel round completes only when every reviewer's file is present and carries its verdict. Overwrite-in-place re-dispatches (architect revision, criteria re-run) compare a content hash recorded in_progress.mdat dispatch time — never mtime/size alone. Disk is checked before any status claim, on every turn, not only at resume; no idle-polling machinery.test_dispatched_stage_completion_is_disk_basedanchors the durable phrases (shown red against the unmodified spec, green after).Alternatives considered
Run evidence (shepherd pipeline)
python -m pytest tests/ -q→ 1 failed, 86 passed — baseline-consistent (the 1 failure is pre-existing and environmental: the active shepherd run's own gitignored.shepherd/config.jsontripstest_repo_does_not_duplicate_shipped_config_files; baseline before the change was 1 failed / 85 passed, the +1 pass is the new contract test). SKILL.md at 444/450 lines.Closes #8
🤖 Generated with Claude Code
https://claude.ai/code/session_01C7GxHEth3pHrT2EFeytsaq
Generated by Claude Code