elitebook-03 crash-loops on every dispatch: .sandcastle/worktrees mount missing on fresh clones #466

Closed
opened 2026-08-12 03:48:32 +00:00 by ben · 3 comments
Owner

Symptom

elitebook-03, freshly onboarded for the pool cutover (44fe333), crash-looped on every single dispatch since going live at ~03:36Z: pnpm run sandcastle died in <1s with Error: Mount hostPath does not exist: .sandcastle/worktrees, thrown by @ai-hero/sandcastle before any worker container spawned. run-swarm.sh retried every 20-60s against the same ready set (#464/#465) for ~7 minutes straight — zero real work done on that host since cutover.

Cause

main.mts mounts .sandcastle/worktrees at its own host path (#239) as a MANDATORY Docker bind mount. The directory is gitignored (it holds live git worktrees), so a fresh clone never has it on disk. run-swarm.sh already mkdir -ps the other three host-side scaffolding dirs (secrets/, pnpm-store/, nix-store/) before each run, but never created worktrees/. The long-lived matou-workstation checkout got away with skipping this only because a worktree had already been created there once, long before this cutover — the bug was latent until a genuinely fresh host joined the pool.

No claim comment was ever posted for #464/#465 from elitebook (verified via the issues API) — the crash happens before claim-next-task.sh runs inside the container, so this was a throughput/capacity defect, not a double-pickup risk.

Fix

56b92b6 — mkdir -p "$here/worktrees" alongside the existing scaffolding, and manually created the directory live on elitebook to stop the immediate crash loop mid-watch. Confirmed elitebook picked up dispatches cleanly afterward during the Task 11 cutover watch.

Found during

Task 11 (cutover watch) of the multihost-swarm plan, .superpowers/sdd/2026-08-11-multihost-swarm/.

## Symptom elitebook-03, freshly onboarded for the pool cutover (`44fe333`), crash-looped on every single dispatch since going live at ~03:36Z: `pnpm run sandcastle` died in <1s with `Error: Mount hostPath does not exist: .sandcastle/worktrees`, thrown by @ai-hero/sandcastle before any worker container spawned. run-swarm.sh retried every 20-60s against the same ready set (#464/#465) for ~7 minutes straight — zero real work done on that host since cutover. ## Cause `main.mts` mounts `.sandcastle/worktrees` at its own host path (#239) as a MANDATORY Docker bind mount. The directory is gitignored (it holds live git worktrees), so a fresh clone never has it on disk. `run-swarm.sh` already `mkdir -p`s the other three host-side scaffolding dirs (`secrets/`, `pnpm-store/`, `nix-store/`) before each run, but never created `worktrees/`. The long-lived matou-workstation checkout got away with skipping this only because a worktree had already been created there once, long before this cutover — the bug was latent until a genuinely fresh host joined the pool. No claim comment was ever posted for #464/#465 from elitebook (verified via the issues API) — the crash happens before `claim-next-task.sh` runs inside the container, so this was a throughput/capacity defect, not a double-pickup risk. ## Fix `56b92b6` — `mkdir -p "$here/worktrees"` alongside the existing scaffolding, and manually created the directory live on elitebook to stop the immediate crash loop mid-watch. Confirmed elitebook picked up dispatches cleanly afterward during the Task 11 cutover watch. ## Found during Task 11 (cutover watch) of the multihost-swarm plan, `.superpowers/sdd/2026-08-11-multihost-swarm/`.
ben 2026-08-12 03:48:44 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

Fixed and live-remediated during the Task 11 cutover watch — see commit 56b92b6.

Fixed and live-remediated during the Task 11 cutover watch — see commit 56b92b6.
Author
Owner

This was generated by AI during triage.

Category: bug
Recommendation: ready-for-agent

Verification: confirmed. The fix this issue describes is already landed at HEAD — 56b92b6 (sandcastle: run-swarm.sh mkdir's the worktrees mount before every run) adds mkdir -p "$here/worktrees" to .sandcastle/run-swarm.sh alongside the existing secrets//pnpm-store//nix-store/ scaffolding, exactly as described in this issue's Fix section. .sandcastle/worktrees/ is gitignored (.gitignore:7, .sandcastle/.gitignore:3), matching the described cause. No redundant work needed on the code fix itself, and nothing in .out-of-scope/ resembles this (it's not a rejected request).

What's left: this repo treats operational hazards like this one as a durable artifact class (docs/GOTCHAS.md, ADR 0160: docs/adr/0160-gotchas-is-an-artifact-class.md), which requires "an entry in the same commit as the fix or ticket that closes the hazard." 56b92b6 landed the fix but did not add a GOTCHAS.md entry, so that half of the convention is still outstanding — that's the concrete remaining work, not a design or judgement call, so this goes to ready-for-agent rather than ready-for-human.

Agent Brief

Category: bug
Summary: Add the missing docs/GOTCHAS.md entry for the .sandcastle/worktrees mandatory-mount hazard, and close this issue in the same commit.

Current behavior:
The hazard this issue documents (a mandatory Docker bind-mount hostPath that is gitignored, so a fresh host checkout never has it on disk and crash-loops on every dispatch before any worker spawns) has a landed code fix but no corresponding docs/GOTCHAS.md entry, even though docs/GOTCHAS.md's own header and ADR 0160 require one "in the same commit as the fix or ticket that closes the hazard."

Desired behavior:
docs/GOTCHAS.md gains one new numbered entry, appended after the current last entry, following the existing Symptom → Cause → Rule structure and severity marker (⭐ = cost real time, ⭐⭐ = took something down or would have — this took a whole host's throughput to zero for ~7 minutes, so weigh accordingly). The entry should be self-contained the way existing entries are: nameable mount/scaffolding concepts, not file paths or line numbers that will drift. This issue (#466) is closed in the same commit that adds the entry, per the project's established pattern for hazard postmortems.

Key interfaces:

  • docs/GOTCHAS.md — one new entry at the end of the numbered list, matching the format of entry 17 (${VAR:?} inside $(...) under set -u), which is the most structurally similar (a scaffolding/guard omission class, single-commit fix, host-scoped blast radius).
  • No code changes — this ticket is documentation-only. The mount/mkdir fix itself is done (56b92b6); do not re-touch .sandcastle/run-swarm.sh for this hazard.

Acceptance criteria:

  • docs/GOTCHAS.md has a new numbered entry describing this hazard (Symptom → Cause → Rule, severity-marked)
  • The entry references the fix commit (56b92b6) and the originating issue (#466)
  • Issue #466 is closed in the same commit that adds the entry

Out of scope:

  • Any further code change to the mount/mkdir fix — it's already correct
  • STATUS.md — this is a documentation-only follow-up to an already-landed fix, not a new phase/gate/feature change
> *This was generated by AI during triage.* **Category:** bug **Recommendation:** `ready-for-agent` **Verification:** confirmed. The fix this issue describes is already landed at HEAD — `56b92b6` (`sandcastle: run-swarm.sh mkdir's the worktrees mount before every run`) adds `mkdir -p "$here/worktrees"` to `.sandcastle/run-swarm.sh` alongside the existing `secrets/`/`pnpm-store/`/`nix-store/` scaffolding, exactly as described in this issue's Fix section. `.sandcastle/worktrees/` is gitignored (`.gitignore:7`, `.sandcastle/.gitignore:3`), matching the described cause. No redundant work needed on the code fix itself, and nothing in `.out-of-scope/` resembles this (it's not a rejected request). **What's left:** this repo treats operational hazards like this one as a durable artifact class (`docs/GOTCHAS.md`, ADR 0160: `docs/adr/0160-gotchas-is-an-artifact-class.md`), which requires "an entry in the same commit as the fix or ticket that closes the hazard." `56b92b6` landed the fix but did not add a `GOTCHAS.md` entry, so that half of the convention is still outstanding — that's the concrete remaining work, not a design or judgement call, so this goes to `ready-for-agent` rather than `ready-for-human`. ## Agent Brief **Category:** bug **Summary:** Add the missing `docs/GOTCHAS.md` entry for the `.sandcastle/worktrees` mandatory-mount hazard, and close this issue in the same commit. **Current behavior:** The hazard this issue documents (a mandatory Docker bind-mount hostPath that is gitignored, so a fresh host checkout never has it on disk and crash-loops on every dispatch before any worker spawns) has a landed code fix but no corresponding `docs/GOTCHAS.md` entry, even though `docs/GOTCHAS.md`'s own header and ADR 0160 require one "in the same commit as the fix or ticket that closes the hazard." **Desired behavior:** `docs/GOTCHAS.md` gains one new numbered entry, appended after the current last entry, following the existing Symptom → Cause → Rule structure and severity marker (⭐ = cost real time, ⭐⭐ = took something down or would have — this took a whole host's throughput to zero for ~7 minutes, so weigh accordingly). The entry should be self-contained the way existing entries are: nameable mount/scaffolding concepts, not file paths or line numbers that will drift. This issue (#466) is closed in the same commit that adds the entry, per the project's established pattern for hazard postmortems. **Key interfaces:** - `docs/GOTCHAS.md` — one new entry at the end of the numbered list, matching the format of entry 17 (`${VAR:?}` inside `$(...)` under `set -u`), which is the most structurally similar (a scaffolding/guard omission class, single-commit fix, host-scoped blast radius). - No code changes — this ticket is documentation-only. The mount/mkdir fix itself is done (`56b92b6`); do not re-touch `.sandcastle/run-swarm.sh` for this hazard. **Acceptance criteria:** - [ ] `docs/GOTCHAS.md` has a new numbered entry describing this hazard (Symptom → Cause → Rule, severity-marked) - [ ] The entry references the fix commit (`56b92b6`) and the originating issue (`#466`) - [ ] Issue #466 is closed in the same commit that adds the entry **Out of scope:** - Any further code change to the mount/mkdir fix — it's already correct - `STATUS.md` — this is a documentation-only follow-up to an already-landed fix, not a new phase/gate/feature change
Author
Owner

This was generated by AI during triage.

Noted — you closed this directly with the fix confirmation while triage was in flight, which supersedes the ready-for-agent routing above. Leaving the labels as-is per this repo's convention of keeping state labels on closed issues as a record (matches #453/#454/#455/#461/#462).

The one open thread from my brief — a docs/GOTCHAS.md entry for this hazard per ADR 0160 — is now optional/your call rather than active agent work, since you've already closed the ticket. Reopen or file fresh if you want that follow-up actioned.

> *This was generated by AI during triage.* Noted — you closed this directly with the fix confirmation while triage was in flight, which supersedes the `ready-for-agent` routing above. Leaving the labels as-is per this repo's convention of keeping state labels on closed issues as a record (matches #453/#454/#455/#461/#462). The one open thread from my brief — a `docs/GOTCHAS.md` entry for this hazard per ADR 0160 — is now optional/your call rather than active agent work, since you've already closed the ticket. Reopen or file fresh if you want that follow-up actioned.
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#466
No description provided.