story-012: Add retry-history.json, the backward-looking record of each attempt - #15
Merged
Conversation
…h attempt 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.
Summary
The harness writes
retry-guidance.json, which looks forward: it tells the next implementer attempt what to fix. Nothing looked backward. When a run had retried twice, no artifact said what each attempt tried and why it failed — that had to be reconstructed by readingevents.logbeside the archived directories.This story adds
retry-history.json: one entry per retry actually taken, naming the attempt that failed, the blocking issues as the verifier recorded them, the stage execution was rerouted to, the guidance that attempt produced, and where its artifacts were archived.It is deliberately none of the three things it sits beside. Not
retry-guidance.json, which addresses the next attempt. Not theattempts/archive, which holds the evidence itself rather than an index of it. Notexecution-history.json, which is a chronological stream where a retry is one entry among many. A run that never retries produces no file at all — not an empty array — so its absence is itself evidence.Changes
schemas/retry-history.schema.json(new) — the artifact's shape.attempt,blocking_issues,retry_stageandarchive_directoryare required; guidance is optional, because a retry can be routed with no verifier guidance behind it — a clean-clone failure follows a passing verdict.schemas/manifest.json— the new schema declared in the inventory story-013 had just moved out oftests/. First use of that mechanism: adding a schema now touchesschemas/only.orchestration/story_coordinator.py—append_retry_recordwrites one entry in the retry branch, beside the existingarchive_attemptcall, so the entry and the archive it names are produced at the same point. Nothing reads it back to route.tests/test_story_012_validation.py(new, tester stage) — 44 tests covering the entry shape, the one-entry-per-retry correspondence, the no-file-without-a-retry case, and schema conformance..harness/docs/ARCHITECTURE.md— the artifact, its place beside the other three, and the rule that it is evidence rather than state.Testing
796 passed, verified twice by the harness in two environments:test-results.json: 796 run, 796 passed, 44 new.clean-clone-result.json:exit_code: 0,796 passed,python_version: 3.10.20— the suite re-run in a fresh clone with the story committed, on the oldest Python CI tests.Notes for review
append_retry_recordreadretry-guidance.jsonoff the run-directory root unconditionally. Nothing ever removes or supersedes that file, so an entry could carry guidance written for a different attempt — the acceptance criterion says each entry carries the guidance written for the attempt that follows it. The verifier found this by reading the write path rather than by a failing test, and the retry was scoped to two files. Second iteration passed with zero blocking issues.changed-files.jsonlist nothing undertests/; it liststests/test_story_013_validation.pyas modified. Three story-013 assertions resolved their "after" state from the working tree, so adding a schema file broke them. The verifier judged the edit forced rather than convenient, inspected it directly, and carried the finding into the final verdict as unresolved rather than dropping it between iterations.retry-history.json. Its retry was routed by a coordinator that did not yet contain the feature — the same shape as story-014, which could not exercise its own clean-clone check. All artifact-shape evidence comes from the tests rather than from a live run, which the verifier recorded explicitly. story-012's own retry will be the first one the artifact could have described, and the next retried run is where it gets exercised for real.ARCHITECTURE.md. It inspected the repointing directly instead, so correctness does not rest on that attribution.🤖 Generated with Claude Code