A landing's apps delivered together: release runs end at their draft, deliver.yml publishes and delivers the batch (MQ-11) #347

Merged
merge-queue merged 3 commits from mq-11-batch into main 2026-12-01 03:17:18 -08:00
Owner

Stage 6b of the anvil build, cutover step 2 (pipeline-templates pieces, inert): a landed library change's apps delivered as one batch. Design: https://openproject.home.romaine.life/wp/MQ-11 (decisions in https://openproject.home.romaine.life/wp/RLMQ-6). The prebuild half is its own held PR (mq-11-prebuild); this one doesn't depend on it.

Removed: the test asserting .forgejo/workflows/deliver.yml doesn't exist. It guarded against the old called deliver.yml, whose job had no identity (AHT-231). It now asserts that deliver.yml is workflow_dispatch only, and that nothing calls it.

Added:

  • suites/release/batch.mjs: finalize's batch output is true only when the commit carries the Anvil-Prebuilt: trailer, its newest merge-queue / delivery status is merge-queue's and pending, and the release is an app with no joined image, no external part, no released.yml, no npm package and no OpenTofu provider. While that status is pending a rerun ends as a draft again, by design: the batch delivers it. merge-queue sets the status to success/failure when the batch's deliver run ends, so later reruns behave as today. That half is merge-queue's, a later step; batch.mjs and the README state the contract. A decision that errors leaves batch false.
  • .forgejo/workflows/deliver.yml (pipeline-templates' own; workflow_dispatch input batch {"version":1,"landing","releases":[{"repo","tag"}]}), on the cluster runner like the suite's deliver job. It runs deliver.mjs batch, which publishes each draft that is complete (every part's receipt in and finalized, the check finalize makes, now shared from protocol.mjs), then prunes and syncs mirrors in each repo, with a write token from pipeline-templates' own integration. An incomplete draft is left, with a log line saying so, to the run that completes it. Each release goes independently: one that fails doesn't stop the others. Only what published is delivered, the log ends with each release's outcome, and the run fails if any release or PC failed. It then sends each PC one request, release a t1 release b t2 ... since T. A PC that answers with at-update's older one-release grammar is asked for each release in turn, with the same since. A prune job runs after (deliver.mjs prune). Each run gets its own concurrency group, so no batch is replaced while pending.
  • Tests: the batch conditions and their refusals, the release suite's gating, the batch request text, fallback only on that refusal (and from the start on retries), batch input validation, publish/prune/sync per repo.

Changed:

  • release/ci.yml: a batch step after complete, run only when the release is ready, not a callback, and the pushed commit message names Anvil-Prebuilt:. publish and deliver also require needs.finalize.outputs.batch != 'true'.
  • deliver.mjs: deliverReleases (several releases, one request per PC, fallback); deliverRelease wraps it, and a single release's request is the same text as before.
  • READMEs: "A landing's apps, delivered together"; rule 4 names deliver.yml's wait; App delivery.

Left alone: every release run without the trailer and the pending status, external-part callbacks, images, npm, tofu providers and released.yml, and the suite's own deliver and deliver-prune jobs.

What makes it inert today: the batch step runs only for a pushed commit naming Anvil-Prebuilt:, and batches only when merge-queue has posted merge-queue / delivery pending on it. Nothing writes either yet. deliver.yml runs only when dispatched, and nothing dispatches it.

Before activation (not done here): its write token comes from the pipeline-templates-write integration, which admits only fleet.yml, tofu-providers.yml and home-sync.yml today, so deliver.yml has to be added to openbao's pipeline-templates-write integration before anvil dispatches it. auth already has a row for deliver.yml dispatched on main.

🤖 Generated with Claude Code

Stage 6b of the anvil build, cutover step 2 (pipeline-templates pieces, inert): a landed library change's apps delivered as one batch. Design: https://openproject.home.romaine.life/wp/MQ-11 (decisions in https://openproject.home.romaine.life/wp/RLMQ-6). The prebuild half is its own held PR (mq-11-prebuild); this one doesn't depend on it. **Removed:** the test asserting `.forgejo/workflows/deliver.yml` doesn't exist. It guarded against the old *called* deliver.yml, whose job had no identity (AHT-231). It now asserts that deliver.yml is `workflow_dispatch` only, and that nothing calls it. **Added:** - `suites/release/batch.mjs`: finalize's `batch` output is `true` only when the commit carries the `Anvil-Prebuilt:` trailer, its newest `merge-queue / delivery` status is merge-queue's and pending, and the release is an app with no joined image, no external part, no `released.yml`, no npm package and no OpenTofu provider. While that status is pending a rerun ends as a draft again, by design: the batch delivers it. merge-queue sets the status to success/failure when the batch's deliver run ends, so later reruns behave as today. That half is merge-queue's, a later step; batch.mjs and the README state the contract. A decision that errors leaves `batch` false. - `.forgejo/workflows/deliver.yml` (pipeline-templates' own; `workflow_dispatch` input `batch` `{"version":1,"landing","releases":[{"repo","tag"}]}`), on the `cluster` runner like the suite's deliver job. It runs `deliver.mjs batch`, which publishes each draft that is complete (every part's receipt in and finalized, the check finalize makes, now shared from `protocol.mjs`), then prunes and syncs mirrors in each repo, with a write token from pipeline-templates' own integration. An incomplete draft is left, with a log line saying so, to the run that completes it. Each release goes independently: one that fails doesn't stop the others. Only what published is delivered, the log ends with each release's outcome, and the run fails if any release or PC failed. It then sends each PC one request, `release a t1 release b t2 ... since T`. A PC that answers with at-update's older one-release grammar is asked for each release in turn, with the same since. A `prune` job runs after (`deliver.mjs prune`). Each run gets its own concurrency group, so no batch is replaced while pending. - Tests: the batch conditions and their refusals, the release suite's gating, the batch request text, fallback only on that refusal (and from the start on retries), batch input validation, publish/prune/sync per repo. **Changed:** - `release/ci.yml`: a `batch` step after `complete`, run only when the release is ready, not a callback, and the pushed commit message names `Anvil-Prebuilt:`. `publish` and `deliver` also require `needs.finalize.outputs.batch != 'true'`. - `deliver.mjs`: `deliverReleases` (several releases, one request per PC, fallback); `deliverRelease` wraps it, and a single release's request is the same text as before. - READMEs: "A landing's apps, delivered together"; rule 4 names deliver.yml's wait; App delivery. **Left alone:** every release run without the trailer and the pending status, external-part callbacks, images, npm, tofu providers and released.yml, and the suite's own deliver and deliver-prune jobs. **What makes it inert today:** the batch step runs only for a pushed commit naming `Anvil-Prebuilt:`, and batches only when merge-queue has posted `merge-queue / delivery` pending on it. Nothing writes either yet. deliver.yml runs only when dispatched, and nothing dispatches it. **Before activation (not done here):** its write token comes from the `pipeline-templates-write` integration, which admits only fleet.yml, tofu-providers.yml and home-sync.yml today, so `deliver.yml` has to be added to openbao's pipeline-templates-write integration before anvil dispatches it. auth already has a row for `deliver.yml` dispatched on main. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
release/batch.mjs decides, for a pushed bump carrying the Anvil-Prebuilt trailer whose
merge-queue / delivery status is merge-queue's and pending, that an app's release ends at its
complete draft; publish and deliver skip then. .forgejo/workflows/deliver.yml (deliver.mjs batch)
publishes each draft, prunes, syncs mirrors, and asks each PC once for every release, falling back
to one request per release for an older at-update. Inert until anvil posts the status.
deliver.yml runs its scripts from _ci as the delivery jobs do, says why it waits, and gives every batch a concurrency group of its own
All checks were successful
CI / actionlint (pull_request) Successful in 27s
Suite release / reserve (pull_request) Has been skipped
Suite release / check-manifest (pull_request) Has been skipped
Suite release / reused-checks (pull_request) Has been skipped
Suite release / deliver (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
CI / service-cancellation (pull_request) Successful in 1m16s
CI / azure-cli (pull_request) Has been skipped
CI / cache-save (ubuntu-latest) (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite release / check-build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
Suite release / check-package (pull_request) Has been skipped
Suite release / deliver-prune (pull_request) Has been skipped
CI / service-runtime (one) (pull_request) Successful in 1m5s
CI / home-cache-linux (pull_request) Has been skipped
CI / home-cache-windows (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 29s
Suite release / build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
Suite release / scope (pull_request) Successful in 35s
Suite release / module (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Successful in 33s
Suite default / check-rules (pull_request) Successful in 36s
Suite default / check-logs (pull_request) Successful in 35s
CI / service-runtime (two) (pull_request) Successful in 1m4s
Suite default / reused-checks (pull_request) Successful in 25s
CI / suite-tests-linux (pull_request) Successful in 1m28s
CI / suite-tests-windows (pull_request) Successful in 2m8s
CI / setup-windows (pull_request) Successful in 2m58s
CI / setup-linux (cluster) (pull_request) Successful in 2m25s
ce604955ce
Review fixes: external parts never batch, a batch publishes only complete drafts and goes on past a failing release, the rerun contract written down (MQ-11)
All checks were successful
Suite release / module (pull_request) Has been skipped
Suite release / reserve (pull_request) Has been skipped
Suite release / check-build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
Suite release / build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
CI / service-runtime (one) (pull_request) Successful in 24s
Suite default / scope (pull_request) Successful in 6s
Suite release / finalize (pull_request) Has been skipped
Suite release / reused-checks (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite release / deliver (pull_request) Has been skipped
CI / service-runtime (two) (pull_request) Successful in 24s
CI / setup-linux (cluster) (pull_request) Successful in 1m15s
Suite release / check-manifest (pull_request) Has been skipped
Suite release / check-package (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite release / deliver-prune (pull_request) Has been skipped
CI / service-cancellation (pull_request) Successful in 31s
merge-queue landed on main
CI / home-cache-linux (pull_request) Has been skipped
CI / home-cache-windows (pull_request) Has been skipped
Suite release / scope (pull_request) Successful in 6s
CI / cache-save (ubuntu-latest) (pull_request) Has been skipped
CI / actionlint (pull_request) Successful in 6s
Suite default / check-logs (pull_request) Successful in 12s
Suite default / reused-checks (pull_request) Successful in 13s
Suite default / check-rules (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
CI / suite-tests-linux (pull_request) Successful in 40s
CI / suite-tests-windows (pull_request) Successful in 1m20s
CI / setup-windows (pull_request) Successful in 2m6s
035b9bccd6
batch.mjs refuses a release with external parts. deliver.mjs batch publishes a draft only when
every part's receipt is in and it is finalized (protocol.mjs draftState/missingParts, which
finalize now shares), leaves an incomplete one to the run that completes it, publishes, prunes
and syncs each release apart, delivers what published, reports each release's outcome and fails
if any release or PC did. batch.mjs and the README state the delivery-status contract for reruns.
merge-queue deleted branch mq-11-batch 2026-12-01 03:17:18 -08:00
Sign in to join this conversation.
No description provided.