Repository navigation
fix(review): record autonomous review stats outside the working tree - #106
Merged
Merged
Conversation
An autonomous review left context/review-stats.json modified, and the session committed it after the review. That moved the PR head off the commit the review names, so Reeve parked AIE-321 and AIE-351. ccm-review-route --record --local writes the counts to the git common directory, routing sums both files, the review skill and auto-review agent pass --local in autonomous runs, and the guard hook denies an autonomous --record without it.
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.
An autonomous review now leaves the working tree unchanged. Before this,
ccm-review-route --recordmodified the trackedcontext/review-stats.json. Cyrus's Stop hook does not let a session end with a dirty tree, so the session committed and pushed the file after hand-off. That moved the PR head off the commit the review names, and Reeve parked the PR: AIE-321 asmerge-conflict(the merge raced the push) and AIE-351 twice asreview-not-clean.Changes:
bin/ccm-review-route:--record ... --localwrites toccmagic/review-stats.jsonin the git common directory, which every worktree of the clone shares and no commit can pick up. Routing and thegatedlist from--recordread the sum of both files, and a bad file is reported and its counts ignored. The output haslocal_stats_file, plustree_stats_fileon a--localrecord.hooks/pre-tool-use-guard.sh: denies an autonomous--recordwithout--local.skills/review/SKILL.mdstep 7d andagents/auto-review.md: autonomous runs pass--local.tests/run.sh: tests for a clean tree after--local, sharing across worktrees, the summed gating, a bad local file, and the guard. Also the updated hooks-since-baseline expectation and the regeneratedtests/every-ticket-since-baseline.diff.Counts already committed in
context/review-stats.jsonstill count. New counts from autonomous runs build up on the Cyrus host only.Verified:
bash tests/run.shpasses (394 tests).Deploy after merge:
docker exec cyrus git -C /home/cyrus/.cyrus/user-skills-plugin fetch --tags && docker exec cyrus git -C /home/cyrus/.cyrus/user-skills-plugin pull --ff-onlyin a quiet window (no restart needed; no new skill, agent, or config key).