Landing L15: the review order, on both shapes of handover and with or without the schedule order #58

Merged
city-root merged 3 commits from worker/gascitypacks-omd into main 2026-11-12 16:56:53 +00:00
Contributor

Landing L15: the review order. It finds the beads that hand a pull request over, and for each pull request head whose checks have completed (success, failure or none) it makes the review bead and slings it to the rig's Reviewer, once per pull request and head. It ships switched off, as the schedule order does.

What it does

  • Run: forgejo order review (Go, revieworder.go), started by a one-line assets/scripts/review.sh; orders/review.toml, cooldown 3m. No new shell logic.
  • Conditions, cheapest first: the rig has <rig>/forgejo.reviewer (or FORGEJO_REVIEWER); the bead is marked auto_merge=scheduled (setting below); the pull request is open and the bead is the head's bead; the head's checks have completed; no review bead exists for that pr_url and review_head in any status.
  • The bead: title Review <url> at <head, 7>, labels service and review, metadata pr_url, review_head, work_bead, review_round (count of the pull request's review beads, plus one), and review_made_by=review-order. It is made unassigned, read back and checked (labels, every key; stands where the L7 check will), then gc sling <rig>/forgejo.reviewer <bead>. The README says "slings" where 3.5 says "assigns".
  • A bead the order made and could not sling is slung by the next run (open, no gc.execution_routed_to); a bead it did not make, such as the Operator's script's, is never touched.
  • A head not_started for 30 minutes becomes a bead for the Operator (pr_event=checks_not_started), once, by the schedule order's operatorBead; the first sighting is kept on the work bead as review_wait.

The shapes of a handover, and how the order tells them apart

  • New: closed, merge_result=pull_request, full gc.work_commit. The order takes it only while that is the pull request's head.
  • Old (today's rigs): open, with pr_url, and none of merge_result, pr_event, review_head, the labels service/review, worker_session. Its head is the pull request's, read from the forge.

What a city sets to switch it on

In the order's [[orders.overrides]] entry, beside FORGEJO_TOKEN_FILE:

  • With the schedule order on: FORGEJO_REVIEW = "on".
  • Without it (today): FORGEJO_REVIEW = "on" and FORGEJO_REVIEW_NEEDS_SCHEDULE = "off". Without the second, nothing is reviewed: the old shape is never scheduled, and the schedule order is off. Anything but exactly off keeps the condition.

The README ("The review order") has the entry and the table.

One change outside the order

The merge order's scan of the old shape now skips a bead that carries review_head. A review bead is open and has a pr_url, so the merge order took it for work: it would close it as shipped on a merge, and on a pull request closed unmerged assign it to the Operator with a --notify mail. TestMergeOrderLeavesAReviewBeadAlone fails without it. It is three lines in order.go; gascitypacks-nf2 is in the same file.

Not covered

The schedule order's head_moved check skips only beads with pr_event, so an open review bead for a pull request keeps it from raising no_worker. It is in schedule.go (gascitypacks-uuv), so it is left, and filed.

Trial for the Operator (live city, nothing tried there)

  1. Give one rig the entry with rig = "<rig>", FORGEJO_REVIEW = "on", FORGEJO_REVIEW_NEEDS_SCHEDULE = "off"; gc order show review --json should print the env.
  2. Stop the Operator's own review script.
  3. Have a Worker open a pull request in that rig; after its checks, gc order run review --rig <rig> (or wait 3 minutes).
  4. gc bd list --label review --metadata-field pr_url=<url>: one bead, five keys, labels, gc.execution_routed_to the Reviewer, review_round=1; the Reviewer starts on it; no "assigned, not slung" mail.
  5. Run again: no second bead. Push: after its checks, a second bead, review_round=2.
  6. Stop the runner and open a pull request: after 30 minutes one Checks not started bead and one mail for the Operator.
  7. Then the other rigs.

Verified

go vet ./..., go test ./... (revieworder_test.go: fake store and fake forge, one run end to end through order review), gc lint ., and the changelog v2 checker with -base main (valid=true).

Bead: gascitypacks-omd

Rebase onto c06effd (round 3, rework)

The head 8b7f86d no longer merged onto main. Rebased with nothing else changed:

  • Conflicts in README.md, forgejo/pack.toml and forgejo/assets/forgejo/main.go were all additions from both sides (main's checks order and handover order, this change's review order): both are kept, in the table, the description, the usage text and the order dispatch.
  • Main already carries a part of this change: the review bead's review_head key, which the checks order (#79) declares as metaReviewHead in checks_order.go, and its README paragraph (the Reviewer's two mails, REVIEW <bead>: …, #76). Dropped here: the second declaration of metaReviewHead in revieworder.go (the package did not compile with both); the README keeps main's paragraph, with only the pointer to the review order added.
  • The module moved to the repository root (go.mod, one module for both packs), so the checks are go vet ./... and go test ./... there.

Checked after the rebase: go vet ./..., go test -race ./..., gc lint ., tests/{formula,reviewer,operator-overlay,merge,handover}.sh (formula.sh in a clean env), and the changelog v2 checker with -base main (valid=true).

Rebase onto 8a95663 (round 4, rework of review 276)

Head 70f7873 no longer merged onto main: #75, #80 (the Reviewer becomes a pool) and #60 landed since. Rebased, with the three conflicts resolved as the review gave them, and nothing else changed:

  • forgejo/pack.toml: main's file, without the two [[named_session]] blocks that #80 removed (a named session would clamp the Reviewer to one session and make a city's max_active_sessions patch inert). Main's description kept, with this change's clause about the review order added.
  • forgejo/assets/forgejo/main.go: both commands in the usage error, `review take` from #80 and `order review` from this change. The order review dispatch case and the doc comment merged without conflict.
  • README.md, "How a review bead reaches it": main's paragraph, which says the Reviewer is a pool and no assignee string has to wake a named session; its last clause now links the review order, which slings. The sentence about "question 4 … which a trial settles" is dropped, as it is no longer true. The Reviewer paragraph at "The Reviewer" is main's (the pool), as before.

Checked on the result, with the city's variables removed: go vet ./..., go test ./..., gc lint ., tests/*.sh (all fourteen scripts of the CI), and the changelog v2 checker with -base main (valid=true).

Landing L15: the review order. It finds the beads that hand a pull request over, and for each pull request head whose checks have completed (success, failure or none) it makes the review bead and **slings** it to the rig's Reviewer, once per pull request and head. It ships switched off, as the schedule order does. ## What it does - Run: `forgejo order review` (Go, `revieworder.go`), started by a one-line `assets/scripts/review.sh`; `orders/review.toml`, cooldown 3m. No new shell logic. - Conditions, cheapest first: the rig has `<rig>/forgejo.reviewer` (or `FORGEJO_REVIEWER`); the bead is marked `auto_merge=scheduled` (setting below); the pull request is open and the bead is the head's bead; the head's checks have completed; no review bead exists for that `pr_url` and `review_head` in any status. - The bead: title `Review <url> at <head, 7>`, labels `service` and `review`, metadata `pr_url`, `review_head`, `work_bead`, `review_round` (count of the pull request's review beads, plus one), and `review_made_by=review-order`. It is made unassigned, read back and checked (labels, every key; stands where the L7 check will), then `gc sling <rig>/forgejo.reviewer <bead>`. The README says "slings" where 3.5 says "assigns". - A bead the order made and could not sling is slung by the next run (open, no `gc.execution_routed_to`); a bead it did not make, such as the Operator's script's, is never touched. - A head `not_started` for 30 minutes becomes a bead for the Operator (`pr_event=checks_not_started`), once, by the schedule order's `operatorBead`; the first sighting is kept on the work bead as `review_wait`. ## The shapes of a handover, and how the order tells them apart - **New**: closed, `merge_result=pull_request`, full `gc.work_commit`. The order takes it only while that is the pull request's head. - **Old** (today's rigs): open, with `pr_url`, and none of `merge_result`, `pr_event`, `review_head`, the labels `service`/`review`, `worker_session`. Its head is the pull request's, read from the forge. ## What a city sets to switch it on In the order's `[[orders.overrides]]` entry, beside `FORGEJO_TOKEN_FILE`: - **With the schedule order on**: `FORGEJO_REVIEW = "on"`. - **Without it (today)**: `FORGEJO_REVIEW = "on"` and `FORGEJO_REVIEW_NEEDS_SCHEDULE = "off"`. Without the second, nothing is reviewed: the old shape is never scheduled, and the schedule order is off. Anything but exactly `off` keeps the condition. The README ("The review order") has the entry and the table. ## One change outside the order The merge order's scan of the old shape now skips a bead that carries `review_head`. A review bead is open and has a `pr_url`, so the merge order took it for work: it would close it as shipped on a merge, and on a pull request closed unmerged assign it to the Operator with a `--notify` mail. `TestMergeOrderLeavesAReviewBeadAlone` fails without it. It is three lines in `order.go`; gascitypacks-nf2 is in the same file. ## Not covered The schedule order's `head_moved` check skips only beads with `pr_event`, so an open review bead for a pull request keeps it from raising `no_worker`. It is in schedule.go (gascitypacks-uuv), so it is left, and filed. ## Trial for the Operator (live city, nothing tried there) 1. Give one rig the entry with `rig = "<rig>"`, `FORGEJO_REVIEW = "on"`, `FORGEJO_REVIEW_NEEDS_SCHEDULE = "off"`; `gc order show review --json` should print the env. 2. Stop the Operator's own review script. 3. Have a Worker open a pull request in that rig; after its checks, `gc order run review --rig <rig>` (or wait 3 minutes). 4. `gc bd list --label review --metadata-field pr_url=<url>`: one bead, five keys, labels, `gc.execution_routed_to` the Reviewer, `review_round=1`; the Reviewer starts on it; no "assigned, not slung" mail. 5. Run again: no second bead. Push: after its checks, a second bead, `review_round=2`. 6. Stop the runner and open a pull request: after 30 minutes one `Checks not started` bead and one mail for the Operator. 7. Then the other rigs. ## Verified `go vet ./...`, `go test ./...` (`revieworder_test.go`: fake store and fake forge, one run end to end through `order review`), `gc lint .`, and the changelog v2 checker with `-base main` (`valid=true`). Bead: gascitypacks-omd ## Rebase onto c06effd (round 3, rework) The head 8b7f86d no longer merged onto main. Rebased with nothing else changed: - Conflicts in `README.md`, `forgejo/pack.toml` and `forgejo/assets/forgejo/main.go` were all additions from both sides (main's `checks` order and `handover` order, this change's `review` order): both are kept, in the table, the description, the usage text and the `order` dispatch. - Main already carries a part of this change: the review bead's `review_head` key, which the `checks` order (#79) declares as `metaReviewHead` in `checks_order.go`, and its README paragraph (the Reviewer's two mails, `REVIEW <bead>: …`, #76). Dropped here: the second declaration of `metaReviewHead` in `revieworder.go` (the package did not compile with both); the README keeps main's paragraph, with only the pointer to the review order added. - The module moved to the repository root (`go.mod`, one module for both packs), so the checks are `go vet ./...` and `go test ./...` there. Checked after the rebase: `go vet ./...`, `go test -race ./...`, `gc lint .`, `tests/{formula,reviewer,operator-overlay,merge,handover}.sh` (formula.sh in a clean env), and the changelog v2 checker with `-base main` (`valid=true`). ## Rebase onto 8a95663 (round 4, rework of review 276) Head 70f7873 no longer merged onto main: #75, #80 (the Reviewer becomes a pool) and #60 landed since. Rebased, with the three conflicts resolved as the review gave them, and nothing else changed: - `forgejo/pack.toml`: main's file, without the two `[[named_session]]` blocks that #80 removed (a named session would clamp the Reviewer to one session and make a city's `max_active_sessions` patch inert). Main's description kept, with this change's clause about the review order added. - `forgejo/assets/forgejo/main.go`: both commands in the usage error, `` `review take` `` from #80 and `` `order review` `` from this change. The `order review` dispatch case and the doc comment merged without conflict. - `README.md`, "How a review bead reaches it": main's paragraph, which says the Reviewer is a pool and no assignee string has to wake a named session; its last clause now links [the review order](#the-review-order), which slings. The sentence about "question 4 … which a trial settles" is dropped, as it is no longer true. The Reviewer paragraph at "The Reviewer" is main's (the pool), as before. Checked on the result, with the city's variables removed: `go vet ./...`, `go test ./...`, `gc lint .`, `tests/*.sh` (all fourteen scripts of the CI), and the changelog v2 checker with `-base main` (`valid=true`).
feat: the review order makes the review bead of a head and slings it (gascitypacks-omd)
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 20s
test / scripts (pull_request) Successful in 32s
ecc79aa9e3
Row L15 of Landing: what starts a review was a script in the Operator's session. The review order takes over its first half. Every three minutes it finds the beads that hand a pull request over, in the new shape (closed, merge_result=pull_request, gc.work_commit) and in the old (open, pr_url, no Worker on it), and for each whose head's checks have completed makes the review bead (labels service and review; pr_url, review_head, work_bead, review_round) unassigned, reads it back, and slings it to the rig's forgejo.reviewer.

One bead per pull request and head in any status, found by pr_url and review_head, so the Operator's script and the order never ask twice. A bead the order made and could not sling is slung by the next run; a bead it did not make is never touched. A head not_started for half an hour is a bead for the Operator (checks_not_started), made by the schedule order's operatorBead.

It ships off (FORGEJO_REVIEW=on), and keeps the row's second condition, auto_merge=scheduled, behind FORGEJO_REVIEW_NEEDS_SCHEDULE, which a city sets to off while the schedule order is off. The old shape is never scheduled, so it is reviewed only with that setting off.

The merge order's scan of the old shape now skips a bead that carries review_head: a review bead is open and has a pr_url, and a pull request that merged or closed unmerged made the merge order close it as shipped or hand it to the Operator with mail.

Validation: go vet, go test (revieworder_test.go: a fake store and forge, one end-to-end test through `order review`; the merge-order test fails without the skip), gc lint.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root-review requested changes 2026-11-12 13:40:24 +00:00
Dismissed
city-root-review left a comment

Review of ecc79aa9e3 for gascitypacks-omd. Checks of the head: success.

Verdict

fail

The order itself is close to done: it does what L15, section 3.5 and the work bead's four points ask, its tests cover each condition, and the head passes CI. It fails because the branch was cut at 53a9474, before #51, #53, #55 and #56. It does not merge into main (e6c6adb), and the merge result does not compile. It needs a rebase onto main.

Findings

  • [blocking] forgejo/assets/forgejo/revieworder.go:509: createdID is declared twice once the PR is merged with main. #51 (d8b7d92) added func createdID(out []byte) (string, error) at forgejo/assets/forgejo/order.go:1000, with the same behaviour (the bead, or an array of one). The Go files merge without a textual conflict, so the forge's mergeable does not show this, but the merged package fails go vet with revieworder.go:509:6: createdID redeclared in this block, and go test fails the same way. Fix: delete the PR's copy (revieworder.go:507-523) and use order.go's. With that one deletion on the merge result, go vet, go test and go test -race pass.
  • [blocking] README.md, forgejo/pack.toml: merge conflicts with #56 (e6c6adb, L16, the city's Reviewer), and the forge reports not_mergeable. Rebase onto main (e6c6adb or later), and resolve as follows:
    • The table row of forgejo (README.md:8) and pack.toml's description: keep #56's mention of the city's Reviewer, and add the review order.
    • "How a review bead reaches it" / "What is not there yet" (README, section "The Reviewer"): keep #56's text. It says an assigned-not-slung bead is handed to the Operator before the drain-ack. The PR's side goes back to "mails the Operator … and exits", which is no longer what the prompt does. Keep the PR's addition that the review order slings.
    • Section "The review order", condition 1 says "The HQ store's instance has none yet (the city's own is row L16)", and the paragraph on rig = "*" says the HQ instance "does nothing without a Reviewer". After #56 the HQ store does have one, forgejo.reviewer with no rig, but findReviewer (revieworder.go:230) still returns "" for GC_RIG empty unless FORGEJO_REVIEWER is set. One of the two has to change. Either say that the HQ instance asks no review until FORGEJO_REVIEWER=forgejo.reviewer is set for it (on a separate [[orders.overrides]] entry, not the rig = "*" one), or have findReviewer look for forgejo.reviewer in the HQ store. The README must not keep the stale claim.
    • "What is not there yet" on the PR's side says "A Reviewer for gascity-root itself is L16". That is done now: drop it.
  • [minor] forgejo/assets/forgejo/revieworder.go:455-464, 499-503: review_wait is removed from the work bead only when this order creates the review bead. When the review is found already made (by the Operator's script, or by an earlier run that this run only slings), the key stays on the work bead, though the README says it "is removed when the review is asked for". It does no harm, since a new head resets it, but either unset it on those paths too or reword the README.

Verified

  • Read the work bead gascitypacks-omd (L15, section 3.5, the four points, "Done when"), the PR's description, README.md of origin/main (no REVIEW.md, AGENTS.md or CLAUDE.md there), and the whole diff (9 files, +1586/-12): revieworder.go in full, the test list of revieworder_test.go, main.go, order.go (the review_head skip, covered by TestMergeOrderLeavesAReviewBeadAlone), review.sh, review.toml, the README section and the changelog fragment.
  • What the PR delivers against the bead: it slings rather than only assigning, keeps the bead's shape and adds review_round, has the schedule condition behind FORGEJO_REVIEW_NEEDS_SCHEDULE (only exactly off drops it), handles both shapes of handover (the old shape is told apart by pr_event, review_head, merge_result, worker_session and the labels), dedups by pr_url+review_head in any status, ships off by default, is Go with no new shell logic beyond the one-line exec, and has a README section, a fragment, and a description with the switch-on settings and a trial. All present.
  • Merge of the head into origin/main e6c6adb: CONFLICT in README.md and forgejo/pack.toml. Go files merged cleanly. Resolved locally to main's side for the conflicting files only to test: go vet fails (createdID redeclared). After deleting the duplicate locally, in forgejo/: go vet ./... ok, go test ./... ok, go test -race ./... ok.
  • On the same merge result, with the city's variables removed: gc lint . (2 packs ok), tests/formula.sh, reviewer.sh, merge.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh, permission-request.sh: all ok.
  • Changelog checker built from mikluko/changelog at tag v2 (cmd/changelog), run with -base main on the merge result: valid=true.
  • Head's own checks: success.
Review of ecc79aa9e3631a6f457b136020f14bcfaf85bb53 for gascitypacks-omd. Checks of the head: success. ### Verdict fail The order itself is close to done: it does what L15, section 3.5 and the work bead's four points ask, its tests cover each condition, and the head passes CI. It fails because the branch was cut at 53a9474, before #51, #53, #55 and #56. It does not merge into `main` (e6c6adb), and the merge result does not compile. It needs a rebase onto `main`. ### Findings - [blocking] forgejo/assets/forgejo/revieworder.go:509: `createdID` is declared twice once the PR is merged with `main`. #51 (d8b7d92) added `func createdID(out []byte) (string, error)` at forgejo/assets/forgejo/order.go:1000, with the same behaviour (the bead, or an array of one). The Go files merge without a textual conflict, so the forge's `mergeable` does not show this, but the merged package fails `go vet` with `revieworder.go:509:6: createdID redeclared in this block`, and `go test` fails the same way. Fix: delete the PR's copy (revieworder.go:507-523) and use order.go's. With that one deletion on the merge result, `go vet`, `go test` and `go test -race` pass. - [blocking] README.md, forgejo/pack.toml: merge conflicts with #56 (e6c6adb, L16, the city's Reviewer), and the forge reports `not_mergeable`. Rebase onto `main` (e6c6adb or later), and resolve as follows: - The table row of `forgejo` (README.md:8) and `pack.toml`'s `description`: keep #56's mention of the city's Reviewer, and add the review order. - "How a review bead reaches it" / "What is not there yet" (README, section "The Reviewer"): keep #56's text. It says an assigned-not-slung bead is handed to the Operator before the drain-ack. The PR's side goes back to "mails the Operator … and exits", which is no longer what the prompt does. Keep the PR's addition that the review order slings. - Section "The review order", condition 1 says "The HQ store's instance has none yet (the city's own is row L16)", and the paragraph on `rig = "*"` says the HQ instance "does nothing without a Reviewer". After #56 the HQ store does have one, `forgejo.reviewer` with no rig, but `findReviewer` (revieworder.go:230) still returns "" for `GC_RIG` empty unless `FORGEJO_REVIEWER` is set. One of the two has to change. Either say that the HQ instance asks no review until `FORGEJO_REVIEWER=forgejo.reviewer` is set for it (on a separate `[[orders.overrides]]` entry, not the `rig = "*"` one), or have `findReviewer` look for `forgejo.reviewer` in the HQ store. The README must not keep the stale claim. - "What is not there yet" on the PR's side says "A Reviewer for `gascity-root` itself is L16". That is done now: drop it. - [minor] forgejo/assets/forgejo/revieworder.go:455-464, 499-503: `review_wait` is removed from the work bead only when this order creates the review bead. When the review is found already made (by the Operator's script, or by an earlier run that this run only slings), the key stays on the work bead, though the README says it "is removed when the review is asked for". It does no harm, since a new head resets it, but either unset it on those paths too or reword the README. ### Verified - Read the work bead gascitypacks-omd (L15, section 3.5, the four points, "Done when"), the PR's description, `README.md` of `origin/main` (no `REVIEW.md`, `AGENTS.md` or `CLAUDE.md` there), and the whole diff (9 files, +1586/-12): revieworder.go in full, the test list of revieworder_test.go, main.go, order.go (the `review_head` skip, covered by `TestMergeOrderLeavesAReviewBeadAlone`), review.sh, review.toml, the README section and the changelog fragment. - What the PR delivers against the bead: it slings rather than only assigning, keeps the bead's shape and adds `review_round`, has the schedule condition behind `FORGEJO_REVIEW_NEEDS_SCHEDULE` (only exactly `off` drops it), handles both shapes of handover (the old shape is told apart by `pr_event`, `review_head`, `merge_result`, `worker_session` and the labels), dedups by `pr_url`+`review_head` in any status, ships off by default, is Go with no new shell logic beyond the one-line exec, and has a README section, a fragment, and a description with the switch-on settings and a trial. All present. - Merge of the head into `origin/main` e6c6adb: CONFLICT in README.md and forgejo/pack.toml. Go files merged cleanly. Resolved locally to main's side for the conflicting files only to test: `go vet` fails (createdID redeclared). After deleting the duplicate locally, in forgejo/: `go vet ./...` ok, `go test ./...` ok, `go test -race ./...` ok. - On the same merge result, with the city's variables removed: `gc lint .` (2 packs ok), tests/formula.sh, reviewer.sh, merge.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh, permission-request.sh: all ok. - Changelog checker built from mikluko/changelog at tag v2 (`cmd/changelog`), run with `-base main` on the merge result: `valid=true`. - Head's own checks: `success`.
mikluko force-pushed worker/gascitypacks-omd from ecc79aa9e3
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 20s
test / scripts (pull_request) Successful in 32s
to 8b7f86dc54
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 22s
test / scripts (pull_request) Successful in 33s
2026-11-12 13:43:48 +00:00
Compare
mikluko force-pushed worker/gascitypacks-omd from 8b7f86dc54
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 22s
test / scripts (pull_request) Successful in 33s
to 70f78736cf
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 18s
test / scripts (pull_request) Successful in 36s
2026-11-12 15:54:20 +00:00
Compare
city-root-review requested changes 2026-11-12 16:06:31 +00:00
Dismissed
city-root-review left a comment

Review of 70f78736cf for gascitypacks-omd. Checks of the head: success.

Verdict

fail

The order is ready, and both findings of round 1 are fixed: there is one createdID (order.go's), and review_wait is cleared on every path through clearWait, with TestReviewOrderForgetsTheWaitWhereTheReviewWasAskedForAlready covering it. The verdict is fail only because main moved again after this rebase. #75 (555cd59) and #80 (0dead58, the Reviewer becomes a pool) landed on top of c06effd. The head no longer merges into main 0dead58: git reports conflicts in three files, and the forge says not_mergeable. It needs one more rebase, onto 0dead58 or later. After a resolution like the one below, every check CI runs passes.

Findings

  • [blocking] forgejo/pack.toml:4-18: conflicts with #80. #80 removed both [[named_session]] blocks for reviewer and gave the description "…as its Reviewer, a pool of one session that a city can raise." Resolve by keeping main's file without the [[named_session]] blocks and adding this PR's clause about the review order to main's description. Do not keep the PR's side of this hunk: it would bring the named sessions back, and gc limits a template behind an on-demand named session to one session, so a city's max_active_sessions patch would do nothing (README, "More than one Reviewer").
  • [blocking] forgejo/assets/forgejo/main.go:138: conflicts with #80, which added review take. Keep both commands in the usage error: `pr open`, `pr state`, `pr merge`, `pr review`, `review take`, `order merge`, `order checks`, `order schedule` or `order review`. The order review dispatch case and the doc comment merge without conflict.
  • [blocking] README.md:431 ("How a review bead reaches it"): conflicts with #80. Keep main's paragraph. It says the Reviewer is a pool and no named session, so no assignee string has to wake one, and it drops the "question 4 … which a trial settles" sentence. In its last clause, replace "the review order, once it exists, slings the bead" with a link to the review order, which slings. Do not bring back "Which assignee string wakes an acp named session is question 4": after #80 it is no longer true. README.md:403 merges cleanly to main's text, the pool. Keep that as well.

Verified

  • Read the work bead gascitypacks-omd (L15, section 3.5, the four points, "Done when", and the round-1 and round-3 notes), the PR's description, and README.md of origin/main 0dead58. origin/main has no REVIEW.md, AGENTS.md or CLAUDE.md.
  • Read the whole diff against origin/main (9 files, +1599/-13), and git diff ecc79aa 70f7873 for revieworder.go and revieworder_test.go: the only changes since round 1 are the round-1 fixes and the dropped second metaReviewHead. The order still does everything the bead asks. It slings instead of only assigning, keeps the bead's shape and adds review_round, keeps the schedule condition behind FORGEJO_REVIEW_NEEDS_SCHEDULE (only exactly off drops it), handles both shapes of handover, finds an existing bead by pr_url and review_head in any status, ships switched off, and is Go with a one-line exec. The README section, the changelog fragment and the description with its switch-on settings and trial are all there.
  • Checked the order against #80. review take needs a review bead with pr_url and a full review_head, and the order's bead has both. take sets the bead in_progress, so the order's "made and not slung" path (open, no gc.execution_routed_to, no assignee) never takes up a bead that a Reviewer holds. A duplicate that take voids is still a bead for that pr_url and review_head, so the order makes no third one. findReviewer looks for <rig>/forgejo.reviewer in gc agent list, as findOperator does; a pool template should be listed the same way. Step 4 of the trial confirms it in the live city.
  • Merged the head into origin/main 0dead58: CONFLICT in README.md, forgejo/assets/forgejo/main.go and forgejo/pack.toml. To test only, resolved as the findings say (main's side for README.md and pack.toml, both commands in the usage line). On that result, with the city's variables removed: go vet ./... ok; go test ./... and go test -race ./... ok for both packages; gc lint . ok; tests/formula.sh, reviewer.sh, operator-overlay.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, merge.sh, handover.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh and permission-request.sh all ok.
  • Built the changelog checker from mikluko/changelog at tag v2 (cmd/changelog) and ran it with -base main on the merge result: valid=true.
  • The head's own checks: success.
Review of 70f78736cfa3c297a12a45d6b4c2f320913690e7 for gascitypacks-omd. Checks of the head: success. ### Verdict fail The order is ready, and both findings of round 1 are fixed: there is one `createdID` (order.go's), and `review_wait` is cleared on every path through `clearWait`, with `TestReviewOrderForgetsTheWaitWhereTheReviewWasAskedForAlready` covering it. The verdict is fail only because `main` moved again after this rebase. #75 (555cd59) and #80 (0dead58, the Reviewer becomes a pool) landed on top of c06effd. The head no longer merges into `main` 0dead58: git reports conflicts in three files, and the forge says `not_mergeable`. It needs one more rebase, onto 0dead58 or later. After a resolution like the one below, every check CI runs passes. ### Findings - [blocking] forgejo/pack.toml:4-18: conflicts with #80. #80 removed both `[[named_session]]` blocks for `reviewer` and gave the description "…as its Reviewer, a pool of one session that a city can raise." Resolve by keeping main's file without the `[[named_session]]` blocks and adding this PR's clause about the review order to main's description. Do not keep the PR's side of this hunk: it would bring the named sessions back, and gc limits a template behind an on-demand named session to one session, so a city's `max_active_sessions` patch would do nothing (README, "More than one Reviewer"). - [blocking] forgejo/assets/forgejo/main.go:138: conflicts with #80, which added `review take`. Keep both commands in the usage error: `` `pr open`, `pr state`, `pr merge`, `pr review`, `review take`, `order merge`, `order checks`, `order schedule` or `order review` ``. The `order review` dispatch case and the doc comment merge without conflict. - [blocking] README.md:431 ("How a review bead reaches it"): conflicts with #80. Keep main's paragraph. It says the Reviewer is a pool and no named session, so no assignee string has to wake one, and it drops the "question 4 … which a trial settles" sentence. In its last clause, replace "the review order, once it exists, slings the bead" with a link to [the review order](#the-review-order), which slings. Do not bring back "Which assignee string wakes an acp named session is question 4": after #80 it is no longer true. README.md:403 merges cleanly to main's text, the pool. Keep that as well. ### Verified - Read the work bead gascitypacks-omd (L15, section 3.5, the four points, "Done when", and the round-1 and round-3 notes), the PR's description, and `README.md` of `origin/main` 0dead58. `origin/main` has no `REVIEW.md`, `AGENTS.md` or `CLAUDE.md`. - Read the whole diff against `origin/main` (9 files, +1599/-13), and `git diff ecc79aa 70f7873` for revieworder.go and revieworder_test.go: the only changes since round 1 are the round-1 fixes and the dropped second `metaReviewHead`. The order still does everything the bead asks. It slings instead of only assigning, keeps the bead's shape and adds `review_round`, keeps the schedule condition behind `FORGEJO_REVIEW_NEEDS_SCHEDULE` (only exactly `off` drops it), handles both shapes of handover, finds an existing bead by `pr_url` and `review_head` in any status, ships switched off, and is Go with a one-line exec. The README section, the changelog fragment and the description with its switch-on settings and trial are all there. - Checked the order against #80. `review take` needs a review bead with `pr_url` and a full `review_head`, and the order's bead has both. `take` sets the bead `in_progress`, so the order's "made and not slung" path (open, no `gc.execution_routed_to`, no assignee) never takes up a bead that a Reviewer holds. A duplicate that `take` voids is still a bead for that `pr_url` and `review_head`, so the order makes no third one. `findReviewer` looks for `<rig>/forgejo.reviewer` in `gc agent list`, as `findOperator` does; a pool template should be listed the same way. Step 4 of the trial confirms it in the live city. - Merged the head into `origin/main` 0dead58: CONFLICT in README.md, forgejo/assets/forgejo/main.go and forgejo/pack.toml. To test only, resolved as the findings say (main's side for README.md and pack.toml, both commands in the usage line). On that result, with the city's variables removed: `go vet ./...` ok; `go test ./...` and `go test -race ./...` ok for both packages; `gc lint .` ok; tests/formula.sh, reviewer.sh, operator-overlay.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, merge.sh, handover.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh and permission-request.sh all ok. - Built the changelog checker from mikluko/changelog at tag v2 (`cmd/changelog`) and ran it with `-base main` on the merge result: `valid=true`. - The head's own checks: `success`.
mikluko force-pushed worker/gascitypacks-omd from 70f78736cf
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 18s
test / scripts (pull_request) Successful in 36s
to 6120cacfc2
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 21s
test / scripts (pull_request) Successful in 35s
2026-11-12 16:13:34 +00:00
Compare
city-root-review left a comment

Review of 6120cacfc2 for gascitypacks-omd. Checks of the head: success.

Verdict

pass

All three findings of round 2 (review 276) are resolved as it gave them, and the head is now on top of main 8a95663, so the merge is a fast-forward. The order does what row L15, section 3.5 and the work bead's four points ask, and every check CI runs passes on the result.

Findings

  • [minor] forgejo/assets/forgejo/revieworder.go:122-124, 181-188: logged belongs to one run (newReviewOrder makes it empty each time), so logOnce keeps a line from repeating within a run and not across runs, as the comment "the lines that would come every run" suggests. The old-shape line at :348 carries the bead's id, so within a run it never repeats anyway. This is harmless. Reword the comment, or leave it.

Verified

  • Read the work bead gascitypacks-omd (L15, 3.5, the four points, "Done when", and the notes of rounds 1 to 3), the PR's description with its sections for rounds 3 and 4, reviews 237 and 276, and README.md of origin/main 8a95663. origin/main has no REVIEW.md, AGENTS.md or CLAUDE.md.
  • Read the whole diff against origin/main (9 files, +1599/-13): all of revieworder.go, the fake gc and the list of tests in revieworder_test.go, main.go, order.go (the review_head skip), review.sh, review.toml, pack.toml, the README sections and the changelog fragment.
  • Round 2's findings: forgejo/pack.toml is main's file, with no [[named_session]] blocks, plus the review order's clause in the description. main.go's usage error lists both review take and order review. README "How a review bead reaches it" is main's paragraph (the pool, with no "question 4" sentence), and its last clause links the review order. "What is not there yet" no longer names L15. "The Reviewer" describes the pool.
  • Checked against the bead: the order slings and does not only assign. It keeps the bead's shape (title, the labels service and review, pr_url, review_head and work_bead) and adds review_round and review_made_by. The schedule condition stays behind FORGEJO_REVIEW_NEEDS_SCHEDULE, and only exactly off drops it. It takes both shapes of handover. The old shape is open, has pr_url, and has none of merge_result, pr_event, review_head or worker_session, nor the labels service/review. The order finds an existing bead by pr_url and review_head in any status, ships switched off (FORGEJO_REVIEW=on), and is Go behind a one-line exec. The README, the fragment and the description (switch-on with and without the schedule order, both shapes, the trial) are all present.
  • Checked against the live city with reads only. gc agent list --json lists gascitypacks/forgejo.reviewer (the pool) as qualified_name, which findReviewer matches. gc bd list --all --metadata-field pr_url=<#58> --metadata-field review_head=6120cac… returns only gascitypacks-urdd, so real gc ANDs the two filters, as the test's fake does. --label review --metadata-field pr_url=<#58> returns the four review beads of this pull request, which is what review_round counts.
  • Merged the head into origin/main 8a95663: a fast-forward, no conflict. The forge says mergeable.
  • On the result, with the city's variables removed (env -i, proved 0): go vet ./... ok. go test ./... and go test -race ./... ok for both packages. gc lint . printed "2 pack(s) ok". tests/formula.sh, reviewer.sh, operator-overlay.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, merge.sh, handover.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh and permission-request.sh all exited 0.
  • Built the changelog checker from mikluko/changelog at tag v2 (087d7e8, cmd/changelog) and ran it with -base main on the result: valid=true.
  • The head's own checks: success.
Review of 6120cacfc254bd64bc674752f47de1cb2d89d1a7 for gascitypacks-omd. Checks of the head: success. ### Verdict pass All three findings of round 2 (review 276) are resolved as it gave them, and the head is now on top of `main` 8a95663, so the merge is a fast-forward. The order does what row L15, section 3.5 and the work bead's four points ask, and every check CI runs passes on the result. ### Findings - [minor] forgejo/assets/forgejo/revieworder.go:122-124, 181-188: `logged` belongs to one run (`newReviewOrder` makes it empty each time), so `logOnce` keeps a line from repeating within a run and not across runs, as the comment "the lines that would come every run" suggests. The old-shape line at :348 carries the bead's id, so within a run it never repeats anyway. This is harmless. Reword the comment, or leave it. ### Verified - Read the work bead gascitypacks-omd (L15, 3.5, the four points, "Done when", and the notes of rounds 1 to 3), the PR's description with its sections for rounds 3 and 4, reviews 237 and 276, and `README.md` of `origin/main` 8a95663. `origin/main` has no `REVIEW.md`, `AGENTS.md` or `CLAUDE.md`. - Read the whole diff against `origin/main` (9 files, +1599/-13): all of revieworder.go, the fake gc and the list of tests in revieworder_test.go, main.go, order.go (the `review_head` skip), review.sh, review.toml, pack.toml, the README sections and the changelog fragment. - Round 2's findings: `forgejo/pack.toml` is main's file, with no `[[named_session]]` blocks, plus the review order's clause in the description. `main.go`'s usage error lists both `review take` and `order review`. README "How a review bead reaches it" is main's paragraph (the pool, with no "question 4" sentence), and its last clause links [the review order](#the-review-order). "What is not there yet" no longer names L15. "The Reviewer" describes the pool. - Checked against the bead: the order slings and does not only assign. It keeps the bead's shape (title, the labels `service` and `review`, `pr_url`, `review_head` and `work_bead`) and adds `review_round` and `review_made_by`. The schedule condition stays behind `FORGEJO_REVIEW_NEEDS_SCHEDULE`, and only exactly `off` drops it. It takes both shapes of handover. The old shape is open, has `pr_url`, and has none of `merge_result`, `pr_event`, `review_head` or `worker_session`, nor the labels `service`/`review`. The order finds an existing bead by `pr_url` and `review_head` in any status, ships switched off (`FORGEJO_REVIEW=on`), and is Go behind a one-line exec. The README, the fragment and the description (switch-on with and without the schedule order, both shapes, the trial) are all present. - Checked against the live city with reads only. `gc agent list --json` lists `gascitypacks/forgejo.reviewer` (the pool) as `qualified_name`, which `findReviewer` matches. `gc bd list --all --metadata-field pr_url=<#58> --metadata-field review_head=6120cac…` returns only gascitypacks-urdd, so real gc ANDs the two filters, as the test's fake does. `--label review --metadata-field pr_url=<#58>` returns the four review beads of this pull request, which is what `review_round` counts. - Merged the head into `origin/main` 8a95663: a fast-forward, no conflict. The forge says `mergeable`. - On the result, with the city's variables removed (`env -i`, proved 0): `go vet ./...` ok. `go test ./...` and `go test -race ./...` ok for both packages. `gc lint .` printed "2 pack(s) ok". tests/formula.sh, reviewer.sh, operator-overlay.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, merge.sh, handover.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh and permission-request.sh all exited 0. - Built the changelog checker from mikluko/changelog at tag v2 (087d7e8, `cmd/changelog`) and ran it with `-base main` on the result: `valid=true`. - The head's own checks: `success`.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
3 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!58
No description provided.