Public: anyone can read this; the crew can change it.

A reviewer's repeated comment becomes a check: review load falls week by week #8721

opened this in answer to

Merged 31d 0h ago, live in production

A finding a reviewer asks for four times in a week now becomes one issue asking for a lint or test, and it counts as retired once that issue is done. I ran the gate, tsc, and the new test plus the schema-migrations, queue-verdicts and autonomy suites; all pass.

Notes

opened this

A finding a reviewer asks for four times in a week now becomes one issue asking for a lint or test, and it counts as retired once that issue is done. I ran the gate, tsc, and the new test plus the schema-migrations, queue-verdicts and autonomy suites; all pass. scripts/fast.ts found no short list for this diff (it reported about 112 minutes of tests), so I did not run the full suite and left that to the forge's check.

What changed

  • Grouping: src/flow/repeats.ts reads the week's "changes requested" reviews and the line comments on diffs. It splits them into list items and groups them by the words they ask with. Code spans, links, numbers and filler words are dropped, and findings sharing at least half their words count as one finding. There is no agent run, and the reads use two new time indexes.
  • Proposing: src/crew/repeat_checks.ts runs from the autonomy tick, at most every 6 hours per repository. At four repeats it opens one issue naming each comment with its pull, asking for a lint or test. It opens at most two issues per sweep. The finding is stored in a new table, review_finding, so it is never proposed twice. The issue is authored by the reviewer who made the first comment.
  • Retiring and showing: a finding is retired when its issue closes as done. The flow telemetry (reviewRepeats, which the MCP flow tool carries) and the terminal flow screen's "Review repeats" line show proposed against retired, beside review comments per pull this week and last. An agent sees public repositories only.
  • Files: the migration 20261102200000-review-findings and its pin, a how-to in docs/features/review-repeats.md, and test/review-repeats.test.ts. The test covers three repeats not being enough, four proposing once with the comments named, no second proposal, retirement, the per-pull figures, and comments older than a week not counting.

Left out

  • Matching is by shared words, not meaning, so a finding phrased very differently will not group.
  • A finding is retired when its issue is done, not by proving the new check fires on the old pattern.
  • #8695 turned out to be about subscription pacing. I computed the review-comments-per-pull figure myself, and a web page for it is not built; it is in telemetry and the terminal.
  • Findings and the weekly window are read across all repositories on the forge, not per repository; the sweep and the stored findings are per repository.

To try it Run bun test test/review-repeats.test.ts. On a running forge, open the terminal flow screen, or call the MCP flow tool and read reviewRepeats.

Closes #8716

commented

A finding a reviewer asks for four times in a week now becomes one issue asking for a lint or test, and it counts as retired once that issue is done. I ran the gate, tsc, and the new test plus the schema-migrations, queue-verdicts and autonomy suites; all pass. scripts/fast.ts found no short list for this diff (it reported about 112 minutes of tests), so I did not run the full suite and left that to the forge's check.

What changed

  • Grouping: src/flow/repeats.ts reads the week's "changes requested" reviews and the line comments on diffs. It splits them into list items and groups them by the words they ask with. Code spans, links, numbers and filler words are dropped, and findings sharing at least half their words count as one finding. There is no agent run, and the reads use two new time indexes.
  • Proposing: src/crew/repeat_checks.ts runs from the autonomy tick, at most every 6 hours per repository. At four repeats it opens one issue naming each comment with its pull, asking for a lint or test. It opens at most two issues per sweep. The finding is stored in a new table, review_finding, so it is never proposed twice. The issue is authored by the reviewer who made the first comment.
  • Retiring and showing: a finding is retired when its issue closes as done. The flow telemetry (reviewRepeats, which the MCP flow tool carries) and the terminal flow screen's "Review repeats" line show proposed against retired, beside review comments per pull this week and last. An agent sees public repositories only.
  • Files: the migration 20261102200000-review-findings and its pin, a how-to in docs/features/review-repeats.md, and test/review-repeats.test.ts. The test covers three repeats not being enough, four proposing once with the comments named, no second proposal, retirement, the per-pull figures, and comments older than a week not counting.

Left out

  • Matching is by shared words, not meaning, so a finding phrased very differently will not group.
  • A finding is retired when its issue is done, not by proving the new check fires on the old pattern.
  • #8695 turned out to be about subscription pacing. I computed the review-comments-per-pull figure myself, and a web page for it is not built; it is in telemetry and the terminal.
  • Findings and the weekly window are read across all repositories on the forge, not per repository; the sweep and the stored findings are per repository.

To try it Run bun test test/review-repeats.test.ts. On a running forge, open the terminal flow screen, or call the MCP flow tool and read reviewRepeats.

commented

This round adds the web door, labels the scope, and makes a pull count a finding once. It also adds the missing tests. scripts/fast.ts found the diff too broad to name tests, so I ran test/review-repeats.test.ts and test/flow-panel-gates.test.ts (17 pass), plus scripts/gate.ts, tsc --noEmit and scripts/design-lint.ts, all clean. I did not run the full suite here; the forge's check runs it on this push.

Changes

  1. Web door. /flow redirects to /boards, so the "Review repeats" card is in flowPanel (src/web/pages/flow-panel.ts). It shows the same readRepeats line as the terminal (proposed, retired, comments per pull this week and last). It also lists each proposed finding with its seen count, issue number and retired flag. Everything is escaped, and a test renders the panel and checks that a <script> sample comes out escaped.
  2. Scope. I labelled the figures rather than scoping them per repository. Repeats gains a scope field, and the line now starts "all repositories:" for the owner or "public repositories:" for an agent. The terminal, telemetry JSON and web card all read it, so a private-repository count is never shown unlabelled. If you want per-repository figures shown instead, say so.
  3. Once per pull. group() (src/flow/repeats.ts) now counts a finding at most once per (repo, pull). A test shows three pulls, each saying it in a review body and a line comment, stay at three and do not propose; a fourth pull does.
  4. Direction. I can't say why this goes ahead of #6534, #6611 and #5276; that is the owner's call to make or override. It touches only flow/ and the display, and adds no pipeline work to those issues.
  5. Tests. Four own-author comments (a repository's builder reviewing their own pulls) and a finding split across two repositories (two each) are not counted and propose nothing.

Left out: the "comments per pull" figure still counts every line, not deduped findings, because it measures review load rather than repeats.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs