Repository navigation
Bind a Canonical Sweep Record to the Reviewer's Report Instead of a Typed Count - #4380
Conversation
canonical_review.py record took a caller-typed --findings count, bound to nothing the reviewer produced. It now reads each unit's report with local_review.py's own reader at the path the new report-path command names, keyed by the unit's digest. It refuses a unit whose report is absent or names another digest, records none of its units while any is refused, and stores each report's sha256 beside the derived count. The typed count is gone from the module, the sweep's printed command, the local-strict-review skill, and scripts/README.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A unit digest hashes the unit's text alone, so two units of identical text, which a generated include gives two skills, shared one report path. One reviewer's report could then overwrite the other's, or record a unit whose own reviewer had not finished. The path is now keyed by a hash over the unit key and its digest. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Unit reports shared local_review.py's report prefix, so recording a diff pass pruned every unit report not yet recorded, and left that engine's statement of why it prunes false for them. They now take a prefix of their own, and a canonical record prunes only the unit reports written for text no unit holds any more. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
The prune's keep set built each unit's full path, and each build ran `git rev-parse`, one process per carried unit on every record. The keep set now holds file names from a pure name helper, compared against the directory read once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Active findings remain, including a critical stale-report acceptance bug that can record results before the current reviewer completes, plus duplicated lifecycle logic and repeated git-directory resolution.
3 open issues
What changed in this PR
This pull request binds canonical-content sweep records to reviewer-produced report files instead of caller-supplied finding counts, aligning canonical sweeps with the existing local_review.py report contract.
Changes:
- Adds
report-path, digest validation, report-derived finding counts, andreportSha256ledger entries. - Adds per-unit report naming and pruning that supports identical content across multiple units.
- Updates tests, documentation, and all generated
local-strict-reviewSkill distributions.
| File | Description |
|---|---|
| tests/test_canonical_review.py | Adds coverage for report-backed recording, digest validation, report hashing, pruning, duplicate content, and the revised CLI. |
| scripts/README.md | Documents the updated canonical review commands and reviewer report workflow. |
| scripts/canonical_review.py | Implements report-backed recording, per-unit report paths, validation, hashing, and pruning. |
| .github/skills/local-strict-review/SKILL.md | Updates the generated local-strict-review Skill instructions for the report-backed canonical sweep. |
| .claude-plugin/fleet-skills/skills/local-strict-review/SKILL.md | Updates the generated Claude Skill instructions for the revised canonical sweep workflow. |
| .claude-plugin/fleet-skills/.source-digests/local-strict-review | Updates the source digest for the regenerated local-strict-review Skill. |
| .agents/skills/local-strict-review/SKILL.md | Updates the authored local-strict-review Skill instructions to use reviewer reports during canonical sweeps. |
Review effort: Lite
The sweep brief binds the report to the sweep worktree's git directory but named no worktree to read the unit in. A reviewer starting in another checkout could read other text and still write a report that `record` accepts. The brief now carries the same Worktree line the diff pass's brief does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4380 +/- ##
===========================================
- Coverage 81.60% 79.35% -2.26%
===========================================
Files 26 45 +19
Lines 9070 16046 +6976
===========================================
+ Hits 7402 12734 +5332
- Misses 1668 3312 +1644
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
…, Shared Run Deadline, and Second-Shell Paste-Safe (#4388) Promotes the ten pull requests that landed on develop since the last promotion: backlog burndown round 5, plus #4374 and #4376. - #4374: Quote the last paste-safe placeholders and run the check in the local block (the #1615 remainder). - #4376: Declare host-secrets for HomeAutomation-Config in the registry. - #4378: GOVERNANCE.md "Verification Discipline" requires the whole test suite before every push. The Husky hook bullet says it passes the staged paths to the prose gate. The `pr-review-conduct` Merge Gate names the rate-limit `success` check trap, the only part of #1298 kept per the maintainer's 2026-11-23 answer. - #4379: `validate-task.yml` fails a promotion when main's first-parent chain since the previous promotion holds a single-parent commit, an accidental squash into main. The conflicted-promotion cut and the squash recovery are documented in `branching-and-release-model`, and `drive-pr` points at them. - #4380: `canonical_review.py record` binds each unit's pass to the reviewer's written report rather than a typed `--findings` count. - #4381: Every argument refusal in the `host-setup/linux` scripts exits 64 through `die_usage`, and an EXIT trap maps a stray 64 to 1. The contract is stated in CODESTYLE.md "Command-Line Arguments". - #4382: The prose gate's `paste-safe` rule reads the string handed to `su`/`runuser -c`, a POSIX shell's `-c`, and `ssh`. This edits `host-setup/agent-safety/README.md` (two example loops only), which the maintainer approved and merged on 2026-11-24. - #4384: `upstream-contribution-workflow` says what a refused lease push on the dirty branch means. `audit-a-repo` carries the convention-layout note on its `--checkout` path. - #4385: Every timed captured run in the review and install tooling goes through one shared `scripts/run_deadline.py`, so a captured timeout holds its deadline on Windows. - #4386: The canonical `.editorconfig` sets every IDE code-style rule to `warning`, per the maintainer's strictest-defaults answer, and the `dotnet-codestyle` skill now agrees with the rules it enforces. ## Owed by the maintainer before rollout - A fleet resync is owed, because carried text changed: GOVERNANCE.md, CODESTYLE.md, `.editorconfig`, the reusable `validate-task.yml`, and several skills. - Every carrying C# repository has to fix its code at its next `.editorconfig` resync (#4386). The rules likely to fire most are IDE0058, IDE0046, IDE0210, IDE0290 and IDE0047/IDE0048. - HomeAutomation-Config#1466 can adopt the exit-64 contract once this is released. - #4379 keeps the `048a442f` floor your decision named, but the walk always stops at a later promotion merge, so the floor is never reached. Whether to drop it is your call. Fixes #1615 Fixes #2280 Fixes #3820 Fixes #1298 Fixes #2510 Fixes #4373 Fixes #3804 Fixes #3605 Fixes #4375 Fixes #4345 Fixes #3854 Fixes #1842 🤖 Generated with [Claude Code](https://claude.com/claude-code)


Summary
scripts/canonical_review.py recordtook a caller-typed--findingscount for each carried-content sweep pass. That count was bound to nothing the reviewer produced, the defect #3699 removed fromscripts/local_review.py record. This applies the maintainer's answer on decision #3815 (option 1): bind each sweep pass to the reviewer's report file, reusinglocal_review's report reader rather than duplicating it.recorddrops--findings. For each--unit, it reads the report withlocal_review.read_report, against the full unit digest.scripts/local_review.pyis unchanged.local_review.py's own, under acanonical-review-report.prefix of its own. That engine's prune therefore never deletes a unit report not yet recorded. The name is keyed by a sha256 over the unit key and its digest, since a generated include gives several skill sections identical text, and so one digest. The hex key also keeps the colon ofsha256:out of the file name, which Windows does not allow. A record prunes only the unit reports written for text no unit holds any more.findingscount and the report'sreportSha256, the fieldlocal_review.py's receipt already uses.report-path --unit '<key>=<digest>'subcommand names each unit's report path as JSON. It refuses an unknown unit or a moved digest before a reviewer spends a pass on it.local-strict-reviewSkill's "The Carried-Content Sweep" (its brief now carries the report contract), its generated copies, andscripts/README.md.--findings, andreport-path.reports/canonical-review.jsonis not touched. Entries recorded from now on carry one addedreportSha256key, and no reader of the ledger checks its keys beyondunitanddigest.Open findings from the local pass (edit budget spent)
scripts/canonical_review.pyprune_unit_reports,introduced: the keep set callsunit_report_pathonce per carried unit, and each call runslocal_review.git_dir, onegit rev-parseper unit on every record. Fixed: the keep set now holds file names from a pureunit_report_name, and the directory is read once.scripts/canonical_review.pyunit_report_pathandprune_unit_reports,introduced(design, reuse before building): they mirrorlocal_review.report_pathandlocal_review.prune_reportswith another prefix rather than extending them. Declined. Extending them means editingscripts/local_review.py, which a concurrent change holds and which this one reuses unchanged by design. The report contract itself,local_review.read_report, is reused, which is what decision Decide: Should canonical_review.py record Bind a Sweep Pass to the Reviewer's Report Rather Than a Typed Count #3815 asked for. What is mirrored is a one-line path join and a three-line glob loop with a different keep rule, a set of current units against one path..agents/skills/local-strict-review/SKILL.md"The Carried-Content Sweep" brief,introduced: this change bound the report to the sweep worktree's git directory, but the brief named no worktree to read the unit in. So a reviewer starting in another checkout could read other text and still write a reportrecordaccepts. Fixed: the brief carries the sameWorktree:line the diff pass's brief does.Closes on promotion: #3804
🤖 Generated with Claude Code