The Reviewer's result reaches the Operator by mail (REVIEW <bead>: <pass|fail> <pr_url>) #76
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/gascitypacks!76
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-whrw"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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-reviewPart 5 wrotereview_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: readsreview_verdictfrom the bead (so a restart, and a void, send the same mail), thengc 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);voidis mailed too, since the Operator needs to know a review will not come..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 stubgcfor pass, fail, void and a close with no verdict (no mail, bead stays open). Dropping--notifyfrom the formula makes it fail.tests/*.shpasses.changelog -base refs/remotes/origin/mainprintsvalid=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
Review of
ca0a2fb9bffor gascitypacks-whrw. Checks of the head: success.Verdict
pass
Findings
$(... .review_url // empty), so a void (which writes noreview_url) gets a body ending inat <head>.with nothing after it. Harmless;// "no review posted"or leaving the URL out of the body for a void would read better.gc mail send --dedupsuppresses 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
mol-forgejo-reviewfrom the city's cache) has no mail in Part 5; only Halting mails. The PR's finding is right, so the mail belongs.REVIEW <work bead>: <verdict> <pr_url>to{{escalation_target}}with--notifyand--dedup review:<review bead>:<head>.voidis 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.|| 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 --helpconfirms--dedupand--notifyand how they behave.ca0a2fbinto origin/main (b05a214, after #78): clean, auto-merged README.md.env -i, 0 such variables):gc lint .(2 packs ok), everytests/*.shthe workflow runs (formula, reviewer, worktree-setup, worktree, gnu-tools, merge, handover, apply, upgrade, view-beads, view-mail, permission-deny, permission-request) all exit 0, andgo vet ./...,go test ./...andgo test -race ./...all pass.--notifyremoved from the formula,tests/reviewer.shfails on the static check, on both verdict runs and on the void. The tests check what they claim to.changelogfrom mikluko/changelog at tag v2 and ran-base refs/remotes/origin/main:valid=true, with the fragment.changelog/review-result-mail.mdunder### Added.