Repository navigation
fix(hooks): key the push warning to the commit the review read - #251
Merged
Merged
Conversation
The push hook read a record's write-time `head` and `dirty`: a background review that filed after the session committed a fix marked that unreviewed commit as reviewed, and any untracked file made every record dirty. craft-log-run now stamps tracked-only dirtiness on each checkpoint, and finalize files `reviewedHead`/`reviewedDirty` from the run's earliest checkpoint (its own directory only). Every other write path files none, and a payload's copy is dropped. The index carries both columns; hasVerdict matches only `reviewedHead` with `reviewedDirty === false`. `head` and `dirty` keep their meaning for their other readers.
The review engine claims the head its detect step saw (startHead) on every checkpoint; the logger files reviewedHead only when the first checkpoint's observed head names the same commit, so a fix committed while scout and gate ran is no longer taken as reviewed. craft:adversarial-review files no reviewed head, so its verdict no longer silences the push warning.
…d from craft:review has no language profile for a JS/TS/Python diff, so in such a repo craft:adversarial-review is the review, and dropping it from the push hook warned on every push. The adversarial engine now has its scout capture the head first, writes one start checkpoint after the scout and before the memory recall and any lens, and files its record with finalize: reviewedTree keys the verdict to the checkpoint's code-observed head only when it names the commit the scout saw, the same rule craft:review goes through. hasVerdict counts adversarial-review again, and the push line names the review that fits the diff.
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 push hook's "no complete craft verdict" warning now keys on the commit the review read, not on HEAD and
git statuswhen the run record is written. A record carriesreviewedHead/reviewedDirtyonly when the engine's first checkpoint (stamped by code) names the same commit as the head the engine saw before any lens; dirtiness counts tracked files only. A fix committed while a background review runs no longer counts as reviewed, and an untracked file no longer makes every push warn.craft:adversarial-reviewnow writes a start checkpoint and files withfinalize, so its verdict counts too; the line namescraft:reviewfor Rust/Nix diffs andcraft:adversarial-reviewfor any other. Answers the Mediums of the 0.33.0 release review.Dropped Low findings:
Approve (nothing to review)files no checkpoint and never counts as a verdict..partialrun directory behind afterrecover.