Skip to content

story-082: A run commits the history it writes - #80

Merged
jerodw merged 2 commits into
mainfrom
story/story-082
Aug 28, 2026
Merged

story-082: A run commits the history it writes#80
jerodw merged 2 commits into
mainfrom
story/story-082

Conversation

@jerodw

@jerodw jerodw commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Story

A run commits the history it writes.

.harness/history/execution-log.jsonl is versioned and append_event is 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

  • _complete appends its story-completed record before the commit it leaves, matching _escalate, the budget stop and _pause.
  • The three-way staging choice ("The completion commit survives any merge", story-065) still turns on what the stages left: stages_left_work is 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-paused and resumed joined the log's event/status enums, 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 under orchestration/ changed to carry either kind.
  • The story-065 completion cases now run with a history directory established (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 on the working tree: 3710 passed (suite-run-result.json, exit 0)
  • Suite in a fresh clone with the story committed: 3710 passed (clean-clone-result.json, exit 0)
  • Verification: passed, no blocking issues (verification-result.json)
  • 16 tests written; new module tests/test_a_run_commits_the_history_it_writes.py, including a planted-inversion control that requires each assertion to catch an inverted ordering
  • 0 retries

Note

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

jerodw and others added 2 commits August 28, 2026 15:01
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
@jerodw
jerodw merged commit b0f093d into main Aug 28, 2026
3 checks passed
@jerodw
jerodw deleted the story/story-082 branch August 28, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant