A pull is handed to a person after three changes-asked reviews in a row. Seeing the ones at two lets the owner or the planner step in a round earlier.
Done:
[ ] New src/flow/review_rounds.ts exports nearHandover(rows), taking { pull, verdicts: ("approved" | "changes_requested")[] }[] in time order, and returning the pulls whose trailing run of changes-requested verdicts since the last approval is exactly 2, most recent first.
[ ] Tests: 2 trailing (listed), 3 (already handed over, not listed), an approval resetting the run, no reviews.
A pull is handed to a person after three changes-asked reviews in a row. Seeing the ones at two lets the owner or the planner step in a round earlier.
Done:
src/flow/review_rounds.tsexportsnearHandover(rows), taking{ pull, verdicts: ("approved" | "changes_requested")[] }[]in time order, and returning the pulls whose trailing run of changes-requested verdicts since the last approval is exactly 2, most recent first.Files: src/flow/review_rounds.ts, test/flow-review-rounds.test.ts.
Before pushing:
bun x tsc --noEmitand the new test.