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

A reviewer judges a pull by its issue and the direction's rules, not by where… #16514

Merged opened this in answer to

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

Merged

The review brief now judges a pull by its issue and the direction's rules, not by where the issue stands in the order. A repeated review comment that cites the direction now raises one owner line instead of a lint issue. I ran the two test files I changed and tsc --noEmit, and both are green.

Notes

shipped production is serving it deploy f411bbe

opened this

The review brief now judges a pull by its issue and the direction's rules, not by where the issue stands in the order. A repeated review comment that cites the direction now raises one owner line instead of a lint issue. I ran the two test files I changed and tsc --noEmit, and both are green. scripts/gate.ts --fix rewrapped comments in two files and I committed that. I did not run the full suite; the forge's check does that on the push.

What changed

  • Brief (src/crew/brief.ts): the line reads "True to its issue and the direction: it does what the issue asked, and breaks none of the direction's rules, and the preview shows it working." It is followed by "The direction's order says what starts first; it is not a ground for a change request." I added "and the preview shows it working", which the issue's sentence doesn't have, to keep the existing preview check. A test in test/crew-review-rounds.test.ts pins both sentences and that the old "nothing the direction did not" wording is gone.
  • Direction read at review time: the reviewer's brief is built from the repository row read when the review run starts, and a review never resumes an older session (resuming: !reviewing && … in src/crew/runner.ts). I made no runner change. A new test changes the direction and shows the next review brief carries the new text and none of the old.
  • Where the old text came from (#16207, #16208, #16209, #16212): I found no cache and could not confirm the cause. The likely explanation is reviews that were already queued or running when the direction changed, because each carries the direction as it stood when its run began. Reviews started after the change would read the new text. I did not check the run times of those four reviews.
  • Repeated findings (src/flow/repeats.ts, src/crew/repeat_checks.ts):
    • A group of findings counts as being about the direction when most of its findings mention "direction" or "the owner's order/shares".
    • A group like that opens no "automate this finding" issue. sweepRepeats instead adds one comment on the repository's direction issue, with a sample and a link to settings#f-direction. It posts at most one such comment a week. A test covers this.

What I chose not to do

  • No schema change. The weekly limit is kept by looking for the earlier comment on the direction issue.
  • A repository with no direction issue gets no owner line.
  • I did not trace the #16207–#16212 runs to a specific start time.
  • I called no existing function from scripts/similar.ts and did not run it. The new code reuses addComment, listComments and WEEK_MS.

To try it: bun test test/review-repeats.test.ts test/crew-review-rounds.test.ts.

🤖 Generated with Claude Code

Closes #16250

commented

The review brief now judges a pull by its issue and the direction's rules, not by where the issue stands in the order. A repeated review comment that cites the direction now raises one owner line instead of a lint issue. I ran the two test files I changed and tsc --noEmit, and both are green. scripts/gate.ts --fix rewrapped comments in two files and I committed that. I did not run the full suite; the forge's check does that on the push.

What changed

  • Brief (src/crew/brief.ts): the line reads "True to its issue and the direction: it does what the issue asked, and breaks none of the direction's rules, and the preview shows it working." It is followed by "The direction's order says what starts first; it is not a ground for a change request." I added "and the preview shows it working", which the issue's sentence doesn't have, to keep the existing preview check. A test in test/crew-review-rounds.test.ts pins both sentences and that the old "nothing the direction did not" wording is gone.
  • Direction read at review time: the reviewer's brief is built from the repository row read when the review run starts, and a review never resumes an older session (resuming: !reviewing && … in src/crew/runner.ts). I made no runner change. A new test changes the direction and shows the next review brief carries the new text and none of the old.
  • Where the old text came from (#16207, #16208, #16209, #16212): I found no cache and could not confirm the cause. The likely explanation is reviews that were already queued or running when the direction changed, because each carries the direction as it stood when its run began. Reviews started after the change would read the new text. I did not check the run times of those four reviews.
  • Repeated findings (src/flow/repeats.ts, src/crew/repeat_checks.ts):
    • A group of findings counts as being about the direction when most of its findings mention "direction" or "the owner's order/shares".
    • A group like that opens no "automate this finding" issue. sweepRepeats instead adds one comment on the repository's direction issue, with a sample and a link to settings#f-direction. It posts at most one such comment a week. A test covers this.

What I chose not to do

  • No schema change. The weekly limit is kept by looking for the earlier comment on the direction issue.
  • A repository with no direction issue gets no owner line.
  • I did not trace the #16207–#16212 runs to a specific start time.
  • I called no existing function from scripts/similar.ts and did not run it. The new code reuses addComment, listComments and WEEK_MS.

To try it: bun test test/review-repeats.test.ts test/crew-review-rounds.test.ts.

🤖 Generated with Claude Code

Approved

Approved. The brief line now judges by the issue and the direction's rules and says order is no ground for a change request. Direction-citing repeats raise one owner line a week instead of a lint issue. Both are tested, and no page or terminal surface is touched. Two things I would do next:

  1. Narrow citesDirection in src/flow/repeats.ts. A bare \bdirection\b also matches findings like 'flex-direction' or 'text direction'. A group where most findings say that would be silently diverted from the lint path to the owner line. Require 'the direction' or 'direction's' (or 'direction says/order/rules') and add a negative test.
  2. Add a test where the weekly line already exists, so a second sweep posts nothing. The test now covers only the first post. Confirm too that /${owner}/${repo}/settings#f-direction is the real route to the Direction field in src/web/studio/crew.ts, and test the link against that route.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs