harness: retire the pre-#639 inline fetch-or-clone fallback in dev-factory's swarm.yml.tmpl / triage.yml.tmpl (cross-consumer propagation of #1423) #1427

Closed
opened 2026-09-12 07:30:34 +00:00 by matou-build-agent · 2 comments

Follow-up from #1423 (resolved on idss by b070b403, which retired the inline fallback's role in idss's rendered .forgejo/workflows/swarm.yml + triage.yml — every workdir now routes through .sandcastle/git-setup.sh, with a retry-guarded cold-bootstrap retained only for a fresh/empty workdir).

The remaining surface

idss's workflow files are a render of dev-factory's onboarding/templates/workflows/swarm.yml.tmpl and triage.yml.tmpl (factory-only templates, not FACTORY_MANIFEST-vendored; re-rendered into each consumer by onboard.sh workflows). #1423 fixed the idss render only. Until the source templates in Matou/dev-factory are retired the same way:

  • a future re-render of idss would regress the fallback — now caught loudly by idss CI (scripts/tests/git-setup-routing-test.sh, auto-discovered by seam-smoke.sh, would go red on a reintroduced inline fetch-or-reset), but a red render is still churn, and
  • every other consumer (matou-app, dev-factory's own workflows, …) still carries the un-retried inline git fetch origin main in its else branch — the exact #1411 hole this closed on idss.

Scope

  • In Matou/dev-factory: apply b070b403's shape to onboarding/templates/workflows/swarm.yml.tmpl + triage.yml.tmpl — if [ ! -f git-setup.sh ]; then <retry-guarded cold-bootstrap> fi; <git-setup.sh>, dropping the inline pre-#639 fetch-or-reset arm.
  • Re-render each consumer's .forgejo/workflows/*.yml (onboard.sh workflows) in the same sync.
  • Carry a guard equivalent to idss's git-setup-routing-test.sh into the factory template test surface so the template itself is pinned.

Why not done in the #1423 session

#1423 was an idss ready-for-session ticket under ADR 0174 ("work only this ticket"); editing dev-factory's templates and re-rendering every consumer is a distinct, broader-blast-radius change touching other repos' CI.

**Follow-up from #1423** (resolved on idss by `b070b403`, which retired the inline fallback's *role* in idss's rendered `.forgejo/workflows/swarm.yml` + `triage.yml` — every workdir now routes through `.sandcastle/git-setup.sh`, with a retry-guarded cold-bootstrap retained only for a fresh/empty workdir). ## The remaining surface idss's workflow files are a **render** of dev-factory's `onboarding/templates/workflows/swarm.yml.tmpl` and `triage.yml.tmpl` (factory-only templates, not FACTORY_MANIFEST-vendored; re-rendered into each consumer by `onboard.sh workflows`). #1423 fixed the idss render only. Until the **source templates** in `Matou/dev-factory` are retired the same way: - a future re-render of idss would regress the fallback — now caught loudly by idss CI (`scripts/tests/git-setup-routing-test.sh`, auto-discovered by `seam-smoke.sh`, would go red on a reintroduced inline fetch-or-reset), but a red render is still churn, and - every **other consumer** (matou-app, dev-factory's own workflows, …) still carries the un-retried inline `git fetch origin main` in its `else` branch — the exact #1411 hole this closed on idss. ## Scope - In `Matou/dev-factory`: apply `b070b403`'s shape to `onboarding/templates/workflows/swarm.yml.tmpl` + `triage.yml.tmpl` — `if [ ! -f git-setup.sh ]; then <retry-guarded cold-bootstrap> fi; <git-setup.sh>`, dropping the inline pre-#639 fetch-or-reset arm. - Re-render each consumer's `.forgejo/workflows/*.yml` (`onboard.sh workflows`) in the same sync. - Carry a guard equivalent to idss's `git-setup-routing-test.sh` into the factory template test surface so the template itself is pinned. ## Why not done in the #1423 session #1423 was an idss `ready-for-session` ticket under ADR 0174 ("work only this ticket"); editing dev-factory's templates and re-rendering every consumer is a distinct, broader-blast-radius change touching other repos' CI.
Author
Member

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling

Category enhancement (kept), state ready-for-session.

Why ready-for-session (not ready-for-agent, not ready-for-human)

  • Not ready-for-agent: the swarm queue (.sandcastle/list-ready-tasks.sh) reads only ready-for-agent, and its workers run checked out on Matou/idss. This ticket's work lives in a different repo (Matou/dev-factory templates) and then re-renders every consumer's .forgejo/workflows/*.yml — cross-repo write access to protected CI surfaces. A swarm worker cannot and must not pick that up. The filer flagged exactly this broader blast radius.
  • ready-for-session: the work needs an interactive session's standing — write access to Matou/dev-factory, onboard.sh workflows re-render across consumers, protected CI-template paths. Its direct predecessor #1423 was itself a ready-for-session ticket.
  • Not ready-for-human: no Ben's-hands / Ben's-eyes / one-way-door residue. It is a security hardening (retires the un-retried inline git fetch hole, #1411 class), not a widening; no personal credentials, no member-facing trust surface, no data destruction, no non-routine spend.

Why it is a two-way door

Revertible by a later commit or label change, and provable by an existing guard: idss carries scripts/tests/git-setup-routing-test.sh (goes red on a reintroduced inline git fetch/checkout/reset), and the scope already asks for an equivalent guard on the factory template test surface. So the change is bounded and self-checking.

Verification (claim confirmed)

  • Matou/dev-factory/onboarding/templates/workflows/swarm.yml.tmpl still carries the inline fallback (git fetch origin main / git checkout -f main / git reset --hard origin/main) in its else branch — the exact surface described.
  • Matou/dev-factory is a separate repo; the render targets are the consumers' .forgejo/workflows/.
  • Note for the implementing session: the idss guard test is named scripts/tests/git-setup-routing-test.sh, not git-setup-inline-fallback-retired-test.sh as the body says — mirror that file when carrying a guard into the factory template test surface.

The scope (three concrete bullets + a carried guard) is a complete brief; no needs-info.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** ## Ruling Category **enhancement** (kept), state **`ready-for-session`**. ## Why `ready-for-session` (not `ready-for-agent`, not `ready-for-human`) - **Not `ready-for-agent`:** the swarm queue (`.sandcastle/list-ready-tasks.sh`) reads only `ready-for-agent`, and its workers run checked out on **`Matou/idss`**. This ticket's work lives in a *different* repo (`Matou/dev-factory` templates) and then re-renders **every consumer's** `.forgejo/workflows/*.yml` — cross-repo write access to protected CI surfaces. A swarm worker cannot and must not pick that up. The filer flagged exactly this broader blast radius. - **`ready-for-session`:** the work needs an interactive session's standing — write access to `Matou/dev-factory`, `onboard.sh workflows` re-render across consumers, protected CI-template paths. Its direct predecessor #1423 was itself a `ready-for-session` ticket. - **Not `ready-for-human`:** no Ben's-hands / Ben's-eyes / one-way-door residue. It is a security *hardening* (retires the un-retried inline `git fetch` hole, #1411 class), not a widening; no personal credentials, no member-facing trust surface, no data destruction, no non-routine spend. ## Why it is a two-way door Revertible by a later commit or label change, and provable by an existing guard: idss carries `scripts/tests/git-setup-routing-test.sh` (goes red on a reintroduced inline `git fetch/checkout/reset`), and the scope already asks for an equivalent guard on the factory template test surface. So the change is bounded and self-checking. ## Verification (claim confirmed) - `Matou/dev-factory/onboarding/templates/workflows/swarm.yml.tmpl` still carries the inline fallback (`git fetch origin main` / `git checkout -f main` / `git reset --hard origin/main`) in its `else` branch — the exact surface described. - `Matou/dev-factory` is a separate repo; the render targets are the consumers' `.forgejo/workflows/`. - Note for the implementing session: the idss guard test is named **`scripts/tests/git-setup-routing-test.sh`**, not `git-setup-inline-fallback-retired-test.sh` as the body says — mirror *that* file when carrying a guard into the factory template test surface. The scope (three concrete bullets + a carried guard) is a complete brief; no `needs-info`.
Author
Member

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

Two-way door: revertible per-repo workflow edits + a new vendor-excluded factory test. No security-posture, credential, spend, or data-destruction residue — no one-way door reached.

What landed

b070b403's shape (route every workdir through .sandcastle/git-setup.sh; retire the pre-#639 inline fetch-or-reset fallback; keep only a retry-guarded cold-bootstrap gated on git-setup.sh's ABSENCE) applied to the source templates and re-propagated to every consumer:

repo commit what
Matou/dev-factory 9fd5c3b both templates retired + this repo's own rendered workflows re-synced + new guard onboarding/tests/git-setup-routing-test.sh + STATUS.md
Matou/coa cb6dc21 rendered swarm.yml/triage.yml
Matou/matou-website 4ee288d rendered swarm.yml/triage.yml
Matou/matou-app 4016fd2 rendered swarm.yml/triage.yml
Matou/idss — already carries the retired form (#1423); left untouched — with the template now fixed, a re-render can no longer regress it

All five pushed to main.

Why surgical, not onboard.sh workflows

Consumers' .forgejo/workflows/*.yml are not FACTORY_MANIFEST-vendored — they are per-repo renders each consumer owns, and each carries unrelated per-repo deltas (dev-factory's SWARM_ALLOW_COLD_STORE block; coa/matou-website behind on the #110 yield-signal; matou-website's own GOTCHAS-32 wording). A mechanical full re-render would sweep in / revert that drift. The routing block is byte-identical across all four consumers, so it was propagated surgically — replacing only the fallback, preserving every delta — exactly as #1423 did for idss. The template now preserves the ${SERVER_URL#https://} no-hardcoded-remote derivation (idss's #1423 render hardcoded git.matou.nz; the template stays generic).

Proof

  • New guard onboarding/tests/git-setup-routing-test.sh (vendor-excluded via onboarding/tests/**; auto-discovered by dev-factory ci.yml's onboarding/tests/*.sh glob) extracts the routing block from each template and runs it against a fake git: established = no bootstrap + still routes through git-setup.sh; fresh = cold-bootstrap clone then routes; transient 5xx = retried; sustained = reds without falling through; failing fetch = aborts (never masked); retired gated form must stay GONE. 18 checks, red-before-green proven against the pre-fix templates.
  • self-workflows-drift-test 8/0, onboard-lib-test 235/0, vendor-manifest-coverage-test PASS.
  • Both templates render to valid YAML; every patched workflow's routing block is bash -n clean and verified byte-identical to the template.

Closing #1427 — genuinely done and proven.

**Close-report — Ruled by agent under ADR 0174 — veto anytime.** Two-way door: revertible per-repo workflow edits + a new vendor-excluded factory test. No security-posture, credential, spend, or data-destruction residue — no one-way door reached. ## What landed `b070b403`'s shape (route every workdir through `.sandcastle/git-setup.sh`; retire the pre-#639 inline fetch-or-reset fallback; keep only a retry-guarded cold-bootstrap gated on git-setup.sh's ABSENCE) applied to the **source templates** and re-propagated to **every consumer**: | repo | commit | what | |---|---|---| | `Matou/dev-factory` | `9fd5c3b` | both templates retired + this repo's own rendered workflows re-synced + new guard `onboarding/tests/git-setup-routing-test.sh` + STATUS.md | | `Matou/coa` | `cb6dc21` | rendered swarm.yml/triage.yml | | `Matou/matou-website` | `4ee288d` | rendered swarm.yml/triage.yml | | `Matou/matou-app` | `4016fd2` | rendered swarm.yml/triage.yml | | `Matou/idss` | — | already carries the retired form (#1423); **left untouched** — with the template now fixed, a re-render can no longer regress it | All five pushed to `main`. ## Why surgical, not `onboard.sh workflows` Consumers' `.forgejo/workflows/*.yml` are **not** FACTORY_MANIFEST-vendored — they are per-repo renders each consumer owns, and each carries unrelated per-repo deltas (dev-factory's `SWARM_ALLOW_COLD_STORE` block; coa/matou-website behind on the #110 yield-signal; matou-website's own GOTCHAS-32 wording). A mechanical full re-render would sweep in / revert that drift. The routing block is **byte-identical across all four consumers**, so it was propagated surgically — replacing only the fallback, preserving every delta — exactly as #1423 did for idss. The template now preserves the `${SERVER_URL#https://}` no-hardcoded-remote derivation (idss's #1423 render hardcoded `git.matou.nz`; the template stays generic). ## Proof - **New guard** `onboarding/tests/git-setup-routing-test.sh` (vendor-excluded via `onboarding/tests/**`; auto-discovered by dev-factory `ci.yml`'s `onboarding/tests/*.sh` glob) extracts the routing block from each **template** and runs it against a fake git: established = no bootstrap + still routes through git-setup.sh; fresh = cold-bootstrap clone then routes; transient 5xx = retried; sustained = reds without falling through; failing fetch = aborts (never masked); retired gated form must stay GONE. **18 checks, red-before-green** proven against the pre-fix templates. - `self-workflows-drift-test` 8/0, `onboard-lib-test` 235/0, `vendor-manifest-coverage-test` PASS. - Both templates render to valid YAML; every patched workflow's routing block is `bash -n` clean and verified byte-identical to the template. Closing #1427 — genuinely done and proven.
Sign in to join this conversation.
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
Matou/idss#1427
No description provided.