story-037: A stage's baseline is what that stage first found - #34
Merged
Conversation
Implemented by the l5 harness story workflow.
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.
The revert check asks whether an implementer's edits under
tests/were forced, by restoring them and re-running the suite. Its baseline was captured per stage per attempt, so on a retry the baseline already contained the previous attempt's edits: restoring them changed nothing, the suite passed, and the check reported "not forced" about edits it never removed.story-036 hit this. Its retry never touched the four files it was refused for, and the same four had been correctly permitted on attempt 1 by the same check. Nothing about the work changed between the two verdicts — only the baseline did.
What changed
The baseline is keyed by stage alone:
Keyed on the stage, not the story: the implementer is stage 0, so its first baseline happens to be the pre-story tree, but that is a coincidence of ordering and the derivation does not depend on it.
The merge rule, which is better than what the request asked for
The request proposed reusing the first attempt's directory wholesale. That would have traded one defect for another, and the story found it: a re-entry must also capture paths that did not exist at first capture — a file the tester created since — because
_build_clonedeletes a governed path the baseline does not hold. Reusing the earlier directory whole would delete it and pass, escalating a repair it should permit.So the capture merges per path: a path the baseline already holds keeps the content it was first captured with; a path new since the last capture is added at its current content.
test_reusing_the_earlier_capture_whole_would_have_deleted_that_pathis the control, and it demonstrates the failure rather than describing it.Verification
1907 passed, 29 written; verification passed first iteration, no retries; clean-clone green with the story committedtests/were permitted by the revert check — the suite fails with them revertedNote for whoever resumes story-036
Existing run directories hold attempt-keyed baselines (
stage-baseline/implementer-attempt-1,-attempt-2) and nothing migrates them. A resumed run finds nostage-baseline/implementer, captures a fresh one from a tree that already holds the accumulated edits, and reproduces the vacuity this story fixes — on the one run that motivated it.The migration is mechanical and matches the merge rule: take
implementer-attempt-1, then add any path present only inimplementer-attempt-2. Worth doing by hand before resuming story-036 rather than discovering it as a second spurious escalation.🤖 Generated with Claude Code