The Reviewer's result reaches the Operator by mail (REVIEW <bead>: <pass|fail> <pr_url>) #76

Merged
city-root merged 1 commit from worker/gascitypacks-whrw into main 2026-11-12 14:08:15 +00:00
Contributor

The Reviewer's result now reaches the Operator by mail: REVIEW <work bead>: <pass|fail|void> <pr_url> (gascitypacks-whrw, piece 4 of the user's instruction to stop the Operator polling).

What I found first (the bead asked me to say): a closing review bead did not mail the Operator today. mol-forgejo-review Part 5 wrote review_verdict, closed the bead and the step, and sent nothing; no order of either pack and no gc feature mails on a bead close (gc has no bead subscriptions). Only a halt mailed. So the mail is added.

What changed

  • forgejo/formulas/mol-forgejo-review.toml, Part 5 step 2: reads review_verdict from the bead (so a restart, and a void, send the same mail), then gc mail send <operator> --notify --dedup review:<review bead>:<head> -s "REVIEW <work bead>: <verdict> <pr_url>", then closes the bead and the step. The mail comes after the verdict is on the bead and before the close, so a failed mail leaves the bead open for a restart to finish. <bead> in the subject is the work bead (the review bead is in the body and the dedup key); void is mailed too, since the Operator needs to know a review will not come.
  • README: the review-bead paragraph and Part 5's row say it.
  • .changelog/review-result-mail.md.

What I ran and saw

  • tests/reviewer.sh: asserts the order (verdict, mail, bead close, step close, ack), exactly one mail and its exact form, and runs the lines against a stub gc for pass, fail, void and a close with no verdict (no mail, bead stays open). Dropping --notify from the formula makes it fail.
  • Every tests/*.sh passes. changelog -base refs/remotes/origin/main prints valid=true.

Not done here: the end-to-end check on a scratch bead (mikluko/scratch) from the bead's "done when" is the Operator's, after this merges and reaches the city; no Reviewer session was run against the real forge.

Bead: gascitypacks-whrw

The Reviewer's result now reaches the Operator by mail: `REVIEW <work bead>: <pass|fail|void> <pr_url>` (gascitypacks-whrw, piece 4 of the user's instruction to stop the Operator polling). **What I found first (the bead asked me to say):** a closing review bead did **not** mail the Operator today. `mol-forgejo-review` Part 5 wrote `review_verdict`, closed the bead and the step, and sent nothing; no order of either pack and no gc feature mails on a bead close (gc has no bead subscriptions). Only a halt mailed. So the mail is added. **What changed** - `forgejo/formulas/mol-forgejo-review.toml`, Part 5 step 2: reads `review_verdict` from the bead (so a restart, and a void, send the same mail), then `gc mail send <operator> --notify --dedup review:<review bead>:<head> -s "REVIEW <work bead>: <verdict> <pr_url>"`, then closes the bead and the step. The mail comes after the verdict is on the bead and before the close, so a failed mail leaves the bead open for a restart to finish. `<bead>` in the subject is the work bead (the review bead is in the body and the dedup key); `void` is mailed too, since the Operator needs to know a review will not come. - README: the review-bead paragraph and Part 5's row say it. - `.changelog/review-result-mail.md`. **What I ran and saw** - `tests/reviewer.sh`: asserts the order (verdict, mail, bead close, step close, ack), exactly one mail and its exact form, and runs the lines against a stub `gc` for pass, fail, void and a close with no verdict (no mail, bead stays open). Dropping `--notify` from the formula makes it fail. - Every `tests/*.sh` passes. `changelog -base refs/remotes/origin/main` prints `valid=true`. **Not done here:** the end-to-end check on a scratch bead (mikluko/scratch) from the bead's "done when" is the Operator's, after this merges and reaches the city; no Reviewer session was run against the real forge. Bead: gascitypacks-whrw
feat: the Reviewer mails the Operator its verdict (gascitypacks-whrw)
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 21s
test / scripts (pull_request) Successful in 36s
ca0a2fb9bf
A review bead's close was silent: nothing in mol-forgejo-review, the pack's orders or gc mailed anyone when it closed, so the Operator had to watch the bead to learn the result. This is one of the four pieces of the user's instruction of 2026-11-12 to replace the Operator's pollers with mail.

Part 5 step 2 now reads review_verdict from the bead (so a restart and a void are covered), mails the escalation target 'REVIEW <work bead>: <pass|fail|void> <pr_url>' with --notify and --dedup review:<review bead>:<head>, and only then closes the bead and the step. A failed mail leaves the bead open for a restart.

Validation: tests/reviewer.sh asserts the order and the exact mail, and runs the lines against a stub gc for pass, fail, void and a close with no verdict; a mutation (dropping --notify) fails it. All tests/*.sh pass, and the changelog v2 check is valid against origin/main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root-review left a comment

Review of ca0a2fb9bf for gascitypacks-whrw. Checks of the head: success.

Verdict

pass

Findings

  • [minor] forgejo/formulas/mol-forgejo-review.toml:299: the mail's body ends with $(... .review_url // empty), so a void (which writes no review_url) gets a body ending in at <head>. with nothing after it. Harmless; // "no review posted" or leaving the URL out of the body for a void would read better.
  • [minor] .changelog/review-result-mail.md:3: "does not stack a second" holds only while the first mail is unarchived: gc mail send --dedup suppresses a send only while a live message with the key is in the mailbox, so a restart after the Operator archived the first mail sends it again. The README row says the same thing. Acceptable as is (a duplicate beats a dropped verdict); a clause saying so would make it exact.

Verified

  • The premise: the formula the Reviewer runs today (the step I hold for this review, mol-forgejo-review from the city's cache) has no mail in Part 5; only Halting mails. The PR's finding is right, so the mail belongs.
  • The work bead (piece 4 of the user's mail of 14:15) and the PR description; the whole diff (4 files, +42/-11). The subject is REVIEW <work bead>: <verdict> <pr_url> to {{escalation_target}} with --notify and --dedup review:<review bead>:<head>. void is mailed too, which goes beyond the mail's <pass|fail> but is needed: a void is also a result the Operator would otherwise have to watch for.
  • Order in Part 5 step 2: the verdict is read back from the bead (empty means exit 1, with no mail and no close), then the mail (|| exit 1, so a failed mail leaves the bead open for a restart), then the bead close, the step close, drain-ack. Part 1 step 4 (verdict already on the bead) and the void of Parts 2 and 4 both go to Part 5 step 2, so every path that ends a review mails once. gc mail send --help confirms --dedup and --notify and how they behave.
  • Merged ca0a2fb into origin/main (b05a214, after #78): clean, auto-merged README.md.
  • In the merged tree, with the city's variables removed (env -i, 0 such variables): gc lint . (2 packs ok), every tests/*.sh the workflow runs (formula, reviewer, worktree-setup, worktree, gnu-tools, merge, handover, apply, upgrade, view-beads, view-mail, permission-deny, permission-request) all exit 0, and go vet ./..., go test ./... and go test -race ./... all pass.
  • Mutation: with --notify removed from the formula, tests/reviewer.sh fails on the static check, on both verdict runs and on the void. The tests check what they claim to.
  • Changelog: built changelog from mikluko/changelog at tag v2 and ran -base refs/remotes/origin/main: valid=true, with the fragment .changelog/review-result-mail.md under ### Added.
  • README: the review-bead paragraph and Part 5's row describe the mail.
Review of ca0a2fb9bfd53eeb072f25eca340089cbd994d48 for gascitypacks-whrw. Checks of the head: success. ### Verdict pass ### Findings - [minor] forgejo/formulas/mol-forgejo-review.toml:299: the mail's body ends with `$(... .review_url // empty)`, so a void (which writes no `review_url`) gets a body ending in `at <head>. ` with nothing after it. Harmless; `// "no review posted"` or leaving the URL out of the body for a void would read better. - [minor] .changelog/review-result-mail.md:3: "does not stack a second" holds only while the first mail is unarchived: `gc mail send --dedup` suppresses a send only while a live message with the key is in the mailbox, so a restart after the Operator archived the first mail sends it again. The README row says the same thing. Acceptable as is (a duplicate beats a dropped verdict); a clause saying so would make it exact. ### Verified - The premise: the formula the Reviewer runs today (the step I hold for this review, `mol-forgejo-review` from the city's cache) has no mail in Part 5; only Halting mails. The PR's finding is right, so the mail belongs. - The work bead (piece 4 of the user's mail of 14:15) and the PR description; the whole diff (4 files, +42/-11). The subject is `REVIEW <work bead>: <verdict> <pr_url>` to `{{escalation_target}}` with `--notify` and `--dedup review:<review bead>:<head>`. `void` is mailed too, which goes beyond the mail's `<pass|fail>` but is needed: a void is also a result the Operator would otherwise have to watch for. - Order in Part 5 step 2: the verdict is read back from the bead (empty means exit 1, with no mail and no close), then the mail (`|| exit 1`, so a failed mail leaves the bead open for a restart), then the bead close, the step close, drain-ack. Part 1 step 4 (verdict already on the bead) and the void of Parts 2 and 4 both go to Part 5 step 2, so every path that ends a review mails once. `gc mail send --help` confirms `--dedup` and `--notify` and how they behave. - Merged ca0a2fb into origin/main (b05a214, after #78): clean, auto-merged README.md. - In the merged tree, with the city's variables removed (`env -i`, 0 such variables): `gc lint .` (2 packs ok), every `tests/*.sh` the workflow runs (formula, reviewer, worktree-setup, worktree, gnu-tools, merge, handover, apply, upgrade, view-beads, view-mail, permission-deny, permission-request) all exit 0, and `go vet ./...`, `go test ./...` and `go test -race ./...` all pass. - Mutation: with `--notify` removed from the formula, `tests/reviewer.sh` fails on the static check, on both verdict runs and on the void. The tests check what they claim to. - Changelog: built `changelog` from mikluko/changelog at tag v2 and ran `-base refs/remotes/origin/main`: `valid=true`, with the fragment `.changelog/review-result-mail.md` under `### Added`. - README: the review-bead paragraph and Part 5's row describe the mail.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
mikluko/gascitypacks!76
No description provided.