Bump .sandcastle/FACTORY_REF to carry dev-factory #107 (scheduler canary: workflow_id match, host-env source, unvendored-copy skip) #909

Closed
opened 2026-08-27 16:39:01 +00:00 by matou-build-agent · 1 comment

Hand-off from dev-factory #107 (AC4). The scheduler-silence canary's first live tick on the workstation exposed three faults in the copy idss vendored via #891 (FACTORY_REF 8ea613a); dev-factory fixed them in cec8b3c on main. idss's vendored copy carries the OLD behavior until its FACTORY_REF is bumped past that commit.

What the fix carries

  • False UNGATED on every aged head. The claimed-ci match read the task's .name, but a task is named by its JOB — idss's ci.yml surfaces as name="seam", workflow_id="ci.yml" — so claimed was always 0 and every main head ≥ 45 min old raised a false UNGATED. Now matches .workflow_id == "ci.yml".
  • The alarm was dropped silently. The generated backstop-tick.sh runs from cron with a bare environment and sourced nothing, so notify-mattermost.sh had no MATTERMOST_URL/_CHANNEL_ID/_BOT_TOKEN — the 15:15 UNGATED post never reached Mattermost, and the canary swallowed the "would have sent:" line too. The tick now sources the registry env file; the canary lets notify's stderr through.
  • Unvendored-copy errors. canary() ran .sandcastle/scheduler-canary.sh unconditionally, erroring No such file on repos pinned before #105. Now prefers the vendored copy, falls back to the repo-root copy (self-hosting), and skips with one line when neither exists.

What idss must do

Bump .sandcastle/FACTORY_REF to dev-factory main at ≥ cec8b3c and re-vendor (onboarding/onboard.sh vendor .sandcastle <sha>), then re-run onboard.sh host-cron install on the workstation so the rendered backstop-tick.sh sources the host env and the canary matches by workflow_id. This is a protected-path change (.sandcastle/), hence ready-for-session. Precedent: idss #891.

See dev-factory GOTCHAS 34 ("First live tick (#107)") for the full symptom→cause→rule.

Hand-off from dev-factory **#107** (AC4). The scheduler-silence canary's first live tick on the workstation exposed three faults in the copy idss vendored via **#891** (FACTORY_REF `8ea613a`); dev-factory fixed them in **`cec8b3c`** on `main`. idss's vendored copy carries the OLD behavior until its FACTORY_REF is bumped past that commit. ## What the fix carries - **False UNGATED on every aged head.** The claimed-`ci` match read the task's `.name`, but a task is named by its JOB — idss's `ci.yml` surfaces as `name="seam"`, `workflow_id="ci.yml"` — so `claimed` was always 0 and every `main` head ≥ 45 min old raised a false UNGATED. Now matches `.workflow_id == "ci.yml"`. - **The alarm was dropped silently.** The generated `backstop-tick.sh` runs from cron with a bare environment and sourced nothing, so `notify-mattermost.sh` had no `MATTERMOST_URL/_CHANNEL_ID/_BOT_TOKEN` — the 15:15 UNGATED post never reached Mattermost, and the canary swallowed the "would have sent:" line too. The tick now sources the registry `env` file; the canary lets notify's stderr through. - **Unvendored-copy errors.** `canary()` ran `.sandcastle/scheduler-canary.sh` unconditionally, erroring `No such file` on repos pinned before #105. Now prefers the vendored copy, falls back to the repo-root copy (self-hosting), and skips with one line when neither exists. ## What idss must do Bump `.sandcastle/FACTORY_REF` to dev-factory `main` at ≥ `cec8b3c` and re-vendor (`onboarding/onboard.sh vendor .sandcastle <sha>`), then re-run `onboard.sh host-cron install` on the workstation so the rendered `backstop-tick.sh` sources the host env and the canary matches by `workflow_id`. This is a protected-path change (`.sandcastle/`), hence `ready-for-session`. Precedent: idss #891. See dev-factory GOTCHAS 34 ("First live tick (#107)") for the full symptom→cause→rule.
Author
Member

Close report — #909 landed (Ruled by agent under ADR 0174, veto anytime)

Both halves of the hand-off from dev-factory #107 are in and proven end-to-end.

1. idss vendored copy bumped past cec8b3c

onboard.sh vendor .sandcastle cec8b3c… (the sanctioned path — never a hand-edit of the protected .sandcastle/, #445 / GOTCHAS 4). Pin moved 8ea613a → cec8b3c (dev-factory main tip). The span is two commits; the manifest is unchanged, so four files refreshed:

  • scheduler-canary.sh (#107 / GOTCHAS 34): claimed-ci match now keys on .workflow_id == "ci.yml" (idss's ci.yml surfaces as job name="seam", so the old .name == "ci" counted 0 and false-UNGATED'd every aged head); and notify() stops swallowing notify-mattermost.sh's stderr so a "would have sent:" line survives when chat is unwired.

  • run-triage.sh (#106 / GOTCHAS 33): before/after comm pinned to LC_ALL=C — carried in the same bump.

  • Commit: 56b66806 on main (pushed).

  • Proof: check-harness-drift.sh byte-clean against cec8b3c; vendored scheduler-canary-test.sh green (12 scenarios); run-triage-test.sh green (17).

2. onboard.sh host-cron install re-run on the workstation

The host-side halves of #107 live in dev-factory's unvendored onboarding/host-state-lib.sh, so they land via re-render, not the vendor. Ran host-cron install from a clean cec8b3c checkout against ~/swarm/host-registry.conf. The regenerated /home/dev/swarm/factory-cron/backstop-tick.sh now:

  • sources the host env before any repo runs: [ -f /home/dev/swarm/host-env.sh ] && . /home/dev/swarm/host-env.sh (carries MATTERMOST_URL/_CHANNEL_ID/_BOT_TOKEN), so an UNGATED post actually reaches Mattermost;
  • canary() prefers the vendored copy, falls back to the repo-root copy (self-hosting dev-factory), and skips with one line when neither exists — no more No such file reds on pre-#105 pins.
  • Crontab backed up to ~/swarm/cron-backups/crontab-20260827T165431Z.txt; managed block spliced (8 lines), unmanaged lines untouched. host-cron diff now reports no change (host matches registry).

3. Live proof on the deployed checkout

/home/dev/swarm/Matou/idss (the checkout the 15-min tick canaries) fast-forwarded clean to 56b66806, now carrying the workflow_id canary. Ran the canary exactly as the tick does (host env sourced):

scheduler-canary: Matou/idss — saturation alarm live
=== exit: 0 ===

No false UNGATED, no No such file, exit 0 — the workflow_id == "ci.yml" match correctly finds idss's aged main head gated.

Two-way-door note

Every step is revertible (pin bump = one commit; host-cron = re-render from the old ref + the crontab backup) and provable (drift check, vendored tests, host-cron diff, the live canary run above). No one-way door touched: no personal credentials, no security widening, no data destruction — host env is referenced by path, never written into the repo or the cron script (rule 6). Precedent: idss #891.

Closing.

## Close report — #909 landed (Ruled by agent under ADR 0174, veto anytime) Both halves of the hand-off from dev-factory #107 are in and proven end-to-end. ### 1. idss vendored copy bumped past `cec8b3c` `onboard.sh vendor .sandcastle cec8b3c…` (the sanctioned path — never a hand-edit of the protected `.sandcastle/`, #445 / GOTCHAS 4). Pin moved **`8ea613a` → `cec8b3c`** (dev-factory `main` tip). The span is two commits; the manifest is unchanged, so four files refreshed: - **`scheduler-canary.sh`** (#107 / GOTCHAS 34): claimed-`ci` match now keys on `.workflow_id == "ci.yml"` (idss's `ci.yml` surfaces as job `name="seam"`, so the old `.name == "ci"` counted 0 and false-UNGATED'd every aged head); and `notify()` stops swallowing `notify-mattermost.sh`'s stderr so a "would have sent:" line survives when chat is unwired. - **`run-triage.sh`** (#106 / GOTCHAS 33): before/after `comm` pinned to `LC_ALL=C` — carried in the same bump. - Commit: `56b66806` on `main` (pushed). - Proof: `check-harness-drift.sh` byte-clean against `cec8b3c`; vendored `scheduler-canary-test.sh` green (12 scenarios); `run-triage-test.sh` green (17). ### 2. `onboard.sh host-cron install` re-run on the workstation The host-side halves of #107 live in dev-factory's **unvendored** `onboarding/host-state-lib.sh`, so they land via re-render, not the vendor. Ran `host-cron install` from a clean `cec8b3c` checkout against `~/swarm/host-registry.conf`. The regenerated `/home/dev/swarm/factory-cron/backstop-tick.sh` now: - sources the host env before any repo runs: `[ -f /home/dev/swarm/host-env.sh ] && . /home/dev/swarm/host-env.sh` (carries `MATTERMOST_URL/_CHANNEL_ID/_BOT_TOKEN`), so an UNGATED post actually reaches Mattermost; - `canary()` prefers the vendored copy, falls back to the repo-root copy (self-hosting dev-factory), and **skips with one line** when neither exists — no more `No such file` reds on pre-#105 pins. - Crontab backed up to `~/swarm/cron-backups/crontab-20260827T165431Z.txt`; managed block spliced (8 lines), unmanaged lines untouched. `host-cron diff` now reports **no change** (host matches registry). ### 3. Live proof on the deployed checkout `/home/dev/swarm/Matou/idss` (the checkout the 15-min tick canaries) fast-forwarded clean to `56b66806`, now carrying the `workflow_id` canary. Ran the canary exactly as the tick does (host env sourced): ``` scheduler-canary: Matou/idss — saturation alarm live === exit: 0 === ``` No false UNGATED, no `No such file`, exit 0 — the `workflow_id == "ci.yml"` match correctly finds idss's aged `main` head gated. ### Two-way-door note Every step is revertible (pin bump = one commit; host-cron = re-render from the old ref + the crontab backup) and provable (drift check, vendored tests, `host-cron diff`, the live canary run above). No one-way door touched: no personal credentials, no security widening, no data destruction — host env is *referenced by path*, never written into the repo or the cron script (rule 6). Precedent: idss #891. Closing.
matou-build-agent 2026-08-27 16:57:09 +00:00
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#909
No description provided.