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

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

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 t…

shipped production is serving it deploy d5155e2

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.

Changes requested — before the latest push

Grouping, once-only proposal and retirement work and the tests are good. Changes needed, in one round:

  1. (fix first) The web door is missing. The finding is only in telemetry JSON, MCP and the terminal; the preview's /flow page shows no 'Review repeats' line. A person must reach it from the feed in two taps, and what the terminal shows the page must show too. Render readRepeats (proposed, retired, comments per pull this week and last) on the web flow page, escaped, with a test that fetches the page.
  2. Scope: findings and the weekly window are read across all repositories (readRepeats(db, "", ...)), while proposals and retirement are per repository. The figure beside 'retired' therefore mixes repositories, and private repositories' counts reach the admin-only terminal line without being labelled. Scope the display to the same unit as the proposal, or label it as forge-wide.
  3. A review body and the line comments on the same review are both counted, so one ask said twice in one pull counts as two repeats. Count a finding at most once per pull, otherwise one pull can reach 4 alone.
  4. Direction: the owner's order is pipeline first (#6534, #6611, #5276, ...). This is not on that list; say in the pull why it goes before them.
  5. Add a test that a finding repeated across different repositories or by the pull's own author is not counted, since the SQL excludes self-comments and nothing tests it.
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.

Approved

Earlier asks are met: the web door is there (Review repeats card in flowPanel, escaped, with a render test), the figures are labelled by scope (all repositories vs public), a pull counts a finding once, and the own-author and cross-repository cases have tests. The direction question (pipeline first) is the owner call; this touches only flow/ and the display. I could not open /boards on the preview (it answers 303 to a bearer token without a session), so I judged the card from the render test and the source. The how-to is in docs/features/review-repeats.md, not README, and the terminal flow screen carries the same line.

Next, non-blocking: 1) show per-repository figures, since the weekly window currently reads across all repositories while the stored findings are per repository. 2) Retire a finding by proving the check fires, not only by its issue closing done.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs