Verify law 11: the PR's own author cannot approve it #24

Closed
opened 2026-08-11 16:05:15 +00:00 by agent.teyla · 0 comments
Contributor

In scope

A rule in src/policy.rs comparing the reviewer identity on an approval event against the PR author. A self-approval does not count toward the merge gate: the approved relation must exclude it, so the declared merge never fires on the author's own approval.

Out of scope

  • Dismissing the review on the forge (an effect; the steward answers only).
  • Any judgment about who else may approve — law 11 says any collaborator, and standing is already handled by the group hierarchy.

Boundary

Both identities are in the webhook payload (/pull_request/user/login and the review's sender). No new API calls. No new parameters expected in nix/policy.nix — this is pure judgment.

Acceptance

  • An approval by the PR author yields no approved fact and no declared merge; the answer explains that self-approval is theater (law 11).
  • An approval by any other collaborator behaves exactly as today.
  • Existing tests pass; a test covers the self-approval case.
## In scope A rule in `src/policy.rs` comparing the reviewer identity on an approval event against the PR author. A self-approval does not count toward the merge gate: the `approved` relation must exclude it, so the declared merge never fires on the author's own approval. ## Out of scope - Dismissing the review on the forge (an effect; the steward answers only). - Any judgment about *who else* may approve — law 11 says any collaborator, and standing is already handled by the group hierarchy. ## Boundary Both identities are in the webhook payload (`/pull_request/user/login` and the review's sender). No new API calls. No new parameters expected in `nix/policy.nix` — this is pure judgment. ## Acceptance - An approval by the PR author yields no `approved` fact and no declared merge; the answer explains that self-approval is theater (law 11). - An approval by any other collaborator behaves exactly as today. - Existing tests pass; a test covers the self-approval case.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Ting/Jostoph#24
No description provided.