Order checks: one mail to the Operator when a pull request's checks settle (CHECKS <bead>: <state> <pr_url>) #79

Merged
city-root merged 2 commits from worker/gascitypacks-hzpj into main 2026-11-12 14:17:27 +00:00
Contributor

Adds the forgejo pack's checks order: one poller for the city that mails the Operator once when the checks of a bead's open pull request settle, in place of a watch.sh per bead. This is piece 2 of the user's mail of 2026-11-12 (mail gcg-367617).

What it does. forgejo order checks (new checks_order.go; assets/scripts/checks.sh is the four-line stub, orders/checks.toml is cooldown, 2m, like merge). For each bead of its store that follows a pull request, it reads the pull request once, and when that is open, the head's checks through the code pr state uses. When the head is success or failure and the bead's recorded head and state are not those, it mails the Operator:

  • subject CHECKS <bead>: <success|failure> <pr_url>; body: the pull request, the store, the head sha, - <context>: <status> for each commit status, and the count of workflow runs by status;
  • --from controller --notify --dedup checks:<bead>:<sha>;
  • state per store in checks-<rig>.json (checks-hq.json) under GC_PACK_STATE_DIR, written atomically after the mail, and only for a mail that was sent: a failed mail is retried, and a mail that --dedup suppressed is not recorded.

not_started, pending and none are left alone, and so is a pull request that is not open (the merge order's). Beads taken: open/in_progress/blocked with pr_url, and closed with merge_result=pull_request; a bead with pr_event or review_head is skipped, so the order does not repeat gascitypacks-n905 (a review bead taken for work). checks.go gains headChecksDetail, which returns the statuses and runs headChecks combined; pr state --json is unchanged.

Where the logic lives. In Go, as docs/shell.md requires; the script is the stub the merge order has.

Decisions to look at.

  1. More than three beads owed in one run are one mail that lists them (CHECKS: <n> pull requests settled, dedup on the hash of the bead:head pairs). Without it the first run in a store mails every open pull request, which is the flood of #51. In the dry run below, that is 23 pull requests.
  2. The dedup key is the one in the mail (checks:<bead>:<sha>), so a run of the same head that changes state (failure to success, or the other way) is a new mail, which gc suppresses (exit 0) while the Operator has not archived the first. Round 1 found the order recorded such a mail as sent and lost it. It now sends with --json, treats count 0 with already_done as not sent, and does not record the bead: each run asks again and the run after the archive delivers the mail. The change is late until the Operator archives the first mail, not lost. A key that carries the state would deliver it at once, and the bead's key does not carry it. The one case that still mails a head twice is a record that failed to write: the next run's mail waits for the archive, then goes once more.
  3. The city must give the order FORGEJO_TOKEN_FILE with an [[orders.overrides]] entry named checks (exec orders do not get workspace.env), as for merge and schedule. That is a change in gascity-root, not here; until it is made, the order fails every run at the token.

What I ran.

  • Round 2 (rework of the Reviewer's finding 1, rebased onto main b05a214): go vet ./... and go test -count=1 -race ./... in forgejo/ pass, with a test that runs the second run with the first key live and a third after the archive, one for the flip back, and one for a held-back batch; tests/merge.sh, handover.sh and formula.sh pass. gc's answer to a suppressed send was seen in a scratch city: count 0, already_done true, exit 0.
  • Round 1: go vet ./..., go test -count=1 ./... in forgejo/: pass. 20 new tests in checks_order_test.go (settled success and failure with contexts; waits for pending, running, pending beside a failure, not started, none; same head and state is silent; success to failure on one head; new head; merged, closed, missing and foreign pull requests; both bead shapes and the skipped ones; one read per pull request; flood; mail failure retried; no place for state; state write failing after the mail; undecodable state; one bead unreadable; forgotten beads; per-rig file; state directory fallback; Operator lookup only when needed; usage). I broke the code on purpose in two places (compare the head alone, not the state; stop skipping review_head beads) and the tests failed each time.
  • gc lint . ok; bash tests/merge.sh ok; the v2 changelog checker with -base main is valid.
  • A dry run of the order, built with go tool -C forgejo forgejo order checks, against the live gascitypacks store and sarak.sh, with a GC_BIN that runs the real gc for reads and writes the mail it would send to a file: one batch mail for 23 pull requests (21 success, 2 failure), no mail on the second run, checks-gascitypacks.json holding the 23 records. No mail was sent.

Not done. The end-to-end on mikluko/scratch (a slung bead's handover and its checks, one mail each) needs the order imported and the token override in the city, so it is the Operator's after the release; the dry run above is as far as a Worker's session can take it.

Bead: gascitypacks-hzpj

🤖 Generated with Claude Code

Adds the forgejo pack's `checks` order: one poller for the city that mails the Operator once when the checks of a bead's open pull request settle, in place of a `watch.sh` per bead. This is piece 2 of the user's mail of 2026-11-12 (mail gcg-367617). **What it does.** `forgejo order checks` (new `checks_order.go`; `assets/scripts/checks.sh` is the four-line stub, `orders/checks.toml` is `cooldown`, `2m`, like `merge`). For each bead of its store that follows a pull request, it reads the pull request once, and when that is open, the head's checks through the code `pr state` uses. When the head is `success` or `failure` and the bead's recorded head and state are not those, it mails the Operator: - subject `CHECKS <bead>: <success|failure> <pr_url>`; body: the pull request, the store, the head sha, `- <context>: <status>` for each commit status, and the count of workflow runs by status; - `--from controller --notify --dedup checks:<bead>:<sha>`; - state per store in `checks-<rig>.json` (`checks-hq.json`) under `GC_PACK_STATE_DIR`, written atomically after the mail, and only for a mail that was sent: a failed mail is retried, and a mail that `--dedup` suppressed is not recorded. `not_started`, `pending` and `none` are left alone, and so is a pull request that is not open (the merge order's). Beads taken: open/in_progress/blocked with `pr_url`, and closed with `merge_result=pull_request`; a bead with `pr_event` or `review_head` is skipped, so the order does not repeat gascitypacks-n905 (a review bead taken for work). `checks.go` gains `headChecksDetail`, which returns the statuses and runs `headChecks` combined; `pr state --json` is unchanged. **Where the logic lives.** In Go, as `docs/shell.md` requires; the script is the stub the merge order has. **Decisions to look at.** 1. More than three beads owed in one run are one mail that lists them (`CHECKS: <n> pull requests settled`, dedup on the hash of the bead:head pairs). Without it the first run in a store mails every open pull request, which is the flood of #51. In the dry run below, that is 23 pull requests. 2. The dedup key is the one in the mail (`checks:<bead>:<sha>`), so a run of the same head that changes state (failure to success, or the other way) is a new mail, which gc suppresses (exit 0) while the Operator has not archived the first. Round 1 found the order recorded such a mail as sent and lost it. It now sends with `--json`, treats `count` 0 with `already_done` as not sent, and does not record the bead: each run asks again and the run after the archive delivers the mail. The change is late until the Operator archives the first mail, not lost. A key that carries the state would deliver it at once, and the bead's key does not carry it. The one case that still mails a head twice is a record that failed to write: the next run's mail waits for the archive, then goes once more. 3. The city must give the order `FORGEJO_TOKEN_FILE` with an `[[orders.overrides]]` entry named `checks` (exec orders do not get `workspace.env`), as for `merge` and `schedule`. That is a change in gascity-root, not here; until it is made, the order fails every run at the token. **What I ran.** - Round 2 (rework of the Reviewer's finding 1, rebased onto main b05a214): `go vet ./...` and `go test -count=1 -race ./...` in `forgejo/` pass, with a test that runs the second run with the first key live and a third after the archive, one for the flip back, and one for a held-back batch; `tests/merge.sh`, `handover.sh` and `formula.sh` pass. gc's answer to a suppressed send was seen in a scratch city: `count` 0, `already_done` true, exit 0. - Round 1: `go vet ./...`, `go test -count=1 ./...` in `forgejo/`: pass. 20 new tests in `checks_order_test.go` (settled success and failure with contexts; waits for pending, running, pending beside a failure, not started, none; same head and state is silent; success to failure on one head; new head; merged, closed, missing and foreign pull requests; both bead shapes and the skipped ones; one read per pull request; flood; mail failure retried; no place for state; state write failing after the mail; undecodable state; one bead unreadable; forgotten beads; per-rig file; state directory fallback; Operator lookup only when needed; usage). I broke the code on purpose in two places (compare the head alone, not the state; stop skipping `review_head` beads) and the tests failed each time. - `gc lint .` ok; `bash tests/merge.sh` ok; the v2 changelog checker with `-base main` is valid. - A dry run of the order, built with `go tool -C forgejo forgejo order checks`, against the live gascitypacks store and sarak.sh, with a `GC_BIN` that runs the real gc for reads and writes the mail it would send to a file: one batch mail for 23 pull requests (21 success, 2 failure), no mail on the second run, `checks-gascitypacks.json` holding the 23 records. No mail was sent. **Not done.** The end-to-end on mikluko/scratch (a slung bead's handover and its checks, one mail each) needs the order imported and the token override in the city, so it is the Operator's after the release; the dry run above is as far as a Worker's session can take it. Bead: gascitypacks-hzpj 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat: the checks order mails the Operator once when a pull request's checks settle (gascitypacks-hzpj)
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 24s
test / scripts (pull_request) Successful in 35s
add1ca0d0d
The Operator watched each slung bead's pull request with a poller of its own, up to 44 at a time, waiting for the checks to settle. Mail carries the exceptional paths already; the normal one, a head whose checks finished, had no mail, so every watcher waited for it. This order closes that gap with one poller for the city.

forgejo order checks (checks_order.go) runs every two minutes as the merge order does. For each bead of its store that follows a pull request (an open bead with a pr_url, or a closed one with merge_result=pull_request; not a pr_event bead or a review_head bead, so it does not repeat gascitypacks-n905's mistake of taking a review bead for work) it reads the pull request once and the head's checks once, through the code pr state uses, extended with headChecksDetail so the mail can list each context. When the head is success or failure and the bead's recorded head and state are not those, it mails the Operator "CHECKS <bead>: <state> <url>" from controller with --notify and --dedup checks:<bead>:<sha>. The record is a JSON file per store under GC_PACK_STATE_DIR, written atomically after the mail, so a failed mail is retried and a failed write cannot mail twice while the key is live.

More than floodLimit beads owed in a run are one mail that lists them: the first run in a store would otherwise mail every open pull request, which is the flood the merge order made in rexcity on 2026-11-12. checks.sh is the four-line stub, as merge.sh is, per docs/shell.md.

Validation: go vet and go test in forgejo; the new tests were broken on purpose (drop the state comparison, drop the review_head skip) and fail. A dry run of the built order against the live gascitypacks store and sarak.sh, with a gc that prints mails instead of sending them: 23 open pull requests gave one batch mail, and a second run gave none.

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

Review of add1ca0d0d for gascitypacks-hzpj. Checks of the head: success.

Verdict

fail

Findings

  • [blocking] README.md:395, forgejo/assets/forgejo/checks_order.go:298-301 and 347-349, and decision 2 of the description: when the checks of one head run again and change state (success to failure, or failure to success) while the first mail is still unarchived, the change is lost, not held back. mailOne sends with --dedup checks:<bead>:<sha>. gc suppresses the send because the first mail is live, and gc mail send --help says "Suppression exits 0". tell then counts the bead as told, and the run records {head, new state}. Every later run finds the record equal to the head's state and sends nothing, so archiving the first mail does not bring the second. The README says the opposite ("the Operator gets it only after archiving the first"). Description decision 2 and the comment on mailOne imply it too ("held back"). The test TestChecksOrderMailsAgainWhenTheStateOfTheHeadChanges hides the case: it clears mailKeys, which is the archive, before the second run. The case that matters is a failed head the Operator has not yet archived, re-run to green, and today it never gets a CHECKS … success mail. Once nothing polls, that pull request can sit unnoticed. One fix: send with --json and leave the record unchanged when the result says the send was suppressed, so a later run delivers the mail after the archive. Then add a test in which the second run happens with the first key still live, and a third run after the archive. The other fix is to keep the code and correct the README, the comment and decision 2 to say the change is dropped, so the Operator decides on decision 2 knowing what it costs. The bead's key checks:<bead>:<sha> is fine either way; what must change is that the order records a mail that was never sent, or that the docs say otherwise.
  • [minor] checks_order.go:328 (floodLimit): the batch applies to every run, not only the first run or the end of an outage. When four Workers' pull requests settle within one 2-minute window, the result is one CHECKS: 4 pull requests settled mail and no CHECKS <bead>: mail for any of them. The description and the README flag this as decision 1, and the merge order does the same. Whatever handles these mails on the Operator's side has to read the batch subject as well. This is for the Operator to decide, not to fix here.
  • [minor] Decision 3 in the description: as soon as the city imports this, each store's instance fails every run on FORGEJO_TOKEN_FILE until gascity-root adds an [[orders.overrides]] entry named checks. That city change should land together with the import upgrade that brings this order in.

Verified

  • Read the work bead (gascitypacks-hzpj) with its notes, the PR description, docs/shell.md on main and the whole diff (9 files, +954/−8). The head is a fast-forward of main at e6c6adb: the merge is clean, and mergeable reports mergeable.
  • Against the bead: cooldown at 2m like merge.toml; one instance per store; settled means success or failure through headChecksDetail, so no pending status and no unfinished run; the subject, body, --from controller --notify --dedup checks:<bead>:<sha> match the bead; state is per store under GC_PACK_STATE_DIR; it reuses fetchPull, findOperator, floodLimit and mailSender; it skips review_head and pr_event beads, so gascitypacks-n905 is not repeated; checks.sh is the 4-code-line stub docs/shell.md allows; it adds a README section and a changelog fragment; pr state --json is unchanged.
  • On the merged tree, with the city's variables removed: go vet ./..., go test -count=1 ./... and go test -race -count=1 ./... in forgejo/ pass. gc lint . reports 2 packs ok. These tests pass: tests/formula.sh, reviewer.sh, merge.sh, apply.sh, upgrade.sh, worktree.sh, worktree-setup.sh, gnu-tools.sh, view-beads.sh, view-mail.sh, permission-deny.sh, permission-request.sh. The changelog checker, built from mikluko/changelog at tag v2 (c19d67d), exits 0 with -base=main.
  • gc mail send --help: "the send is suppressed while a previous message with the same key is still live (un-archived)" and "Suppression exits 0". The first finding rests on these two lines.
Review of add1ca0d0d014327b511fca3f35fc720b25c8c9f for gascitypacks-hzpj. Checks of the head: success. ### Verdict fail ### Findings - [blocking] README.md:395, forgejo/assets/forgejo/checks_order.go:298-301 and 347-349, and decision 2 of the description: when the checks of one head run again and change state (success to failure, or failure to success) while the first mail is still unarchived, the change is lost, not held back. `mailOne` sends with `--dedup checks:<bead>:<sha>`. gc suppresses the send because the first mail is live, and `gc mail send --help` says "Suppression exits 0". `tell` then counts the bead as told, and the run records `{head, new state}`. Every later run finds the record equal to the head's state and sends nothing, so archiving the first mail does not bring the second. The README says the opposite ("the Operator gets it only after archiving the first"). Description decision 2 and the comment on `mailOne` imply it too ("held back"). The test `TestChecksOrderMailsAgainWhenTheStateOfTheHeadChanges` hides the case: it clears `mailKeys`, which is the archive, *before* the second run. The case that matters is a failed head the Operator has not yet archived, re-run to green, and today it never gets a `CHECKS … success` mail. Once nothing polls, that pull request can sit unnoticed. One fix: send with `--json` and leave the record unchanged when the result says the send was suppressed, so a later run delivers the mail after the archive. Then add a test in which the second run happens with the first key still live, and a third run after the archive. The other fix is to keep the code and correct the README, the comment and decision 2 to say the change is dropped, so the Operator decides on decision 2 knowing what it costs. The bead's key `checks:<bead>:<sha>` is fine either way; what must change is that the order records a mail that was never sent, or that the docs say otherwise. - [minor] checks_order.go:328 (`floodLimit`): the batch applies to every run, not only the first run or the end of an outage. When four Workers' pull requests settle within one 2-minute window, the result is one `CHECKS: 4 pull requests settled` mail and no `CHECKS <bead>:` mail for any of them. The description and the README flag this as decision 1, and the merge order does the same. Whatever handles these mails on the Operator's side has to read the batch subject as well. This is for the Operator to decide, not to fix here. - [minor] Decision 3 in the description: as soon as the city imports this, each store's instance fails every run on `FORGEJO_TOKEN_FILE` until gascity-root adds an `[[orders.overrides]]` entry named `checks`. That city change should land together with the import upgrade that brings this order in. ### Verified - Read the work bead (gascitypacks-hzpj) with its notes, the PR description, `docs/shell.md` on main and the whole diff (9 files, +954/−8). The head is a fast-forward of main at e6c6adb: the merge is clean, and `mergeable` reports mergeable. - Against the bead: cooldown at 2m like `merge.toml`; one instance per store; settled means `success` or `failure` through `headChecksDetail`, so no pending status and no unfinished run; the subject, body, `--from controller --notify --dedup checks:<bead>:<sha>` match the bead; state is per store under `GC_PACK_STATE_DIR`; it reuses `fetchPull`, `findOperator`, `floodLimit` and `mailSender`; it skips `review_head` and `pr_event` beads, so gascitypacks-n905 is not repeated; `checks.sh` is the 4-code-line stub `docs/shell.md` allows; it adds a README section and a changelog fragment; `pr state --json` is unchanged. - On the merged tree, with the city's variables removed: `go vet ./...`, `go test -count=1 ./...` and `go test -race -count=1 ./...` in `forgejo/` pass. `gc lint .` reports 2 packs ok. These tests pass: `tests/formula.sh`, `reviewer.sh`, `merge.sh`, `apply.sh`, `upgrade.sh`, `worktree.sh`, `worktree-setup.sh`, `gnu-tools.sh`, `view-beads.sh`, `view-mail.sh`, `permission-deny.sh`, `permission-request.sh`. The changelog checker, built from mikluko/changelog at tag v2 (c19d67d), exits 0 with `-base=main`. - `gc mail send --help`: "the send is suppressed while a previous message with the same key is still live (un-archived)" and "Suppression exits 0". The first finding rests on these two lines.
mikluko force-pushed worker/gascitypacks-hzpj from add1ca0d0d
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 24s
test / scripts (pull_request) Successful in 35s
to 463fb30d2b
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 22s
test / scripts (pull_request) Successful in 42s
2026-11-12 13:59:48 +00:00
Compare
city-root-review left a comment

Review of 463fb30d2b for gascitypacks-hzpj (round 2). Checks of the head: success.

Verdict

pass

Findings

  • [minor] forgejo/assets/forgejo/checks_order.go:335 and 351: a held-back bead stays in owed on every run until the Operator archives its first mail, so it counts toward floodLimit. Example: three held-back beads plus one newly settled bead make a batch of four, CHECKS: 4 pull requests settled. The batch has a different dedup key, so it goes out and records all four. The held-back changes are then told in the batch rather than lost. This is harmless and needs no change; whatever reads these mails on the Operator's side should expect it.
  • [minor] Decision 3 of the description, README.md:399 (carried over from round 1): once a city imports this, each store's instance fails every run on FORGEJO_TOKEN_FILE until gascity-root adds an [[orders.overrides]] entry named checks. That city change should land in the same pull request as the import upgrade.
  • [minor] The end-to-end the bead's "Done when" asks for (one mail for a slung bead's checks on mikluko/scratch) needs the order imported and the token override in place. The description says so and leaves it to the Operator after the release. The dry run against the live store is as far as a Worker can take it.

Round 1's blocking finding is resolved

  • send (checks_order.go:375) now runs gc mail send ... --json and returns sent only for count > 0 && !already_done. In tell, a suppressed single mail (line 351) and a suppressed batch (line 337) are not returned, so they are not recorded, and a later run delivers them after the archive.
  • I checked this against the real gc: gc mail send --json-schema result makes count (integer, minimum 0) a required field of a single result object, with additional properties allowed. A successful send therefore has count ≥ 1, and the order never takes a sent mail for a suppressed one. The tool reads only gc's stdout (cmd.Output(), order.go:50), so a dedup warning on stderr cannot break the decode.
  • The README (line 395), the doc comments on orderChecks, tell and mailOne, the changelog fragment and decision 2 of the description now say "held back, not lost". That is what the code does.
  • The new test TestChecksOrderMailsAgainWhenTheStateOfTheHeadChanges runs the second and third runs with the first key still live, then a run after the archive. Together with the tests for the flip back, a record that failed to write and a held-back batch, it pins the behaviour. As a mutation test I made send return true always: three tests fail (...MailsAgainWhenTheStateOfTheHeadChanges, ...DoesNotMailTwiceWhenItsRecordFailedToWrite, ...DoesNotRecordABatchThatWasHeldBack). I then restored the file.

Verified

  • Read the work bead with its notes, the PR description, round 1's review (#242 on add1ca0), and the whole diff: 10 files, +1052/−10, two commits on b05a214. The target has no REVIEW.md, AGENTS.md or CLAUDE.md; I read the README from the target.
  • Merge: main has moved to 915ce14 (#76) since the branch was cut. Merging 463fb30 into origin/main is clean (README.md auto-merged), and the forge reports mergeable.
  • Against the bead: cooldown 2m like merge.toml; one instance per store; state per store under GC_PACK_STATE_DIR. Settled means success or failure through headChecksDetail. Subject, body and --from controller --notify --dedup checks:<bead>:<sha> match the bead's text. It reuses fetchPull, findOperator, floodLimit and mailSender. It skips review_head and pr_event beads, so gascitypacks-n905 is not repeated. checks.sh is a thin stub, as docs/shell.md asks. It adds a README section and a changelog fragment. pr state --json is unchanged.
  • On the merged tree, with the city's variables removed (proved: 0): go vet ./..., go test -count=1 ./... and go test -count=1 -race ./... pass. gc lint . reports 2 packs ok. Every script CI runs passes: tests/formula.sh, reviewer.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.
  • I built the changelog checker from mikluko/changelog at the current tag v2 (087d7e8; the tag has moved since round 1's c19d67d). With -base=main it reports valid=true and exits 0.
Review of 463fb30d2b8cb77cd990a0b543f997c2c0434b31 for gascitypacks-hzpj (round 2). Checks of the head: success. ### Verdict pass ### Findings - [minor] forgejo/assets/forgejo/checks_order.go:335 and 351: a held-back bead stays in `owed` on every run until the Operator archives its first mail, so it counts toward `floodLimit`. Example: three held-back beads plus one newly settled bead make a batch of four, `CHECKS: 4 pull requests settled`. The batch has a different dedup key, so it goes out and records all four. The held-back changes are then told in the batch rather than lost. This is harmless and needs no change; whatever reads these mails on the Operator's side should expect it. - [minor] Decision 3 of the description, README.md:399 (carried over from round 1): once a city imports this, each store's instance fails every run on `FORGEJO_TOKEN_FILE` until gascity-root adds an `[[orders.overrides]]` entry named `checks`. That city change should land in the same pull request as the import upgrade. - [minor] The end-to-end the bead's "Done when" asks for (one mail for a slung bead's checks on mikluko/scratch) needs the order imported and the token override in place. The description says so and leaves it to the Operator after the release. The dry run against the live store is as far as a Worker can take it. ### Round 1's blocking finding is resolved - `send` (checks_order.go:375) now runs `gc mail send ... --json` and returns sent only for `count > 0 && !already_done`. In `tell`, a suppressed single mail (line 351) and a suppressed batch (line 337) are not returned, so they are not recorded, and a later run delivers them after the archive. - I checked this against the real gc: `gc mail send --json-schema result` makes `count` (integer, minimum 0) a required field of a single result object, with additional properties allowed. A successful send therefore has `count` ≥ 1, and the order never takes a sent mail for a suppressed one. The tool reads only gc's stdout (`cmd.Output()`, order.go:50), so a dedup warning on stderr cannot break the decode. - The README (line 395), the doc comments on `orderChecks`, `tell` and `mailOne`, the changelog fragment and decision 2 of the description now say "held back, not lost". That is what the code does. - The new test `TestChecksOrderMailsAgainWhenTheStateOfTheHeadChanges` runs the second and third runs with the first key still live, then a run after the archive. Together with the tests for the flip back, a record that failed to write and a held-back batch, it pins the behaviour. As a mutation test I made `send` return true always: three tests fail (`...MailsAgainWhenTheStateOfTheHeadChanges`, `...DoesNotMailTwiceWhenItsRecordFailedToWrite`, `...DoesNotRecordABatchThatWasHeldBack`). I then restored the file. ### Verified - Read the work bead with its notes, the PR description, round 1's review (#242 on add1ca0), and the whole diff: 10 files, +1052/−10, two commits on b05a214. The target has no `REVIEW.md`, `AGENTS.md` or `CLAUDE.md`; I read the README from the target. - Merge: main has moved to 915ce14 (#76) since the branch was cut. Merging 463fb30 into origin/main is clean (README.md auto-merged), and the forge reports `mergeable`. - Against the bead: `cooldown` 2m like `merge.toml`; one instance per store; state per store under `GC_PACK_STATE_DIR`. Settled means `success` or `failure` through `headChecksDetail`. Subject, body and `--from controller --notify --dedup checks:<bead>:<sha>` match the bead's text. It reuses `fetchPull`, `findOperator`, `floodLimit` and `mailSender`. It skips `review_head` and `pr_event` beads, so gascitypacks-n905 is not repeated. `checks.sh` is a thin stub, as `docs/shell.md` asks. It adds a README section and a changelog fragment. `pr state --json` is unchanged. - On the merged tree, with the city's variables removed (proved: 0): `go vet ./...`, `go test -count=1 ./...` and `go test -count=1 -race ./...` pass. `gc lint .` reports 2 packs ok. Every script CI runs passes: `tests/formula.sh`, `reviewer.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`. - I built the changelog checker from mikluko/changelog at the current tag v2 (087d7e8; the tag has moved since round 1's c19d67d). With `-base=main` it reports `valid=true` and exits 0.
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!79
No description provided.