Repository navigation
fix: add confidence gates and evidence accumulation to review-reviewers - #1598
Conversation
Switch review-reviewers from hourly to nightly schedule and add two gates that findings must pass before a PR is created: a confidence gate (requiring multiple occurrences for non-critical issues) and a magnitude gate (requiring more evidence for larger changes). Also caps output to 2 PRs per run. Closes #1597 Co-Authored-By: Claude <[email protected]>
All 3 review sessions in the past window shortcut the codecov step to a single `grep 'codecov'` instead of using the prescribed 5-iteration polling loop. This works only when codecov has already reported — a faster run would report "done" with codecov still pending. Evidence: - Run 23222427261 (PR #1599): `gh pr checks | grep 'codecov'` - Run 23221928911 (PR #1598): `gh pr checks | grep 'codecov/patch'` - Run 23221490674 (PR #1593): `gh pr checks | grep -E 'codecov|...'` Changes: - running-in-ci: Add CRITICAL marker to codecov step, add anti-pattern example showing what NOT to do - review-pr: Explicitly mention codecov polling loop in step 5 instead of relying on indirect delegation to running-in-ci Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
this is overall good. Some changes:
|
…g issues Retain hourly schedule and default lookback window per review feedback. Instead of switching to nightly for more data per run, accumulate evidence across runs using a monthly GitHub tracking issue. Each run reads prior findings from the tracking issue, adds them to its tally for gate evaluation, and records below-threshold findings for future runs. Also reverts unrelated nightly-cleaner change and list-recent-runs.sh lookback window parameter. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Revised — thanks for the direction. Changes in the latest push:
This avoids needing to download artifacts or change the lookback window — each run just reads/writes to a single GitHub issue. The monthly cadence keeps issues from growing unbounded while still carrying evidence forward. Net diff vs main is now just SKILL.md. |
|
to avoid getting notifications for comments to old issues; could it edit a single comment on the issue? |
worktrunk-bot
left a comment
There was a problem hiding this comment.
Unanswered feedback from max-sixty: the "Recording below-threshold findings" section still instructs posting a new comment each run. With hourly runs, that's up to 24 notification-generating comments per day on the tracking issue. The suggestion was to find-and-edit a single bot comment instead of appending new ones — see inline suggestion.
The gates and evidence accumulation design look solid otherwise.
… ones Avoids notification spam from hourly runs by finding and editing the bot's existing comment rather than appending a new comment each time. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Good call — updated. Each run now finds and edits the bot's existing comment on the tracking issue instead of posting a new one. Only creates a comment on the first run; subsequent runs patch it in place via |
| ``` | ||
|
|
||
| Also check last month's tracking issue (if it exists) for recent carry-over. | ||
| Add matching historical occurrences to your tally when evaluating gates. |
There was a problem hiding this comment.
and it should investigate historical cases that look like they might be related; it's unlikely that there's sufficient context in the summary issue
(and the summary issue should contain links to the workflows, so this should be relatively simple to do, albeit laborious)
There was a problem hiding this comment.
Good point — updated. The "Reading historical evidence" section now instructs the skill to download and investigate the actual session logs from linked workflow runs rather than relying on the tracking issue summary alone. Also added a Workflow URL field to the recording format so future runs have a direct link to follow.
When evaluating whether historical tracking entries match current findings, download and inspect the actual workflow session logs rather than relying on the summary text alone. Also adds workflow URL to the recording format for easier access in future runs. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…#1608) ## Summary - Replaces the vague "minimize the range" instruction for multi-line suggestions with a concrete 4-step verification checklist - Addresses the root cause of #1607: the bot constructs suggestion ranges that are wider than the replacement text, silently deleting correct code when applied ## Root cause analysis Investigated all three known cases: 1. **#1310** (PR #1309): `start_line: 18, line: 22` — 5-line range replaced with fewer lines, deleting the `git-wt` fallback branch 2. **#1326** (PR #1322): `start_line: 289, line: 291` — range included a closing ` ``` ` fence that GitHub consumed as the suggestion's own delimiter 3. **#1598**: `start_line: 93, line: 127` — 35-line range replaced with a shorter rewrite, deleting the `gh issue view` code block Common thread: the bot sets a line range covering more content than it intends to replace. The replacement text is shorter, so the surplus lines are silently deleted. The existing instruction ("minimize the range") didn't give the bot a way to verify correctness. ## Fix The new checklist requires the bot to: 1. **Read the exact lines** in the range before posting 2. **Verify no silent deletions** — every line must appear in the replacement or be intentionally removed 3. **Cap range at ~10 lines** — larger suggestions should be split or pushed as commits 4. **Avoid spanning markdown fences** — prevents delimiter collision ## Test plan - [ ] Review a PR with a multi-line suggestion opportunity and verify the bot follows the checklist - [ ] Verify the bot splits or commits changes larger than ~10 lines instead of using a suggestion 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: worktrunk-bot <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
Problem
The hourly review-reviewers workflow was creating too many PRs of insufficient quality (#1597). With 12 PRs in 2 days (many closed/rejected), the signal-to-noise ratio was too low now that the skill instructions have matured.
Solution
Two changes to raise the bar while keeping the hourly schedule:
Confidence and magnitude gates — Findings must meet an evidence threshold before acting. Critical issues (wrong issue closed, data loss) need only 1 occurrence. Medium-confidence findings need 5+. Low/nitpick findings are skipped entirely. The size of the proposed change must also be proportionate to the evidence.
Evidence accumulation via monthly tracking issues — Each hourly run reads prior below-threshold findings from a monthly GitHub tracking issue, adds matching historical occurrences to its tally, and records new below-threshold findings for future runs. This lets patterns emerge over days/weeks without needing to switch to nightly or change the lookback window.
Also caps output to 2 PRs per run max, with below-threshold findings recorded in the tracking issue.
Only file changed vs main:
.claude/skills/review-reviewers/SKILL.md.Testing
cargo clippypassescargo test --lib --binspassesCloses #1597 — automated triage