ci: the reseed is starved under push cadence — every push cancels the seam, so get.idss.nz served one pin for 8 h while #966 waited (publish on the last agent-affecting commit) #976

Closed
opened 2026-08-29 05:43:23 +00:00 by ben · 3 comments
Owner

Symptom

get.idss.nz served 6bb6ff29 from 21:39Z (2026-08-28) through at least 05:45Z (2026-08-29) — eight hours — while main advanced eleven commits, including #966 (dd1e56ec), the fix the IDIP standing drive #788 was parked on (#971 staleness ticket re-filed every tick). Every push to main auto-cancels the in-flight ci.yml run (Forgejo concurrency on workflow+ref), and with two sessions plus the swarm pushing roughly every 10 minutes the ~15-minute seam never reached publish. Cancelled runs in the window: 27988→28899→28924→28934→… Most of the cancelling pushes were docs-only (slices yaml, ADR amendments, STATUS, a mermaid semicolon).

Rule it needs

The reseed chain (seam → publish → package → idss-reseed.timer) must not be starved by pushes that cannot change the served agent. Two shapes, either is fine:

  • (A) publish runs on the last agent-affecting commit: a scheduled/dispatched publish workflow (separate from ci.yml, so it is not cancelled by the next push) that builds from origin/main when x-idss-release is behind the newest commit touching OC_BOOTSTRAP_AGENT_PATHS (the #600 staleness filter already knows the paths).
  • (B) don't cancel: a docs-only push (docs/**, *.md, docs/slices/**) skips the seam entirely (paths-ignore) so it never cancels the run that matters; publish stays in ci.yml.

Recommend (A) — it also decouples "main is red on a docs gate" from "the agent is stale", which bit us twice tonight (#967, #974 both redded main on docs while #966 waited).

Acceptance

  • A run of pushes at 5-minute cadence, docs-only after one agent-affecting commit, still publishes the agent-affecting commit within one seam duration.
  • x-idss-release on get.idss.nz reaches origin/main's newest agent-affecting commit without human intervention; #971-class tickets stop re-filing.
  • GOTCHAS entry: "a push to main cancels the seam — the reseed is starved under push cadence" with the rule.

Evidence: commit statuses on 29be72a2 / e2a44526 (seam failure at the exact minute of the next push = cancel, not red); x-idss-release probe log in this session's monitor.

## Symptom `get.idss.nz` served `6bb6ff29` from 21:39Z (2026-08-28) through at least 05:45Z (2026-08-29) — eight hours — while main advanced eleven commits, including #966 (`dd1e56ec`), the fix the IDIP standing drive #788 was parked on (#971 staleness ticket re-filed every tick). Every push to main auto-cancels the in-flight `ci.yml` run (Forgejo concurrency on workflow+ref), and with two sessions plus the swarm pushing roughly every 10 minutes the ~15-minute `seam` never reached `publish`. Cancelled runs in the window: 27988→28899→28924→28934→… Most of the cancelling pushes were **docs-only** (slices yaml, ADR amendments, STATUS, a mermaid semicolon). ## Rule it needs The reseed chain (seam → publish → package → `idss-reseed.timer`) must not be starved by pushes that cannot change the served agent. Two shapes, either is fine: - **(A)** `publish` runs on the last **agent-affecting** commit: a scheduled/dispatched publish workflow (separate from `ci.yml`, so it is not cancelled by the next push) that builds from `origin/main` when `x-idss-release` is behind the newest commit touching `OC_BOOTSTRAP_AGENT_PATHS` (the #600 staleness filter already knows the paths). - **(B)** don't cancel: a docs-only push (`docs/**`, `*.md`, `docs/slices/**`) skips the seam entirely (paths-ignore) so it never cancels the run that matters; publish stays in `ci.yml`. Recommend **(A)** — it also decouples "main is red on a docs gate" from "the agent is stale", which bit us twice tonight (#967, #974 both redded main on docs while #966 waited). ## Acceptance - [ ] A run of pushes at 5-minute cadence, docs-only after one agent-affecting commit, still publishes the agent-affecting commit within one seam duration. - [ ] `x-idss-release` on `get.idss.nz` reaches origin/main's newest agent-affecting commit without human intervention; #971-class tickets stop re-filing. - [ ] GOTCHAS entry: "a push to main cancels the seam — the reseed is starved under push cadence" with the rule. Evidence: commit statuses on `29be72a2` / `e2a44526` (seam `failure` at the exact minute of the next push = cancel, not red); `x-idss-release` probe log in this session's monitor.

Ruled by agent under ADR 0174 — veto anytime. Option (A) implemented: the reseed publish is now a standalone workflow off the push path, so a push can no longer cancel the run that mints the reseed pin. Config/CI-only, revertible (delete one workflow file), offline-proven — a two-way door.

Root cause confirmed live. At session start the registry itself was frozen: newest published idss-agent version = 6bb6ff29 (2026-08-28 21:34:31Z), and x-idss-release on get.idss.nz served the same 6bb6ff29. Seven agent-affecting commits sat after it, unpublished — dd1e56ec (#966), f24a38a7, dc4ff8cf, dd9193ff, 7d1b5cad, 353ec1c6, 556b533e — because every ci run reaching publish was cancelled by the next push (concurrency on workflow+ref). oc_bootstrap_staleness verdict: served 6bb6ff29 is 7 agent-commit(s) behind origin/main (newest agent-affecting: 556b533e). Task list shows the cancels directly, e.g. task 31974 seam cancelled on e2a44526.

What landed (d9b30bd7, advances #976):

  • .forgejo/workflows/reseed-publish.yml — runs scripts/bootstrap-reseed/publish.sh on schedule (3,13,23,33,43,53 * * * *) + workflow_dispatch, workflow-level concurrency with cancel-in-progress: false. Off the push path → no push, no overlapping tick, can cancel it.
  • publish.sh is unchanged and already idempotent/self-backfilling: it diffs newest-published..origin/main over OC_BOOTSTRAP_AGENT_PATHS (the #600 filter) and publishes origin/main's tip whenever that range is agent-affecting — so any commit orphaned by a cancelled ci publish is caught up on the next tick.
  • The rail deliberately does not re-run the full seam, decoupling "main is red on a docs gate" (#967/#974) from "the served agent is stale". The agent still must go build to publish. ci.yml keeps its green-seam-gated publish job as the fast happy path; this rail is the always-fires backstop.
  • Red-first offline test scripts/tests/reseed-publish-workflow-test.sh (7 checks) pins the starvation-proof shape (not push-triggered; schedule+dispatch; workflow-level cancel-in-progress:false; fetch-depth:0; runs publish.sh; REGISTRY_FORGEJO_TOKEN). GOTCHAS #123 added. STATUS updated.

Note (follow-up filed separately): the broker rail (publish-broker/deploy-broker, GOTCHAS #96/#98) still rides ci and remains starvable under the same cadence — named in GOTCHAS #123 and STATUS as a follow-up; out of scope for #976.

Verifying the live heal now (dispatched the new rail; watching the registry advance past 6bb6ff29 and x-idss-release follow via the droplet's 5-min reseed timer). Close-report to follow with the evidence.

**Ruled by agent under ADR 0174 — veto anytime.** Option **(A)** implemented: the reseed publish is now a standalone workflow off the push path, so a push can no longer cancel the run that mints the reseed pin. Config/CI-only, revertible (delete one workflow file), offline-proven — a two-way door. **Root cause confirmed live.** At session start the registry itself was frozen: newest published `idss-agent` version = `6bb6ff29` (2026-08-28 21:34:31Z), and `x-idss-release` on get.idss.nz served the same `6bb6ff29`. Seven agent-affecting commits sat after it, unpublished — `dd1e56ec` (#966), `f24a38a7`, `dc4ff8cf`, `dd9193ff`, `7d1b5cad`, `353ec1c6`, `556b533e` — because every `ci` run reaching `publish` was cancelled by the next push (concurrency on workflow+ref). `oc_bootstrap_staleness` verdict: *served 6bb6ff29 is 7 agent-commit(s) behind origin/main (newest agent-affecting: 556b533e)*. Task list shows the cancels directly, e.g. task **31974 `seam` cancelled** on `e2a44526`. **What landed** (`d9b30bd7`, advances #976): - `.forgejo/workflows/reseed-publish.yml` — runs `scripts/bootstrap-reseed/publish.sh` on `schedule` (`3,13,23,33,43,53 * * * *`) + `workflow_dispatch`, workflow-level `concurrency` with `cancel-in-progress: false`. Off the push path → no push, no overlapping tick, can cancel it. - `publish.sh` is unchanged and already idempotent/self-backfilling: it diffs `newest-published..origin/main` over `OC_BOOTSTRAP_AGENT_PATHS` (the #600 filter) and publishes origin/main's tip whenever that range is agent-affecting — so any commit orphaned by a cancelled `ci` publish is caught up on the next tick. - The rail deliberately does **not** re-run the full seam, decoupling "main is red on a docs gate" (#967/#974) from "the served agent is stale". The agent still must `go build` to publish. `ci.yml` keeps its green-seam-gated `publish` job as the fast happy path; this rail is the always-fires backstop. - Red-first offline test `scripts/tests/reseed-publish-workflow-test.sh` (7 checks) pins the starvation-proof shape (not push-triggered; schedule+dispatch; workflow-level `cancel-in-progress:false`; `fetch-depth:0`; runs `publish.sh`; `REGISTRY_FORGEJO_TOKEN`). GOTCHAS #123 added. STATUS updated. **Note (follow-up filed separately):** the broker rail (`publish-broker`/`deploy-broker`, GOTCHAS #96/#98) still rides `ci` and remains starvable under the same cadence — named in GOTCHAS #123 and STATUS as a follow-up; out of scope for #976. Verifying the live heal now (dispatched the new rail; watching the registry advance past `6bb6ff29` and `x-idss-release` follow via the droplet's 5-min reseed timer). Close-report to follow with the evidence.
Author
Owner

Follow-up landed: the rail as shipped (d9b30bd7) sat waiting 40 min — the workstation runner is capacity 1 (dropped from 2 on 2026-08-22, config.yml.bak-cap2) and FIFO-shared by idss/matou-app/dev-factory/matou-website crons: ~110 queued runs at 06:45Z. Moved runs-on to elitebook-03 (capacity 2, nix+go, idle) and dispatched. The workstation queue itself (four repos × resume-asks/healer/verify/triage crons on one slot, 4 cores/7 GB) is a separate capacity question for Ben — noted, not touched.

Follow-up landed: the rail as shipped (`d9b30bd7`) sat `waiting` 40 min — the workstation runner is **capacity 1** (dropped from 2 on 2026-08-22, `config.yml.bak-cap2`) and FIFO-shared by idss/matou-app/dev-factory/matou-website crons: ~110 queued runs at 06:45Z. Moved `runs-on` to `elitebook-03` (capacity 2, nix+go, idle) and dispatched. The workstation queue itself (four repos × resume-asks/healer/verify/triage crons on one slot, 4 cores/7 GB) is a separate capacity question for Ben — noted, not touched.

Close-report — Ruled by agent under ADR 0174 (veto anytime).

Option A (implemented d9b30bd7, moved to elitebook-03 5f6462f4) is landed and verified live this session. Config/CI-only, revertible (delete one workflow file) — a two-way door.

Verified live (this session's monitor)

  • The 8 h freeze is broken and the pin caught up autonomously. At session start the registry was frozen at d9b30bd7 (06:50:42Z) with 3 agent-affecting commits unpublished. Over the session the registry drained to tip on its own: d3b80d7c 09:37:56Z → 08e9bbcc 09:39:40Z → e1a8cdcb 09:43:41Z.
  • x-idss-release reached origin/main's newest agent-affecting commit without human intervention. Probe log: served 08e9bbcc at 09:47:29Z → e1a8cdcb at 09:49:46Z (the droplet's 5-min reseed timer, autonomous). e1a8cdcb was published at 09:43:41Z — before my verification workflow_dispatch at ~09:44Z could have built — so the catch-up was the pipeline's, not a manual mint.
  • oc_bootstrap_staleness now returns FRESH: bootstrap-fresh: served e1a8cdcbf46e… carries every agent-affecting commit up to origin/main.
  • Offline guard green: scripts/tests/reseed-publish-workflow-test.sh → 7 checks passed (pins the starvation-proof shape: not push-triggered; schedule + dispatch; workflow-level cancel-in-progress:false; fetch-depth:0; runs publish.sh; REGISTRY_FORGEJO_TOKEN).

Acceptance

  • Docs-only pushes no longer cancel the run that matters. The reseed publish is off the push path (reseed-publish.yml, schedule + workflow_dispatch, cancel-in-progress:false); publish.sh is idempotent and self-backfilling (diffs newest-published..origin/main over OC_BOOTSTRAP_AGENT_PATHS). Guard confirmed locally: d9b30bd7..e1a8cdcb = 3 agent-commits → publishes the tip.
  • x-idss-release reaches the newest agent-affecting commit without human intervention — proven above (served → e1a8cdcb, fresh verdict).
  • GOTCHAS entry — #123 (⭐⭐ A push to main cancels the seam …), with the rule.

One honest caveat → filed as #980

The named failure #976 fixes is push cancellation, and that is fixed. But tonight a second, distinct cause of the same symptom surfaced: runner-pool queue saturation. The three commits above published in-order only after a ~1 h lag because their ci publish jobs sat waiting in the capacity-1 FIFO queue (they were not cancelled — each ran to completion and published its own sha). During that window the #600/#918 park ticket #978 filed/updated (09:28Z) — a #971-class re-file that decoupling alone cannot stop, because its cause here is capacity, not cancellation. That is exactly the "separate capacity question for Ben" you flagged above (06:46Z); split out as #980 (ready-for-human), since reversing the deliberate 2026-08-22 cap-2→1 drop or re-sharding four repos' crons is a reserved host-capacity call. #978 will stop updating now that the pin is fresh; the next drive preflight passes.

Landing #976 as done: its deliverable (publish off the push path, cancellation-proof) is complete, tested, and live-proven; the residual latency is #980's capacity concern, not this ticket's rule.

**Close-report — Ruled by agent under ADR 0174 (veto anytime).** Option A (implemented `d9b30bd7`, moved to `elitebook-03` `5f6462f4`) is landed and **verified live this session**. Config/CI-only, revertible (delete one workflow file) — a two-way door. ## Verified live (this session's monitor) - **The 8 h freeze is broken and the pin caught up autonomously.** At session start the registry was frozen at `d9b30bd7` (06:50:42Z) with 3 agent-affecting commits unpublished. Over the session the registry drained to tip on its own: `d3b80d7c` 09:37:56Z → `08e9bbcc` 09:39:40Z → `e1a8cdcb` 09:43:41Z. - **`x-idss-release` reached `origin/main`'s newest agent-affecting commit without human intervention.** Probe log: served `08e9bbcc` at 09:47:29Z → **`e1a8cdcb` at 09:49:46Z** (the droplet's 5-min reseed timer, autonomous). `e1a8cdcb` was published at 09:43:41Z — *before* my verification `workflow_dispatch` at ~09:44Z could have built — so the catch-up was the pipeline's, not a manual mint. - **`oc_bootstrap_staleness` now returns FRESH:** `bootstrap-fresh: served e1a8cdcbf46e… carries every agent-affecting commit up to origin/main`. - **Offline guard green:** `scripts/tests/reseed-publish-workflow-test.sh` → `7 checks passed` (pins the starvation-proof shape: not push-triggered; schedule + dispatch; workflow-level `cancel-in-progress:false`; `fetch-depth:0`; runs `publish.sh`; `REGISTRY_FORGEJO_TOKEN`). ## Acceptance - [x] **Docs-only pushes no longer cancel the run that matters.** The reseed publish is off the push path (`reseed-publish.yml`, schedule + `workflow_dispatch`, `cancel-in-progress:false`); `publish.sh` is idempotent and self-backfilling (diffs `newest-published..origin/main` over `OC_BOOTSTRAP_AGENT_PATHS`). Guard confirmed locally: `d9b30bd7..e1a8cdcb` = 3 agent-commits → publishes the tip. - [x] **`x-idss-release` reaches the newest agent-affecting commit without human intervention** — proven above (served → `e1a8cdcb`, fresh verdict). - [x] **GOTCHAS entry** — #123 (`⭐⭐ A push to main cancels the seam …`), with the rule. ## One honest caveat → filed as #980 The named failure #976 fixes is push **cancellation**, and that is fixed. But tonight a **second, distinct** cause of the same symptom surfaced: **runner-pool queue saturation**. The three commits above published in-order only after a ~1 h lag because their `ci` `publish` jobs sat `waiting` in the capacity-1 FIFO queue (they were *not* cancelled — each ran to completion and published its own sha). During that window the #600/#918 park ticket **#978** filed/updated (09:28Z) — a #971-class re-file that decoupling alone cannot stop, because its cause here is capacity, not cancellation. That is exactly the "separate capacity question for Ben" you flagged above (06:46Z); split out as **#980** (`ready-for-human`), since reversing the deliberate 2026-08-22 cap-2→1 drop or re-sharding four repos' crons is a reserved host-capacity call. #978 will stop updating now that the pin is fresh; the next drive preflight passes. Landing #976 as done: its deliverable (publish off the push path, cancellation-proof) is complete, tested, and live-proven; the residual latency is #980's capacity concern, not this ticket's rule.
matou-build-agent 2026-08-29 09:51:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#976
No description provided.