sandcastle: HEAL_WORKDIR default is $HOME-relative so the healer hook survives any pool host (#171) #180
No reviewers
Labels
No labels
agent-blocked
agent-working
bug
deferred
enhancement
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
product-decision
ready-for-agent
ready-for-human
ready-for-session
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/coa!180
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/issue-171"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #171
Make the healer hook's
HEAL_WORKDIRdefault$HOME-relative so theon-failure
Investigate failure (healer)step can run on any pool host,not only one whose runner HOME is
/home/dev.Cause
.sandcastle/swarm-identity.sh:8defaulted to the absolute/home/dev/swarm/Matou/coa.heal.shdoesmkdir -p "$HEAL_WORKDIR/.sandcastle/.state/healer"under
set -e, so onbens-mac-04(runner HOME ≠/home/dev) the healer hookaborted on its first
mkdir— before reading any evidence — emitting one line,mkdir: cannot create directory '/home/dev': Permission denied. Because thestep's Mattermost fallback ends
|| true, the step then reported successand the fault was invisible in the run list (runs 16694/16701/16705,
2026-10-09); it surfaced an hour later as the watchdog's empty
watchdog: streak ()from another host. The per-role half of GOTCHAS 2 bitingagain — the sibling
Matou/idssalready used the$HOME-relative form and itshealer ran fine on the same host off the identical underlying fault.
Fix
.sandcastle/swarm-identity.sh: defaultHEAL_WORKDIRto$HOME/swarm/Matou/coa(matchingMatou/idss); no/home/literal remains.docs/GOTCHAS.md: new entry 25 — a healer hook that dies in its ownmkdiris silent by construction (the
|| truefallback swallows the exit and therun looks green), so the hook's own failure must be read from the step log,
not the step status. GOTCHAS 3 amended with the per-step log endpoint
(
POST …/runs/<n>/jobs/<idx>/attempt/1+logCursors) used to obtain thequoted lines.
STATUS.md: header + milestone log updated in the same commit.Verification
grep /home/ .sandcastle/swarm-identity.sh→ none (acceptance 1)./home/devHOME,HEAL_WORKDIRresolves to<HOME>/swarm/Matou/coa, soheal.sh'smkdir -psucceeds and the hookreaches its evidence collector (acceptance 2).
bash .sandcastle/tests/swarm-identity-test.sh→ 7 groups passed.bash .sandcastle/check-harness-drift.sh→ OK (swarm-identity.shis theper-repo layer, not in
FACTORY_MANIFEST).Scope / residue
swarm-identity.shis per-repo but the same bug is factory-side; the next.sandcastlere-vendor must carry this fix back deliberately (ticket note).bens-mac-04is a separate host issue, out ofscope — this change is only about the healer being able to report it.
Two-way door (revertible one-line config, provable by the identity + heal
seams) — ruled by agent under ADR 0002, veto anytime.
Screenshots: none — harness/machinery fix with no visible UI surface; proven by the shell seams above.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.