story-082: A run commits the history it writes - #80
Merged
Conversation
Implemented by the l5 harness story workflow.
This run executed the coordinator as it stood before the story landed, which appended the completion record after the completion commit, so no step in the run staged it. Committed by hand here for the last time: with the story's change in place the next run's completion commit carries its own record. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkujNrgMcsRBFWNEKWYnmA
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.
Story
A run commits the history it writes.
.harness/history/execution-log.jsonlis versioned andappend_eventis its only writer, with nothing later in a run staging anything. A terminal path that commits and then appends therefore exits with its own record untracked — observed on story-081's branch, whose completion line had to be committed by hand (419c16a).Change
_completeappends itsstory-completedrecord before the commit it leaves, matching_escalate, the budget stop and_pause.stages_left_workis read from the index before the append and held, then the tree is re-staged to sweep the record in. Without that, a staged history line would make the tree dirty on every completion and the amend arm would never be reachable again.capacity-pausedandresumedjoined the log'sevent/statusenums, so a paused-then-resumed run is distinguishable from an uninterrupted one. This was the first exercise of story-081's claim that adding a kind is a schema edit and nowhere else — no file underorchestration/changed to carry either kind.complete(..., history=True)); they were passing under conditions no real run has. The two cases whose subject is an empty commit stay without one, deliberately.Evidence
suite-run-result.json, exit 0)clean-clone-result.json, exit 0)verification-result.json)tests/test_a_run_commits_the_history_it_writes.py, including a planted-inversion control that requires each assertion to catch an inverted orderingNote
The final commit is story-082's own execution record, staged by hand: this run executed the coordinator as it stood before the fix. With the change in place, the next run's completion commit carries its own record.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HkujNrgMcsRBFWNEKWYnmA