Skip to content

fix(review): record autonomous review stats outside the working tree - #106

Merged
devondragon merged 2 commits into
mainfrom
fix/review-stats-autonomous-local
Oct 13, 2026
Merged

devondragon merged 2 commits into
mainfrom
fix/review-stats-autonomous-local

Conversation

@devondragon

Copy link
Copy Markdown
Owner

An autonomous review now leaves the working tree unchanged. Before this, ccm-review-route --record modified the tracked context/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 as merge-conflict (the merge raced the push) and AIE-351 twice as review-not-clean.

Changes:

  • bin/ccm-review-route: --record ... --local writes to ccmagic/review-stats.json in the git common directory, which every worktree of the clone shares and no commit can pick up. Routing and the gated list from --record read the sum of both files, and a bad file is reported and its counts ignored. The output has local_stats_file, plus tree_stats_file on a --local record.
  • hooks/pre-tool-use-guard.sh: denies an autonomous --record without --local.
  • skills/review/SKILL.md step 7d and agents/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 regenerated tests/every-ticket-since-baseline.diff.
  • Version 3.20.5, with CHANGELOG and README.

Counts already committed in context/review-stats.json still count. New counts from autonomous runs build up on the Cyrus host only.

Verified: bash tests/run.sh passes (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-only in a quiet window (no restart needed; no new skill, agent, or config key).

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.
@devondragon
devondragon merged commit 800b96d into main Oct 13, 2026
2 checks passed
@devondragon
devondragon deleted the fix/review-stats-autonomous-local branch October 13, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant