Verify law 9: a PR body must carry Closes #n for every delivered ticket, or say why it closes none #23

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

In scope

Rules in src/policy.rs that read the PR body on open/edit and verify law 9 of the ratification skill: the body carries at least one Closes #n line (one per line, at the end of the body), or an explicit statement of why it closes none. A PR that does neither is denied readiness — the declared verdict withholds the mechanical merge and explains itself in the answer comment.

Out of scope

  • Acting on the verdict (the steward still only answers — the executor is a separate extension).
  • Verifying that the cited tickets exist or are open (a later refinement; the syntactic floor comes first).
  • Closing tickets — that is the forge's own keyword handling at merge.

Boundary

Reads only the PR body and the event payload already delivered by the webhook. No new Forgejo API calls, no token. Parameters (the recognized keyword, the exemption phrasing if any) belong in nix/policy.nix; judgment belongs in src/policy.rs.

Acceptance

  • A PR whose body ends with Closes #12 is judged deliverable.
  • A PR with only Refs #12 and no exemption statement is denied, with the law cited in the explanation.
  • A PR with no body is denied.
  • nix flake check passes; the checked-in policy/ting.json and nix/policy.nix have not drifted.
## In scope Rules in `src/policy.rs` that read the PR body on open/edit and verify law 9 of the ratification skill: the body carries at least one `Closes #n` line (one per line, at the end of the body), or an explicit statement of why it closes none. A PR that does neither is denied readiness — the declared verdict withholds the mechanical merge and explains itself in the answer comment. ## Out of scope - Acting on the verdict (the steward still only answers — the executor is a separate extension). - Verifying that the cited tickets exist or are open (a later refinement; the syntactic floor comes first). - Closing tickets — that is the forge's own keyword handling at merge. ## Boundary Reads only the PR body and the event payload already delivered by the webhook. No new Forgejo API calls, no token. Parameters (the recognized keyword, the exemption phrasing if any) belong in `nix/policy.nix`; judgment belongs in `src/policy.rs`. ## Acceptance - A PR whose body ends with `Closes #12` is judged deliverable. - A PR with only `Refs #12` and no exemption statement is denied, with the law cited in the explanation. - A PR with no body is denied. - `nix flake check` passes; the checked-in `policy/ting.json` and `nix/policy.nix` have not drifted.
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#23
No description provided.