Prepared landings: a library change's landing is planned when its group test starts, its releases prebuilt, its planned bumps pushed (MQ-11 step 5b) #56

Merged
merge-queue merged 3 commits from mq-11-prepare into main 2026-12-01 04:17:32 -08:00
Owner

Step 5b of stage 6b of the anvil build: prepared landings and the prebuild dispatch, not yet required for landing. Work package: https://openproject.home.romaine.life/wp/MQ-11

Added

  • prepare.go: when a library change's group test is dispatched (front, or speculative inside the window), anvil plans its landing behind the look: the library's next tag; each user's bump nearest first, made in a worktree of its clone with go get of the planned versions and go mod tidy through anvil's module proxy (GOPROXY=<loopback proxy>/goproxy/<plan>|file://<DATA_DIR>/go/mod/cache/download|<home proxy>|direct, GONOPROXY=anvil.invalid, a per-plan GOMODCACHE removed after), committed with git commit-tree (author and committer merge-queue, dated the plan's time, unsigned, the bump's message plus Anvil-Prebuilt: <lib>@<head>), kept at refs/anvil/plans/<plan>/<repo>; each user's next tag. A module user's planned version is served from its planned commit to the users after it.
    • Planned only when the test takes no other pull request's library change, the library is one module at its repository root, the repository has ci-release and doesn't number from its files, and the proxy self-check is ok. Users that are no-take-up, nested, take nothing, aren't on the release suite, or whose go fails get "prebuild": false, and their subtree too.
    • Plan id: hash of the library PR, its head commit (a head pushed again with the same tree is its own plan, with its own prebuild and status) and that head's tree, the library's topics, each user's default-branch commit and topics, every tag of those repositories, and pipeline-templates' default-branch commit. Same id: nothing new is made or dispatched.
    • DATA_DIR/plans/<id>.json in exactly release/group.mjs's version-1 format, plus <id>.anvil.json (sums, bumps, run, landing). Read back at restart.
    • Dispatches release/group.yml on the PR branch with pr and plan {"id","digest"} when the PR's head is still the planned one, and reports it as merge-queue / group release (pending, then success/failure, each [p:<id>]), settled at the next look on the head or, once landed, at the landing's step. Never counted as CI; a failed or refused prebuild is a warn line and a failed status, nothing more.
    • GET /prebuild/<id>.json (token-checked as /goproxy is, routed publicly beside it in k8s/route.yaml) and GET /plans (inside the cluster).
    • Metrics: plans prepared by repo, skipped and dropped by reason, prebuilds dispatched/refused/passed/failed.
  • releasetag.go: release-version's nextTag() numbering ported to Go, tested against release-version's own fixtures. The image's pinned @romaine-life/ci-suites is 0.1.6, which has no predict.mjs (it first ships in 0.1.7), so the port is what predicts tags.
  • Tests (prepare_test.go, releasetag_test.go, testdata/): plan made and prebuild dispatched; each planned commit equals group.mjs's recreation done step by step in git; the plan bytes and commits against a golden file written by group.mjs's own parsePlan and recreate (live with PIPELINE_TEMPLATES); planned commits pushed as fast-forwards; fallback when main moved; a mismatched library tag dropping the plan for every user; a failed prebuild stepping nothing aside; plans surviving a restart. Also: an already-pushed planned commit counted as the bump; a re-pushed head with the same tree getting its own prebuild; a plan that stops partway leaving no refs; zips refcounted with their plans and the store bounded; the planner given while the landings step (fails under -race only).

Changed

  • landing.go: a recorded landing takes the newest plan whose head tree is its merge commit's. Each planned version's real tag must match the prediction, and go mod download -json of it must give the planned h1: sums. A user whose bump takes exactly its planned versions gets the planned commit pushed as a fast-forward while main is still its parent; if main moved, today's write() on the new head with the plan's message and trailer. Any other mismatch: today's path for that user and downstream, a plan dropped line with reason, and the landing's planOff. The plan is released and pruned once the landing is done. A planned commit already on main (pushed before a restart cut the step short of saving it) is the bump, pushed, not "unchanged". The landings read the planner through an atomic pointer, since it is set after their runner may have started. write() takes its message; goCmd gains an environment override.
  • queue.go: merge-queue / group release is read into its own field, so it is never CI; the look settles a pending prebuild on a head it read fresh.
  • groups.go: dispatchGroup asks the planner for a plan.
  • goproxy.go: a loopback listener for anvil's own go commands (Go sends GOPROXY credentials over https only), unregister, and each module's self-check result. A zip goes with the last plan that holds it (refcounted), and the zip store is bounded at 2 GiB, oldest first, with a gauge of its size.
  • mirror.go: gitEnv, git with extra environment (a commit's author and dates).
  • main.go: wiring and routes. README: Prepared landings, and the Module proxy, Landings, Observability, Configuration and Testing sections.

Left alone

The batched delivery (merge-queue / delivery), requiring merge-queue / group release for landing, shadow mode and its files, the Dockerfile and its package pin, and the 6a landing path, which every plan falls back to.

🤖 Generated with Claude Code

Step 5b of stage 6b of the anvil build: prepared landings and the prebuild dispatch, not yet required for landing. Work package: https://openproject.home.romaine.life/wp/MQ-11 ## Added - `prepare.go`: when a library change's group test is dispatched (front, or speculative inside the window), anvil plans its landing behind the look: the library's next tag; each user's bump nearest first, made in a worktree of its clone with `go get` of the planned versions and `go mod tidy` through anvil's module proxy (`GOPROXY=<loopback proxy>/goproxy/<plan>|file://<DATA_DIR>/go/mod/cache/download|<home proxy>|direct`, `GONOPROXY=anvil.invalid`, a per-plan `GOMODCACHE` removed after), committed with `git commit-tree` (author and committer `merge-queue`, dated the plan's time, unsigned, the bump's message plus `Anvil-Prebuilt: <lib>@<head>`), kept at `refs/anvil/plans/<plan>/<repo>`; each user's next tag. A module user's planned version is served from its planned commit to the users after it. - Planned only when the test takes no other pull request's library change, the library is one module at its repository root, the repository has `ci-release` and doesn't number from its files, and the proxy self-check is `ok`. Users that are `no-take-up`, nested, take nothing, aren't on the release suite, or whose `go` fails get `"prebuild": false`, and their subtree too. - Plan id: hash of the library PR, its head commit (a head pushed again with the same tree is its own plan, with its own prebuild and status) and that head's tree, the library's topics, each user's default-branch commit and topics, every tag of those repositories, and pipeline-templates' default-branch commit. Same id: nothing new is made or dispatched. - `DATA_DIR/plans/<id>.json` in exactly `release/group.mjs`'s version-1 format, plus `<id>.anvil.json` (sums, bumps, run, landing). Read back at restart. - Dispatches `release/group.yml` on the PR branch with `pr` and `plan` `{"id","digest"}` when the PR's head is still the planned one, and reports it as `merge-queue / group release` (pending, then success/failure, each `[p:<id>]`), settled at the next look on the head or, once landed, at the landing's step. Never counted as CI; a failed or refused prebuild is a `warn` line and a failed status, nothing more. - `GET /prebuild/<id>.json` (token-checked as `/goproxy` is, routed publicly beside it in `k8s/route.yaml`) and `GET /plans` (inside the cluster). - Metrics: plans prepared by repo, skipped and dropped by reason, prebuilds dispatched/refused/passed/failed. - `releasetag.go`: release-version's `nextTag()` numbering ported to Go, tested against release-version's own fixtures. The image's pinned `@romaine-life/ci-suites` is 0.1.6, which has no `predict.mjs` (it first ships in 0.1.7), so the port is what predicts tags. - Tests (`prepare_test.go`, `releasetag_test.go`, `testdata/`): plan made and prebuild dispatched; each planned commit equals group.mjs's recreation done step by step in git; the plan bytes and commits against a golden file written by group.mjs's own `parsePlan` and `recreate` (live with `PIPELINE_TEMPLATES`); planned commits pushed as fast-forwards; fallback when main moved; a mismatched library tag dropping the plan for every user; a failed prebuild stepping nothing aside; plans surviving a restart. Also: an already-pushed planned commit counted as the bump; a re-pushed head with the same tree getting its own prebuild; a plan that stops partway leaving no refs; zips refcounted with their plans and the store bounded; the planner given while the landings step (fails under -race only). ## Changed - `landing.go`: a recorded landing takes the newest plan whose head tree is its merge commit's. Each planned version's real tag must match the prediction, and `go mod download -json` of it must give the planned `h1:` sums. A user whose bump takes exactly its planned versions gets the planned commit pushed as a fast-forward while main is still its parent; if main moved, today's `write()` on the new head with the plan's message and trailer. Any other mismatch: today's path for that user and downstream, a `plan dropped` line with reason, and the landing's `planOff`. The plan is released and pruned once the landing is done. A planned commit already on main (pushed before a restart cut the step short of saving it) is the bump, pushed, not "unchanged". The landings read the planner through an atomic pointer, since it is set after their runner may have started. `write()` takes its message; `goCmd` gains an environment override. - `queue.go`: `merge-queue / group release` is read into its own field, so it is never CI; the look settles a pending prebuild on a head it read fresh. - `groups.go`: `dispatchGroup` asks the planner for a plan. - `goproxy.go`: a loopback listener for anvil's own go commands (Go sends GOPROXY credentials over https only), `unregister`, and each module's self-check result. A zip goes with the last plan that holds it (refcounted), and the zip store is bounded at 2 GiB, oldest first, with a gauge of its size. - `mirror.go`: `gitEnv`, git with extra environment (a commit's author and dates). - `main.go`: wiring and routes. README: Prepared landings, and the Module proxy, Landings, Observability, Configuration and Testing sections. ## Left alone The batched delivery (`merge-queue / delivery`), requiring `merge-queue / group release` for landing, shadow mode and its files, the Dockerfile and its package pin, and the 6a landing path, which every plan falls back to. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A planned commit's ref goes when its files can't be planned
Some checks failed
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite cluster-service / scope (pull_request) Has been cancelled
Suite cluster-service / check-manifests (pull_request) Has been cancelled
Suite cluster-service / check-image (pull_request) Has been cancelled
Suite cluster-service / check-smoke (pull_request) Has been cancelled
Suite cluster-service / publish (pull_request) Has been cancelled
Suite cluster-service / reused-checks (pull_request) Has been cancelled
Suite default / scope (pull_request) Has been cancelled
Suite default / check-fetches (pull_request) Has been cancelled
Suite default / check-rules (pull_request) Has been cancelled
Suite default / check-logs (pull_request) Has been cancelled
Suite default / reused-checks (pull_request) Has been cancelled
Suite go / scope (pull_request) Has been cancelled
Suite go / check-format (pull_request) Has been cancelled
Suite go / check-test-linux (pull_request) Has been cancelled
Suite go / check-test-windows (pull_request) Has been cancelled
Suite go / check-services (pull_request) Has been cancelled
Suite go / reused-checks (pull_request) Has been cancelled
e0bf246795
Merge branch 'main' into mq-11-prepare
Some checks failed
Suite cluster-service / check-manifests (pull_request) Successful in 5s
Suite default / check-logs (pull_request) Successful in 5s
Suite default / check-rules (pull_request) Successful in 5s
Suite go / check-format (pull_request) Successful in 6s
Suite default / reused-checks (pull_request) Successful in 5s
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite cluster-service / check-image (pull_request) Successful in 36s
Suite cluster-service / reused-checks (pull_request) Successful in 4s
Suite go / check-test-linux (pull_request) Failing after 50s
Suite default / scope (pull_request) Successful in 4s
Suite go / scope (pull_request) Successful in 5s
Suite cluster-service / scope (pull_request) Successful in 5s
Suite default / check-fetches (pull_request) Has been skipped
Suite go / check-test-windows (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite go / reused-checks (pull_request) Successful in 3s
438eeab1c5
Merge branch 'main' into mq-11-prepare
Some checks failed
Suite go / check-test-linux (pull_request) Has been cancelled
Suite go / reused-checks (pull_request) Has been cancelled
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite default / reused-checks (pull_request) Successful in 6s
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite go / check-test-windows (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite default / check-rules (pull_request) Successful in 5s
Suite default / check-logs (pull_request) Successful in 6s
Suite go / check-format (pull_request) Successful in 6s
Suite cluster-service / check-image (pull_request) Successful in 41s
Suite cluster-service / reused-checks (pull_request) Has been cancelled
Suite default / scope (pull_request) Successful in 5s
Suite go / scope (pull_request) Successful in 5s
Suite cluster-service / scope (pull_request) Successful in 5s
Suite default / check-fetches (pull_request) Has been skipped
b0b4e2b089
Merge branch 'main' into mq-11-prepare
All checks were successful
Suite go / scope (pull_request) Successful in 5s
Suite default / scope (pull_request) Successful in 5s
Suite cluster-service / check-manifests (pull_request) Successful in 5s
Suite cluster-service / reused-checks (pull_request) Successful in 3s
Suite default / check-logs (pull_request) Has been skipped
Suite go / check-test-linux (pull_request) Successful in 46s
Suite go / reused-checks (pull_request) Successful in 3s
Suite default / reused-checks (pull_request) Successful in 5s
Suite default / check-rules (pull_request) Has been skipped
Suite go / check-format (pull_request) Successful in 6s
Suite cluster-service / check-image (pull_request) Successful in 16s
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite cluster-service / scope (pull_request) Successful in 6s
Suite go / check-test-windows (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
b6e1341aa8
nelson force-pushed mq-11-prepare from b6e1341aa8
All checks were successful
Suite go / scope (pull_request) Successful in 5s
Suite default / scope (pull_request) Successful in 5s
Suite cluster-service / check-manifests (pull_request) Successful in 5s
Suite cluster-service / reused-checks (pull_request) Successful in 3s
Suite default / check-logs (pull_request) Has been skipped
Suite go / check-test-linux (pull_request) Successful in 46s
Suite go / reused-checks (pull_request) Successful in 3s
Suite default / reused-checks (pull_request) Successful in 5s
Suite default / check-rules (pull_request) Has been skipped
Suite go / check-format (pull_request) Successful in 6s
Suite cluster-service / check-image (pull_request) Successful in 16s
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite cluster-service / scope (pull_request) Successful in 6s
Suite go / check-test-windows (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
to 11e1c65e9f
All checks were successful
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / reused-checks (pull_request) Successful in 4s
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite cluster-service / scope (pull_request) Successful in 5s
Suite cluster-service / check-image (pull_request) Successful in 35s
Suite go / scope (pull_request) Successful in 4s
Suite default / scope (pull_request) Successful in 4s
Suite go / check-services (pull_request) Has been skipped
Suite go / check-test-windows (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite go / reused-checks (pull_request) Successful in 3s
Suite default / check-logs (pull_request) Successful in 5s
Suite default / check-rules (pull_request) Successful in 5s
Suite go / check-format (pull_request) Successful in 6s
Suite default / reused-checks (pull_request) Successful in 5s
Suite go / check-test-linux (pull_request) Successful in 59s
merge-queue landed on main
2026-12-01 04:16:20 -08:00
Compare
merge-queue deleted branch mq-11-prepare 2026-12-01 04:17:32 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No project
No assignees
1 participant
Notifications
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
romaine-life/merge-queue!56
No description provided.