Skip to main content

Module review

Module review 

Source
Expand description

Alternating custody until a PR converges.

Roles are not fixed. Whoever holds the PR may implement, review, fix, or file follow-ups, and then hands custody to the other. An agent never reviews its own most recent edit, and custody follows the commit that landed rather than the action a reviewer asked for: a call that returns is not a call that wrote anything.

Three failure modes are handled explicitly here, because each one breaks a naive loop:

  • The nitpick spiral. Round 6 findings are worse than round 1 findings and a loop that counts objections cannot tell. Only blocking gates.
  • Re-litigation. A refuted point re-raised forever never terminates. Refutations are hashed into a ledger carried across rounds.
  • Approval drift. Optimising for “get approved” pressures the author into accepting wrong review comments, so refutation is blessed and the merge gate is blocking-findings-empty, not reviewer-satisfied.

Structs§

Snapshot
What the branch looked like at one point in a round.

Enums§

Ending
How the run ended, which is the only thing about the run a reader needs.
Filed
What happened to one finding on the way to the tracker.

Functions§

disposition_comment
One response to a review. Refutations carry their reasoning because that is the whole argument; fixes are a list of titles because the diff says the rest.
drop_uncommitted
Drop what a call left uncommitted, keeping whatever it committed.
file_as_issue
File an issue, or add to the one that already covers it.
file_as_issue_apart_from
The same, with one issue this cannot be a duplicate of.
file_followup
Record a finding that is real but out of scope for this PR.
filed_issue_number
#123 from a filed issue URL, falling back to the URL when it does not look like one. Shorter, and GitHub renders it as a link either way. The issue number a filed follow-up URL points at, when it is one. Local notes and anything unparseable yield nothing.
from_commits
A pull request body for work whose author never got to describe it.
issue_report
A finding written as a bug report, when it carries the parts of one.
outcome_comment
park
Copy the tracked edits in the tree to somewhere they can be got back from.
post_outcome
Post the one comment a run leaves behind, if it has anything to say.
pr_body
The pull request body.
resume_pr
Pick up an existing PR and continue the loop.
review_comment
One review, as a reviewer would write it if they were in a hurry: a count line, a sentence, and one bullet per finding. Only blocking findings carry their detail, because only those are something the author has to act on now.
run_issue
skip_comment
What is posted on an issue both agents declined. What is posted on an issue both reviewers declined.
snapshot
undo_edits
Put the branch back where the review found it.