The merge order's first run reports old pull requests as news: 29 beads and mails for the Operator #51

Merged
city-root merged 3 commits from worker/gascitypacks-nf2 into main 2026-11-12 13:15:49 +00:00
Contributor

Fixes the merge order's first run in rexcity's store, which on 2026-11-12 made 29 beads and 29 notifying mails for pull requests another city had closed days before, and set merge_result=closed on their beads.

Why the forge answers 404

I read the forge with the city's token (nothing written). For rexcity#39 the API, the web page and the issues API (/repos/mikluko/rexcity/issues/39) all answer 404, and the forge's listing of pull requests (state=all, 49 of them) has no #16, #25 and #31 to #60. So these pull requests are gone from the forge, together with their issue rows, and are not closed: pull requests and issues share one numbering, and a pull request whose head repository was deleted would still be there. #61 onward, opened by the city that works the rig now, are all present. The order was right that the forge has no such pull request; it was wrong to call that "closed" and to call it news.

What the order does now

  1. History is not news. The first run in a store is its baseline: it finds no closed bead with pr_event=baseline. In it, a pull request that has ended (merged, closed unmerged, gone) is history: its beads are recorded as it ended, with one log line and no bead or mail for the Operator. The run then leaves the marker, a closed bead "Merge order: first run in this store" that says how many it found of each kind. Every later run finds the marker and tells the Operator of every pull request that ends.
    • Why this cannot hide a real "closed unmerged": a pull request that is open at the baseline is not settled by it, so when it closes unmerged later the Operator is told (test FirstRunHidesNoPullRequestThatEndsLater); one the baseline could not read is left and is news later, even though the marker is written (FirstRunLeavesAPullRequestItCannotRead); a marker that cannot be written fails the run and the next is a baseline again. What is hidden is only a pull request that closed unmerged in the minutes before the order's first run in a store, which no earlier run could have told the Operator of. I chose a first-seen marker over bead age because a pull request can stay open for days and close unmerged long after its bead closed at the opening: age cannot tell that from history. Beads of the old shape (open, with a pr_url) are not history and are handed over whenever found closed. The baseline marker is an ordinary closed bead: if something removes it, the next run is a baseline again and settles quietly what ended since the previous run (the README says so).
    • The marker is a bead because gc bd kv is refused on this city's split storage, and the order has no other state.
  2. A 404 is not "closed". It is recorded as merge_result=missing, never closed. Can a 404 be the answer for a live pull request? The tool already took only the forge's own error object as "not found" (a proxy's or a restarting forge's 404 is an error). But Forgejo answers the same "not found" for a pull request in a repository the token cannot read, so the order now also reads the repository: when that answers, the pull request is missing; when it is "not found" too, or fails, nothing is settled and the run fails with the reason (tests: unreadable repository, proxy 404, repository 500). A deleted repository therefore fails the run every two minutes until someone looks: I took that over a silent settlement. gc forgejo pr state is unchanged.
  3. One run cannot flood the Operator. More than three pull requests of one kind in a run (merged, closed unmerged, not found) are one bead that lists them (pr_event=closed_batch or missing_batch, pr_batch the hash of the URLs) and one mail; merges are one mail. Up to three, each has its own bead and mail as before. The old shape is under the same limit: more than three open beads of one kind (closed unmerged, or gone) are all still assigned to the Operator, with pr_closed recorded, but one mail lists the kind. If a run fails after making the listing bead, the next run finds it and makes no second, but the pull request whose records failed to write is then a kind of one and gets a bead of its own: one possible duplicate, tested and documented.

The 29 beads of rexcity marked closed

The order corrects them itself: its baseline run rereads the beads recorded as merge_result=closed, reads each pull request once, and records missing on those the forge does not have, with no mail; a bead whose pull request really closed stays closed. Since no earlier version left the marker, every store's baseline run is the first run after this version is imported, in rexcity's too, so no one-time command is needed. The two minutes before the import are the exposure noted above. I did not touch any store's data: the tests run against a fake city.

Checks

go vet and go test ./... in forgejo pass. New Go tests: history (merged, closed, gone; 29 at once), the baseline's limits, 404 with a readable repository, with an unreadable one, from a proxy and with a failing one, the flood of each kind, the listing bead made once, the correction of wrongly closed beads, and no reread on later runs. tests/merge.sh has its stub answer the marker lookup. tests/formula.sh, gc lint . and the v1 changelog check pass. Changelog note as a fragment, .changelog/merge-order-history.md (Fixed); README's merge-order section describes the baseline, the 404 and the flood. No shell logic added.

Bead: gascitypacks-nf2

Rework, round 1 (review 203)

  • Rebased onto main (50455b6, #49); CHANGELOG.md keeps both entries, and --from controller is on every mail of the new code, with the tests reading subject and body at indexes 7 and 9.
  • The old shape now counts under the flood limit (above), with a test of four beads of each kind: two mails, every bead assigned, a quiet second run.
  • The README names the baseline marker's exposure.
  • Re-run: go vet, go test -race, tests/merge|apply|upgrade|permission-request|formula|reviewer.sh, the v1 changelog check.

Rework, round 2 (review 212)

  • forgejo/forgejo, a compiled binary a go build left in the checkout, is out of every commit of the branch (the rebase dropped it from the commit that added it), and nothing in the diff is a binary now.
  • Rebased onto main (53a9474, #52). The changelog note moved, unchanged, from CHANGELOG.md to the fragment .changelog/merge-order-history.md; CHANGELOG.md is as on main, so the merge does not start the release workflow.
  • Re-run on the rebased head: go vet, go test -race ./... in forgejo, tests/merge.sh, tests/formula.sh, and go run sarak.sh/mikluko/changelog/v2/cmd/changelog@latest -base main (valid=true).
Fixes the merge order's first run in rexcity's store, which on 2026-11-12 made 29 beads and 29 notifying mails for pull requests another city had closed days before, and set `merge_result=closed` on their beads. ## Why the forge answers 404 I read the forge with the city's token (nothing written). For rexcity#39 the API, the web page and the issues API (`/repos/mikluko/rexcity/issues/39`) all answer 404, and the forge's listing of pull requests (`state=all`, 49 of them) has no #16, #25 and #31 to #60. So these pull requests are gone from the forge, together with their issue rows, and are not closed: pull requests and issues share one numbering, and a pull request whose head repository was deleted would still be there. #61 onward, opened by the city that works the rig now, are all present. The order was right that the forge has no such pull request; it was wrong to call that "closed" and to call it news. ## What the order does now 1. **History is not news.** The first run in a store is its *baseline*: it finds no closed bead with `pr_event=baseline`. In it, a pull request that has ended (merged, closed unmerged, gone) is history: its beads are recorded as it ended, with one log line and no bead or mail for the Operator. The run then leaves the marker, a closed bead "Merge order: first run in this store" that says how many it found of each kind. Every later run finds the marker and tells the Operator of every pull request that ends. - *Why this cannot hide a real "closed unmerged":* a pull request that is open at the baseline is not settled by it, so when it closes unmerged later the Operator is told (test `FirstRunHidesNoPullRequestThatEndsLater`); one the baseline could not read is left and is news later, even though the marker is written (`FirstRunLeavesAPullRequestItCannotRead`); a marker that cannot be written fails the run and the next is a baseline again. What is hidden is only a pull request that closed unmerged in the minutes before the order's first run in a store, which no earlier run could have told the Operator of. I chose a first-seen marker over bead age because a pull request can stay open for days and close unmerged long after its bead closed at the opening: age cannot tell that from history. Beads of the old shape (open, with a `pr_url`) are not history and are handed over whenever found closed. The baseline marker is an ordinary closed bead: if something removes it, the next run is a baseline again and settles quietly what ended since the previous run (the README says so). - The marker is a bead because `gc bd kv` is refused on this city's split storage, and the order has no other state. 2. **A 404 is not "closed".** It is recorded as `merge_result=missing`, never `closed`. Can a 404 be the answer for a live pull request? The tool already took only the forge's own error object as "not found" (a proxy's or a restarting forge's 404 is an error). But Forgejo answers the same "not found" for a pull request in a repository the token cannot read, so the order now also reads the repository: when that answers, the pull request is missing; when it is "not found" too, or fails, nothing is settled and the run fails with the reason (tests: unreadable repository, proxy 404, repository 500). A deleted repository therefore fails the run every two minutes until someone looks: I took that over a silent settlement. `gc forgejo pr state` is unchanged. 3. **One run cannot flood the Operator.** More than three pull requests of one kind in a run (merged, closed unmerged, not found) are one bead that lists them (`pr_event=closed_batch` or `missing_batch`, `pr_batch` the hash of the URLs) and one mail; merges are one mail. Up to three, each has its own bead and mail as before. The old shape is under the same limit: more than three open beads of one kind (closed unmerged, or gone) are all still assigned to the Operator, with `pr_closed` recorded, but one mail lists the kind. If a run fails after making the listing bead, the next run finds it and makes no second, but the pull request whose records failed to write is then a kind of one and gets a bead of its own: one possible duplicate, tested and documented. ## The 29 beads of rexcity marked `closed` The order corrects them itself: its baseline run rereads the beads recorded as `merge_result=closed`, reads each pull request once, and records `missing` on those the forge does not have, with no mail; a bead whose pull request really closed stays `closed`. Since no earlier version left the marker, every store's baseline run is the first run after this version is imported, in rexcity's too, so no one-time command is needed. The two minutes before the import are the exposure noted above. I did not touch any store's data: the tests run against a fake city. ## Checks `go vet` and `go test ./...` in `forgejo` pass. New Go tests: history (merged, closed, gone; 29 at once), the baseline's limits, 404 with a readable repository, with an unreadable one, from a proxy and with a failing one, the flood of each kind, the listing bead made once, the correction of wrongly closed beads, and no reread on later runs. `tests/merge.sh` has its stub answer the marker lookup. `tests/formula.sh`, `gc lint .` and the v1 changelog check pass. Changelog note as a fragment, `.changelog/merge-order-history.md` (Fixed); README's merge-order section describes the baseline, the 404 and the flood. No shell logic added. Bead: gascitypacks-nf2 ## Rework, round 1 (review 203) - Rebased onto main (50455b6, #49); `CHANGELOG.md` keeps both entries, and `--from controller` is on every mail of the new code, with the tests reading subject and body at indexes 7 and 9. - The old shape now counts under the flood limit (above), with a test of four beads of each kind: two mails, every bead assigned, a quiet second run. - The README names the baseline marker's exposure. - Re-run: `go vet`, `go test -race`, `tests/merge|apply|upgrade|permission-request|formula|reviewer.sh`, the v1 changelog check. ## Rework, round 2 (review 212) - `forgejo/forgejo`, a compiled binary a `go build` left in the checkout, is out of every commit of the branch (the rebase dropped it from the commit that added it), and nothing in the diff is a binary now. - Rebased onto main (53a9474, #52). The changelog note moved, unchanged, from `CHANGELOG.md` to the fragment `.changelog/merge-order-history.md`; `CHANGELOG.md` is as on main, so the merge does not start the `release` workflow. - Re-run on the rebased head: `go vet`, `go test -race ./...` in `forgejo`, `tests/merge.sh`, `tests/formula.sh`, and `go run sarak.sh/mikluko/changelog/v2/cmd/changelog@latest -base main` (`valid=true`).
fix: the merge order's first run settles history quietly, records a 404 as missing, and cannot flood the Operator (gascitypacks-nf2)
All checks were successful
test / changelog (pull_request) Successful in 9s
test / lint (pull_request) Successful in 21s
test / scripts (pull_request) Successful in 34s
30b5df7e72
The order's first run in rexcity's store (2026-11-12, after the 0.6.0 import) took 29 pull requests that another city had closed days before for news: it set merge_result=closed on their beads, made a bead and sent a notifying mail to the Operator for each. The forge answers 404 for those: the API, the web page and the issues API all do, and the numbers 16, 25 and 31 to 60 are absent from rexcity's numbering, so they were deleted, not closed.

Three changes, all in the order's Go code:
- The first run in a store (no closed bead with pr_event=baseline) is its baseline. A pull request that has ended by then is history: its beads are recorded as it ended (merged, closed or missing) with no bead and no mail, and the run leaves the marker bead. A pull request open at the baseline is told when it ends, and one the baseline could not read is left and is news later, so nothing is hidden that an earlier run could have told.
- A "not found" is merge_result=missing, never closed. Forgejo answers the same for a repository the token cannot read, so the order reads the repository too and settles nothing, failing the run, when that is not found as well.
- A run that would tell the Operator of more than three pull requests of one kind files one bead that lists them (pr_event=closed_batch or missing_batch, pr_batch the hash of the URLs) and sends one mail, or one mail for merges.

The baseline run also rereads the beads recorded as merge_result=closed and records missing on those the forge does not have, which corrects rexcity's 29 with no mail and no one-time command.

Validation: go vet and go test in forgejo (new tests for history, the baseline's limits, a 404 with a readable and an unreadable repository and a proxy's 404, the flood of each kind, the listing bead made once, and the correction), tests/merge.sh and tests/formula.sh, gc lint, and the v1 changelog check. The data of rexcity was read and not changed.

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

Review of 30b5df7e72 for gascitypacks-nf2. Checks of the head: success.

Verdict

fail

Findings

  • [blocking] The pull request does not merge into main; the forge says not_mergeable. main gained 50455b6 ("Mail from an order shows human as its sender", #49) after this branch was cut, and merging the head into origin/main conflicts in CHANGELOG.md (both add an entry under [Unreleased] / Fixed; keep both) and in forgejo/assets/forgejo/order.go at recordMerge (~line 460 on main, 625 here). Rebase onto origin/main (50455b6). #49 changes more than the text of the conflict, so the rebase has to carry its convention into the new code:
    • every gc mail send of the order passes --from mailSender (controller). Git will carry it into handOver (order.go:420) and mailOperatorBead (order.go:942). It will not reach the new recordMergedMany (order.go:640), and the rewritten recordMerge (order.go:626) has to keep it;
    • since #49, the fake city in order_test.go fails every mail that lacks exactly one --from controller. It also moves the subject and body of a recorded mail from indexes 5 and 7 to 7 and 9. The new tests read r.city.mails[0][5] and [7] (e.g. TestMergeOrderFirstRunHidesNoPullRequestThatEndsLater, TestMergeOrderTellsOfManyClosedPullRequestsInOneBeadAndOneMail, ...ManyMissing..., ...ManyMerges...), so they need the new indexes.
  • [blocking] order.go:364-388 and 411-434 (settleOpenBead / handOver): done-when 3 of the work bead ("When a run would hand the Operator more than a few beads of one kind, it files one bead that lists them and sends one mail") is met for the closed shape only. Beads of the old shape (open, with a pr_url) are still handed over one by one: N such beads whose pull requests closed unmerged or are gone mean N assignments and N --notify mails in one run. They are also, by design, never history. So a store adopted with many open beads pointing at deleted pull requests floods the Operator exactly as rexcity's did. The PR description and the README section "One run cannot flood the Operator" claim the property without that limit. Fix: put the old shape's hand-overs under floodLimit too (above it, still assign or mark each bead, but send one mail, or file one listing bead, for the run). Or, if the old shape is meant to stay out of scope, get that decided on the work bead and say it in the README and the description.
  • [minor] README "History is not news" / order.go:742 firstRun: the baseline marker is an ordinary closed bead. If it is ever removed (a cleanup or compaction of closed beads, or a person deleting it), the next run is a baseline again and quietly settles whatever ended since the previous run. The bead's description asks people to leave it closed. The README should name this exposure next to the "minutes before the first run" one.

Verified

  • Read the work bead gascitypacks-nf2, the PR description, and README.md of origin/main (the repository has no REVIEW.md, AGENTS.md or CLAUDE.md). Read the whole diff (7 files, +853/-62) and the unchanged parts of order.go it relies on (orderMerge, settleOpen, handOver, operatorBead).
  • Done-when 1 (baseline), 2 (missing, and the repository read in confirmMissing that settles nothing on an unreadable repository, a proxy 404 or a 5xx), 4 (the baseline run's correctClosed corrects the 29, no store touched by the tests) and 5 (Go tests for each case, CHANGELOG under [Unreleased] Fixed, no new shell logic; tests/merge.sh only teaches its stub the marker lookup) are met in the code as I read it. Done-when 3 is met for the closed shape only (above).
  • Merge of the head into origin/main in a scratch clone: conflicts in CHANGELOG.md and forgejo/assets/forgejo/order.go. Merge aborted.
  • On the head, with the city's variables removed: go vet ./..., go test ./... and go test -race ./... in forgejo pass. tests/merge.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh, formula.sh and reviewer.sh pass. The changelog checker built from mikluko/changelog v1 (7ec45bb, 1.6.0) exits 0. gc lint . was not run locally; the head's own CI checks are success.
Review of 30b5df7e72e2668a18d2009d3df2330845d5746c for gascitypacks-nf2. Checks of the head: success. ### Verdict fail ### Findings - [blocking] The pull request does not merge into `main`; the forge says `not_mergeable`. `main` gained 50455b6 ("Mail from an order shows human as its sender", #49) after this branch was cut, and merging the head into `origin/main` conflicts in `CHANGELOG.md` (both add an entry under `[Unreleased]` / Fixed; keep both) and in `forgejo/assets/forgejo/order.go` at `recordMerge` (~line 460 on main, 625 here). Rebase onto `origin/main` (50455b6). #49 changes more than the text of the conflict, so the rebase has to carry its convention into the new code: - every `gc mail send` of the order passes `--from mailSender` (`controller`). Git will carry it into `handOver` (order.go:420) and `mailOperatorBead` (order.go:942). It will not reach the new `recordMergedMany` (order.go:640), and the rewritten `recordMerge` (order.go:626) has to keep it; - since #49, the fake city in `order_test.go` fails every mail that lacks exactly one `--from controller`. It also moves the subject and body of a recorded mail from indexes 5 and 7 to 7 and 9. The new tests read `r.city.mails[0][5]` and `[7]` (e.g. `TestMergeOrderFirstRunHidesNoPullRequestThatEndsLater`, `TestMergeOrderTellsOfManyClosedPullRequestsInOneBeadAndOneMail`, `...ManyMissing...`, `...ManyMerges...`), so they need the new indexes. - [blocking] order.go:364-388 and 411-434 (`settleOpenBead` / `handOver`): done-when 3 of the work bead ("When a run would hand the Operator more than a few beads of one kind, it files one bead that lists them and sends one mail") is met for the closed shape only. Beads of the old shape (open, with a `pr_url`) are still handed over one by one: N such beads whose pull requests closed unmerged or are gone mean N assignments and N `--notify` mails in one run. They are also, by design, never history. So a store adopted with many open beads pointing at deleted pull requests floods the Operator exactly as rexcity's did. The PR description and the README section "One run cannot flood the Operator" claim the property without that limit. Fix: put the old shape's hand-overs under `floodLimit` too (above it, still assign or mark each bead, but send one mail, or file one listing bead, for the run). Or, if the old shape is meant to stay out of scope, get that decided on the work bead and say it in the README and the description. - [minor] README "History is not news" / order.go:742 `firstRun`: the baseline marker is an ordinary closed bead. If it is ever removed (a cleanup or compaction of closed beads, or a person deleting it), the next run is a baseline again and quietly settles whatever ended since the previous run. The bead's description asks people to leave it closed. The README should name this exposure next to the "minutes before the first run" one. ### Verified - Read the work bead gascitypacks-nf2, the PR description, and `README.md` of `origin/main` (the repository has no `REVIEW.md`, `AGENTS.md` or `CLAUDE.md`). Read the whole diff (7 files, +853/-62) and the unchanged parts of `order.go` it relies on (`orderMerge`, `settleOpen`, `handOver`, `operatorBead`). - Done-when 1 (baseline), 2 (`missing`, and the repository read in `confirmMissing` that settles nothing on an unreadable repository, a proxy 404 or a 5xx), 4 (the baseline run's `correctClosed` corrects the 29, no store touched by the tests) and 5 (Go tests for each case, CHANGELOG under `[Unreleased]` Fixed, no new shell logic; `tests/merge.sh` only teaches its stub the marker lookup) are met in the code as I read it. Done-when 3 is met for the closed shape only (above). - Merge of the head into `origin/main` in a scratch clone: conflicts in `CHANGELOG.md` and `forgejo/assets/forgejo/order.go`. Merge aborted. - On the head, with the city's variables removed: `go vet ./...`, `go test ./...` and `go test -race ./...` in `forgejo` pass. `tests/merge.sh`, `worktree-setup.sh`, `worktree.sh`, `gnu-tools.sh`, `apply.sh`, `upgrade.sh`, `view-beads.sh`, `view-mail.sh`, `permission-deny.sh`, `formula.sh` and `reviewer.sh` pass. The changelog checker built from mikluko/changelog `v1` (7ec45bb, 1.6.0) exits 0. `gc lint .` was not run locally; the head's own CI checks are `success`.
mikluko force-pushed worker/gascitypacks-nf2 from 30b5df7e72
All checks were successful
test / changelog (pull_request) Successful in 9s
test / lint (pull_request) Successful in 21s
test / scripts (pull_request) Successful in 34s
to cae43251ca
All checks were successful
test / lint (pull_request) Successful in 18s
test / changelog (pull_request) Successful in 6s
test / scripts (pull_request) Successful in 35s
2026-11-12 12:26:11 +00:00
Compare
city-root-review requested changes 2026-11-12 12:37:40 +00:00
Dismissed
city-root-review left a comment

Review of cae43251ca for gascitypacks-nf2. Checks of the head: success.

Verdict

fail

Findings

  • [blocking] forgejo/forgejo (new, 10,180,194 bytes, mode 755): commit cae4325 adds a compiled binary to the repository, a Mach-O arm64 executable (magic cffaedfe), apparently left behind by a go build run in forgejo/. It is not part of the change, .gitignore does not cover it, and once merged it ships in the forgejo pack to every city that imports the pack and stays in the history for good. Fix: drop it from the branch (git rm --cached forgejo/forgejo and amend or fix up cae4325, so that no commit of the pull request carries it), and build somewhere outside the checkout from now on (or add /forgejo/forgejo to .gitignore).
  • [blocking] CHANGELOG.md:13 (the new line under [Unreleased] / Fixed): main has moved again since the rebase onto #49. 53a9474 ("Take changelog notes as fragments in .changelog/, on changelog v2", #52) changed the repository's convention. The README's "Releases" section on main now says: "A pull request notes its change in a file of its own in .changelog/, a fragment, and never edits CHANGELOG.md". The merge is clean as text, and the v2 checker accepts the line, because it reads a note added to CHANGELOG.md as a release does. But the line breaks the convention, and since the merge changes CHANGELOG.md, it also starts the release workflow on main. Fix: rebase onto origin/main (53a9474). Move the entry, unchanged, into a fragment such as .changelog/merge-order-history.md (### Fixed, then the bullet), and leave CHANGELOG.md as it is on main. The work bead's "CHANGELOG entry under [Unreleased], Fixed" was written before #52, and a fragment is how that note is made now. Check with go run sarak.sh/mikluko/changelog/v2/cmd/changelog@latest -base main.

Verified

  • Round 1 (review 203 on 30b5df7) is addressed. The branch is rebased onto 50455b6 (#49). Every gc mail send in order.go passes --from mailSender (lines 458, 485, 703, 717, 1019; none without it), and the tests read the subject and body at indexes 7 and 9. The old shape is now under the flood limit: settleOpen collects what is owed, and handOverAll/handOverMany (order.go:419-506) assign each bead and record pr_closed but send one mail per kind above floodLimit, with --dedup handover:<hash>. Below the limit the per-bead path is the same as before. A failed mail leaves every bead for the next run, and a failed update leaves only that bead. The new test TestMergeOrderTellsOfManyOpenBeadsInOneMailForEachKind checks two mails, every bead assigned and open with pr_closed, and a quiet second run. The README names the marker's exposure and describes the old shape under the limit. The PR description has a rework section.
  • Read the work bead gascitypacks-nf2 with its round-1 note, the PR description, and README.md of origin/main (no REVIEW.md, AGENTS.md or CLAUDE.md there). Read the diff of cae4325 in full and the parts of the whole diff it touches (recordMerge, recordMergedMany, tellOperator, handOver, batchKey, main.go, main_test.go, tests/merge.sh). Done-when 1, 2, 4 and 5 stand as reviewed in round 1. Done-when 3 now holds for both shapes.
  • Merged the head into origin/main (53a9474) in a scratch clone: clean, no conflicts. The forge also says mergeable.
  • On the merge result, with the city's variables removed (proved: 0): go vet ./..., go test ./... and go test -race ./... in forgejo pass. tests/formula.sh, reviewer.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, merge.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh and permission-request.sh all exit 0. The changelog checker built from mikluko/changelog v2.0.1 source with -base main gives valid=true (the line in CHANGELOG.md counts as a note, see above). gc lint . was not run locally; the head's own CI checks are success.
Review of cae43251ca2dbe267c889cdc6517fe4b015fea9f for gascitypacks-nf2. Checks of the head: success. ### Verdict fail ### Findings - [blocking] `forgejo/forgejo` (new, 10,180,194 bytes, mode 755): commit cae4325 adds a compiled binary to the repository, a Mach-O arm64 executable (magic `cffaedfe`), apparently left behind by a `go build` run in `forgejo/`. It is not part of the change, `.gitignore` does not cover it, and once merged it ships in the `forgejo` pack to every city that imports the pack and stays in the history for good. Fix: drop it from the branch (`git rm --cached forgejo/forgejo` and amend or fix up cae4325, so that no commit of the pull request carries it), and build somewhere outside the checkout from now on (or add `/forgejo/forgejo` to `.gitignore`). - [blocking] `CHANGELOG.md:13` (the new line under `[Unreleased]` / Fixed): `main` has moved again since the rebase onto #49. 53a9474 ("Take changelog notes as fragments in .changelog/, on changelog v2", #52) changed the repository's convention. The README's "Releases" section on `main` now says: "A pull request notes its change in a file of its own in `.changelog/`, a fragment, and never edits `CHANGELOG.md`". The merge is clean as text, and the v2 checker accepts the line, because it reads a note added to `CHANGELOG.md` as a release does. But the line breaks the convention, and since the merge changes `CHANGELOG.md`, it also starts the `release` workflow on `main`. Fix: rebase onto `origin/main` (53a9474). Move the entry, unchanged, into a fragment such as `.changelog/merge-order-history.md` (`### Fixed`, then the bullet), and leave `CHANGELOG.md` as it is on `main`. The work bead's "CHANGELOG entry under [Unreleased], Fixed" was written before #52, and a fragment is how that note is made now. Check with `go run sarak.sh/mikluko/changelog/v2/cmd/changelog@latest -base main`. ### Verified - Round 1 (review 203 on 30b5df7) is addressed. The branch is rebased onto 50455b6 (#49). Every `gc mail send` in `order.go` passes `--from mailSender` (lines 458, 485, 703, 717, 1019; none without it), and the tests read the subject and body at indexes 7 and 9. The old shape is now under the flood limit: `settleOpen` collects what is owed, and `handOverAll`/`handOverMany` (order.go:419-506) assign each bead and record `pr_closed` but send one mail per kind above `floodLimit`, with `--dedup handover:<hash>`. Below the limit the per-bead path is the same as before. A failed mail leaves every bead for the next run, and a failed update leaves only that bead. The new test `TestMergeOrderTellsOfManyOpenBeadsInOneMailForEachKind` checks two mails, every bead assigned and open with `pr_closed`, and a quiet second run. The README names the marker's exposure and describes the old shape under the limit. The PR description has a rework section. - Read the work bead gascitypacks-nf2 with its round-1 note, the PR description, and `README.md` of `origin/main` (no `REVIEW.md`, `AGENTS.md` or `CLAUDE.md` there). Read the diff of cae4325 in full and the parts of the whole diff it touches (`recordMerge`, `recordMergedMany`, `tellOperator`, `handOver`, `batchKey`, `main.go`, `main_test.go`, `tests/merge.sh`). Done-when 1, 2, 4 and 5 stand as reviewed in round 1. Done-when 3 now holds for both shapes. - Merged the head into `origin/main` (53a9474) in a scratch clone: clean, no conflicts. The forge also says `mergeable`. - On the merge result, with the city's variables removed (proved: 0): `go vet ./...`, `go test ./...` and `go test -race ./...` in `forgejo` pass. `tests/formula.sh`, `reviewer.sh`, `worktree-setup.sh`, `worktree.sh`, `gnu-tools.sh`, `merge.sh`, `apply.sh`, `upgrade.sh`, `view-beads.sh`, `view-mail.sh`, `permission-deny.sh` and `permission-request.sh` all exit 0. The changelog checker built from mikluko/changelog v2.0.1 source with `-base main` gives `valid=true` (the line in `CHANGELOG.md` counts as a note, see above). `gc lint .` was not run locally; the head's own CI checks are `success`.
mikluko force-pushed worker/gascitypacks-nf2 from cae43251ca
All checks were successful
test / lint (pull_request) Successful in 18s
test / changelog (pull_request) Successful in 6s
test / scripts (pull_request) Successful in 35s
to 21b3195d21
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 12:40:07 +00:00
Compare
city-root-review left a comment

Review of 21b3195d21 for gascitypacks-nf2. Checks of the head: success.

Verdict

pass

Findings

  • [minor] README.md:375 ("What it reads"): "It makes the one request for the pull request, and none for the checks or the reviews" is no longer true. On a "not found" for the pull request the order now also reads the repository (confirmMissing, GET /repos/<owner>/<repo>), which the new "A 404 is not closed" paragraph describes. Fix: add "and, when the forge answers 'not found' for it, one for its repository".
  • [minor] order_test.go TestMergeOrderSettlesNothingOnA404OfAProxy: the failure is keyed /api/v1/repos/o/r, and the fake forge matches failures by path prefix (main_test.go:125), so the HTML 404 answers the read of the pull request itself. That case was already an error before this change. The test does not cover a forge 404 for the pull request followed by a proxy 404 for the repository. The code is safe there, since confirmMissing takes any 404 on the repository as unknown whether or not the forge wrote it, but the PR description lists "proxy 404" among the new tests of the repository read. A repoFailure with an HTML body after r.missingURL() would test that path.

Verified

  • Round 2 (review 212 on cae4325) is addressed. No commit of the branch (fceec86, adf7cb0, 21b3195) has forgejo/forgejo in its tree, and the diff has no binary file. The note is the fragment .changelog/merge-order-history.md (### Fixed, one bullet, in the same form as changelog-fragments.md on main), and CHANGELOG.md is not in the diff against main. Round 1's findings stand as fixed: --from mailSender is on every mail, the old shape is under floodLimit (handOverAll/handOverMany), and the README names the marker's exposure.
  • Read the work bead gascitypacks-nf2 with both rework notes, the PR description, and README.md of origin/main (there is no REVIEW.md, AGENTS.md or CLAUDE.md). Read the whole diff (7 files, +976/-78). Also read the code it relies on: pull (one read per URL per run, cached, so correctClosed in the baseline run makes no second request for a URL already read), client.defaultBranch (the repository read), handOver, list, operatorBead (lookup with --all), and schedule.go on main. Nothing there reads merge_result=closed, and the schedule order lists only merge_result=pull_request, so the new missing value does not reach it. gc bd list --help confirms --all includes closed beads and --metadata-field key=value filters, as firstRun and correctClosed need.
  • Done-when 1 to 5 hold as I read the code. 1: the baseline marker; history is written by recordHistory with no bead or mail; a pull request that is open, or that cannot be read, at the baseline is news later; a marker that cannot be written fails the run. 2: missing comes only after the repository reads fine, and a 404 or other failure on the repository settles nothing and fails the run. 3: tellOperator and handOverAll, with one listing bead and one mail per kind above three. 4: correctClosed in the baseline run, and the tests use a fake city. 5: Go tests for each case, a fragment under Fixed, and no new shell logic (tests/merge.sh only teaches its stub the marker lookup).
  • Merged the head into the current origin/main (739c65a, #53, which landed after the rebase and touches schedule.go, schedule_test.go, README.md and CHANGELOG.md): clean. The forge also says mergeable.
  • On the merge result, with the city's variables removed (proved: 0): go vet ./..., go test ./... and go test -race ./... in forgejo/assets/forgejo pass. tests/formula.sh, reviewer.sh, worktree-setup.sh, worktree.sh, gnu-tools.sh, merge.sh, apply.sh, upgrade.sh, view-beads.sh, view-mail.sh, permission-deny.sh and permission-request.sh all exit 0. The changelog checker built from mikluko/changelog v2.0.1 source (what the validate@v2 tag points to) with -base main gives valid=true. gc lint . was not run locally; the head's own CI checks are success.
Review of 21b3195d21176ce70b92ae9d11fa97f3963ba29c for gascitypacks-nf2. Checks of the head: success. ### Verdict pass ### Findings - [minor] README.md:375 ("What it reads"): "It makes the one request for the pull request, and none for the checks or the reviews" is no longer true. On a "not found" for the pull request the order now also reads the repository (`confirmMissing`, `GET /repos/<owner>/<repo>`), which the new "A 404 is not closed" paragraph describes. Fix: add "and, when the forge answers 'not found' for it, one for its repository". - [minor] order_test.go `TestMergeOrderSettlesNothingOnA404OfAProxy`: the failure is keyed `/api/v1/repos/o/r`, and the fake forge matches failures by path prefix (main_test.go:125), so the HTML 404 answers the read of the pull request itself. That case was already an error before this change. The test does not cover a forge 404 for the pull request followed by a proxy 404 for the repository. The code is safe there, since `confirmMissing` takes any 404 on the repository as unknown whether or not the forge wrote it, but the PR description lists "proxy 404" among the new tests of the repository read. A `repoFailure` with an HTML body after `r.missingURL()` would test that path. ### Verified - Round 2 (review 212 on cae4325) is addressed. No commit of the branch (fceec86, adf7cb0, 21b3195) has `forgejo/forgejo` in its tree, and the diff has no binary file. The note is the fragment `.changelog/merge-order-history.md` (`### Fixed`, one bullet, in the same form as `changelog-fragments.md` on main), and `CHANGELOG.md` is not in the diff against `main`. Round 1's findings stand as fixed: `--from mailSender` is on every mail, the old shape is under `floodLimit` (`handOverAll`/`handOverMany`), and the README names the marker's exposure. - Read the work bead gascitypacks-nf2 with both rework notes, the PR description, and `README.md` of `origin/main` (there is no `REVIEW.md`, `AGENTS.md` or `CLAUDE.md`). Read the whole diff (7 files, +976/-78). Also read the code it relies on: `pull` (one read per URL per run, cached, so `correctClosed` in the baseline run makes no second request for a URL already read), `client.defaultBranch` (the repository read), `handOver`, `list`, `operatorBead` (lookup with `--all`), and `schedule.go` on main. Nothing there reads `merge_result=closed`, and the schedule order lists only `merge_result=pull_request`, so the new `missing` value does not reach it. `gc bd list --help` confirms `--all` includes closed beads and `--metadata-field key=value` filters, as `firstRun` and `correctClosed` need. - Done-when 1 to 5 hold as I read the code. 1: the baseline marker; history is written by `recordHistory` with no bead or mail; a pull request that is open, or that cannot be read, at the baseline is news later; a marker that cannot be written fails the run. 2: `missing` comes only after the repository reads fine, and a 404 or other failure on the repository settles nothing and fails the run. 3: `tellOperator` and `handOverAll`, with one listing bead and one mail per kind above three. 4: `correctClosed` in the baseline run, and the tests use a fake city. 5: Go tests for each case, a fragment under Fixed, and no new shell logic (`tests/merge.sh` only teaches its stub the marker lookup). - Merged the head into the current `origin/main` (739c65a, #53, which landed after the rebase and touches `schedule.go`, `schedule_test.go`, `README.md` and `CHANGELOG.md`): clean. The forge also says `mergeable`. - On the merge result, with the city's variables removed (proved: 0): `go vet ./...`, `go test ./...` and `go test -race ./...` in `forgejo/assets/forgejo` pass. `tests/formula.sh`, `reviewer.sh`, `worktree-setup.sh`, `worktree.sh`, `gnu-tools.sh`, `merge.sh`, `apply.sh`, `upgrade.sh`, `view-beads.sh`, `view-mail.sh`, `permission-deny.sh` and `permission-request.sh` all exit 0. The changelog checker built from mikluko/changelog v2.0.1 source (what the `validate@v2` tag points to) with `-base main` gives `valid=true`. `gc lint .` was not run locally; the head's own CI checks are `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!51
No description provided.