Tie reviews to the exact reviewed version with a fingerprint - #42
Merged
Merged
Conversation
scripts/lib/fingerprint.sh computes a content fingerprint of the working tree or of an explicit set of paths, including uncommitted and untracked changes and excluding review and triage artifacts. Committing unchanged content keeps it; changing a covered file changes it. review-feature.sh records it as reviewed_tree (and reviewed_paths for a file-set review). triage-review.sh and apply-triage.sh refuse a stale review before starting an agent, and check-review.sh reports whether a review is current. Agent runs also detect changes to the artifacts that fingerprints leave out. Closes #38 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed
scripts/lib/fingerprint.sh: the Git tree hash of the current file contents, for the whole working tree or an explicit set of paths (files, directories, symlinks). Uncommitted and untracked changes count; ignored files count only when Git tracks them; review and triage artifacts never count. It depends on content, not commits.review-feature.shrecords the fingerprint asreviewed_tree, andreviewed_paths(null for a whole-tree review). Review artifacts acceptreviewed_paths.triage-review.shandapply-triage.shrefuse a stale review before starting an agent.scripts/check-review.sh <review-json>: exit 0 when current, 1 when stale, 2 on an error. Ready forfinish-planning.shin wave 4.docs/development.mdexplains when a review becomes stale.tests/fingerprint-test.sh; test fixtures now carry real fingerprints, and the triage and apply-triage suites cover stale reviews.Issue / acceptance criteria
Closes #38
Risk
Verification evidence
./scripts/verify.shpassed (10 checks)Independent review: Codex (
gpt-6-astra) through the isolated read-only profile. CHANGES REQUIRED:check-review.shreported the new review as current right after it was written. Not re-reviewed after the fixes.Agent involvement
Planner: —
Implementer: Claude (Opus 5.5)
Reviewer: Codex (gpt-6-astra)
Production impact
None.
🤖 Generated with Claude Code