story-123: A run invoked from a worktree creates its worktree where the repository's other trees already stand - #191
Merged
Merged
Conversation
…ere the repository's other trees already stand
…he repository's other trees already stand Implemented by the l5 harness story workflow.
# Conflicts: # .harness/history/execution-log.jsonl # .harness/history/inspection-log.jsonl
The schema still described the old default, a sibling of whatever tree the harness was invoked in — which from a worktree names the nested path this story exists to stop producing. The architecture note credited story-118 with primary_root and said it is what makes the outbox queue one per repository. This story added it, and the queue reaches its answer by its own route. The docstring justified the function by the queue for the same reason. Found by this story's own post-story inspection, filed as 188, 189 and 190. 189 is the duplicated derivation and is left to a story of its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019WkxmJ5ArLEaC2RDPGkbRU
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 invoked from a worktree creates its worktree where the repository's other trees already stand.
orchestration/worktrees.pyheld two derivations of where repository-level state lives, and they disagreed about which tree the repository is.primary_rootasks git for the common directory, so it answers with the repository's primary working tree whichever tree it is asked from — that is what makes the outbox queue one per repository.worktree_root, withworktree_dirunset, answered with the sibling of whichever tree it happened to be asked from.So a run started from inside a worktree created its new worktree beside that one, nesting trees, instead of putting it where the repository's other trees already are. The two answers now come from one rule.
Evidence
tests/test_a_run_creates_its_worktree_beside_the_others.py(374 lines); 7 files changed, +557 / −6A question this raises that no standard answers
Story-123 uses
primary_root, which story-118 added, and story-123 was planned before story-118 merged.The verifier checked the bytes and they are fine: a diff of
orchestration/worktrees.pyagainstmainshows only this story's own hunks — theDEFAULT_SUFFIXcomment, theworktree_rootdocstring, and the two-line expression — so the imported function's body matchesmain's exactly.What it could not settle is the practice: whether a story building on a sibling that has not yet landed is something this repository sanctions. Nothing in
.harness/standards/speaks to it, and it has not come up before because stories have been run one at a time. It is worth deciding now that several are planned and unrun at once.Notes for review
The second
unverifiednote is narrower: two end-to-end absence assertions were not shown to fail by driving the pre-story behaviour, so their falsifiability is argued from reading rather than demonstrated.🤖 Generated with Claude Code
https://claude.ai/code/session_019WkxmJ5ArLEaC2RDPGkbRU