delivery-reviewer (opus; no Bash, Edit, Write or NotebookEdit) is the review-stage lead. It judges the PR through the new delivery-review skill and posts one COMMENT review per round. Gitea refuses REQUEST_CHANGES from a PR's own poster, and the reviewer runs as the bot that opened the PR. The review opens with `Delivery review: round <n> — blocking|clear`, and each blocking finding is tagged with the role that must fix it: [test-author] (with its dispute key), [implementer] or [human]. Routing: a [human] finding, or a 3rd blocking round, stops with Ready for Human. Other blocking rounds post the Handoff and put `WIP:` back, handing the PR to delivery-implement-lead. A clear round hands on to delivery-operator. A relaunch finishes a crashed routing, using whether a later Handoff links the review. delivery-review checks the change against the acceptance criteria and re-judges every test-path change itself, because a dispute round moves the CI freeze boundary. It also judges post-merge assertion reasons, security and the dry run. It reads the delivery doc at the PR's base ref, and a PR that changes the test-path rules is a [human] finding. Hand-back: delivery-handoff lets the implement stage take a PR, with the inbound Handoff required and the gate checked on the issue it closes. The implement lead first sends [test-author] findings through delivery-test-first's dispute flow, which now takes review findings, then gives the implementer the rest. Dispute verdicts are one keyed `- Dispute verdict:` line copied into every Handoff comment, so later sessions never re-judge an item or re-dispute a settled test. delivery-repo-doc, delivery-test-author, delivery-implementer and delivery-qa are aligned with these contracts. Package bumped to 0.5.0, with the marketplace allow key and manifest. Refs: #193 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
5.4 KiB
Dispute run — judging disputed tests or review findings
Input from your caller: the work branch, the issue, the current ## Acceptance checks block (on a
review source, the PR body's), and one source of disputes:
- Implementer — the disputed tests by
file::test name, each with the implementer's reason. - Review — the
[test-author]findings from a review round, each as the review states it, with the key the review line carries right after the tag: a criterion with no check or anopen questionline, a test that would pass without the change, a weakened, skipped or deleted test, an unjustifiedpost-merge:reason, a security issue in a test path, a failing CI check whose error is in a test-path file (syntax, import or fixture), or a PR body with no## Acceptance checksblock. The missing block carries no key and gets no verdict line: return the full Part 1 ofreferences/output-template.md, and the lead inserts it into the PR body.
The caller also passes every earlier verdict, from this session or recorded in the Handoff comments of the PR and of the issue it closes, each one line:
- Dispute verdict: <key> — source: implementer | review — amended | upheld | escalate — <reason>
<key> is `<file>::<test>` for a test, "<criterion>" verbatim from the issue for a
criterion with no test or its Acceptance checks line, or `<file>` for a file under the test
paths that is not a test (a fixture with a credential) — never the finding's wording. On a review
source, use the key the review line carries; never derive it.
The implementation may already be on the branch. Return to SKILL.md Step 3 when the last step
here is done.
Step 1 — Check the round
Each test, criterion or file gets one judgement across the whole PR, whichever session or source
raised it, so each disputed item gets one verdict line — except the missing-block finding, which
gets none. An item is already judged when a verdict with the same <key> exists:
- review source — any recorded verdict with the same key; the lead has already removed findings answered after the review;
- implementer source — earlier in this session, or in any earlier Handoff comment.
Already judged → do not judge it again; return it as escalate with the earlier verdict as the
reason, and the lead escalates to the human.
Step 2 — Judge each item
Reread the criterion the item concerns (the issue, quoted in the Acceptance checks block) and decide:
| The dispute or finding shows | Verdict |
|---|---|
| The test asserts an implementation detail the criterion does not name | Amend |
| The test misreads the criterion, or asserts something the criterion does not require | Amend |
| The test is wrong in itself: bad fixture, wrong expected value, flaky setup | Amend |
| A criterion has no check, or a check that would pass without the change | Amend |
A post-merge: reason fails because a pre-merge test could exercise the criterion |
Amend |
| A security issue in a test path (a committed secret, a plaintext credential in a fixture) | Amend |
| The implementation does not meet the criterion, or the implementer prefers a different behaviour | Uphold |
| A review finding misreads the criterion or the check, and the check stands | Uphold |
| The criterion itself is ambiguous and both readings are defensible | Uphold, and add it to Open questions |
Do not weaken a test to make the current implementation pass. An amendment must still check the behaviour the criterion names.
Step 3 — Amend
An amendment may change a test, add a test, or rewrite the item's ## Acceptance checks line (a
new test name, a test in place of post-merge:, a sharper post-merge reason). Write tests under
the test paths only. A new or amended test must still fail without the implementation: run it
against the branch's merge-base with the default branch, in a temporary worktree outside the repo
checkout, with the runner the tool skill names (for Ansible, a placeholder vault password as in
references/first-run.md Step 5), and judge the result:
| Result | Action |
|---|---|
| Fails on an assertion about the named behaviour | Correct — record it as red |
| Passes | Vacuous: the behaviour already exists or the assertion is too weak. Strengthen it until it fails; if the behaviour truly already exists, add the criterion to Open questions |
| Fails on syntax, import, collection or fixture errors | Fix the test and rerun — except an import of a module the change itself creates, which is expected: make the failure an assertion where the framework allows, or say so in the record |
| Runner not on PATH, or needs credentials you must not hold | Do not fake a result; record "not run: " for that test |
Then remove the worktree (git worktree remove). Also run each new or amended test once on the
branch head and record pass or fail; that result goes to the implementer and does not change the
verdict.
All amendments of the run land in the single commit of SKILL.md Step 3.
Step 4 — Uphold
Leave the test and its line unchanged and write a one-line reason that names the criterion it enforces, e.g. "upheld: criterion 2 requires the 404 on an unknown id; the implementation returns 500". On a review finding, the reviewer re-judges the upheld item in the next round.
The commit in SKILL.md Step 3 still happens — empty when every item was upheld — so this run
ends like every other one.