A failed standing re-supply destroys the community AND wedges its slug for 24h — the teardown loses the claim secret, then wipes the home #1755
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1755
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
One failed re-supply cost the community, its name for 24 h, and the next drive
Seen on ADR 0264's fire 7 (bens-mac-04, slug
rehearsal-m). The drive intended toADOPT — the staleness verdict was binary-only drift, ADR 0208 ruling 3a:
Then, on the re-found:
Net effect of one failed re-render: the standing community's gateway destroyed (the
pre-rent sweep reaps the same-slug droplet), the standing home wiped, the claim
secret gone, and the slug wedged at the broker for its 24 h TTL — so the next
drive cannot use that name either. The lane is down until someone rotates the slug
by hand.
The specific contradiction
oc_standing_teardownreports "no host/secret on record … the community neverreached S5" four log lines after
oc_standing_resupplyread that samefacts.jsonand printed the host and IP it was re-supplying. The teardown's ownfallback chain (facts.json →
founding-state.jsondraft.details.slug/draft.address.host, thenoc_standing_secretoverstate/) also came backempty. So between the re-supply's read and the teardown's read, the facts the
teardown needs to OFFBOARD the name stopped being visible — and the teardown then
rm -rf'd the home, binning the one key to the reservation.Finding where
facts.json(or the state dir) goes between those two calls is thefirst step; the failure-path ordering is the likely suspect.
Shape
facts the re-supply just proved readable, and only then remove anything. A wipe
that precedes the offboard is unrecoverable by design.
fallback is "re-found", but a re-found that cannot reclaim its own name leaves
the lane worse off than parking. Consider parking the drive (the #1189 page)
when the re-supply fails and the slug's secret is not in hand.
moments earlier (the re-supply had already scp'd to it).
Impact
Any lane on ADR 0208's standing community, not just the bring-your-own one: this
is the shared re-supply path. It is a slow, quiet trap — the drive that pays for
it is the NEXT one, with a 5-second Address refusal and no obvious cause.
Ruled by agent under ADR 0174 — veto anytime
Ruling:
bug+ready-for-agent(withpriority). I also rule the fallback-policy question the report's Shape §2 raises: a standing teardown must notrm -rfthe home when it could not prove the name was freed — it must PARK the home (preservestate/and its key material) and page, never wipe the only recoverable key. This adopts the report's "a failed re-supply should not be destructive by default" as the concrete teardown contract below.Why this is a two-way door: the whole fix lives in
scripts/lib/rehearsal-standing-lib.sh+ its offline testscripts/tests/rehearsal-standing-test.sh(ordinary repo paths — not.sandcastle/**, no host credentials, no live-infra op required to prove it). It is revertible by a single commit/label change and provable by the existing offline harness (fakecurl/ssh, no broker/network). It is on none of the one-way-door lists (no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction — it prevents one — no non-routine spend). Ben's veto is asynchronous.What proves it:
bash scripts/tests/rehearsal-standing-test.sh(extended with the cases in the acceptance criteria) goes green offline.Verification — the reported fix is already in; the real trap is elsewhere
I read the code against the report before writing the brief. Two corrections to the report's diagnosis:
oc_standing_teardownalready remembers the secret (#757), then releases, then offboards, and only then wipes — therm -rfis the last statement, and#897already hardened the "teardown can no longer bin the only claim key" case for a red-mid-found (facts.json absent) drive.oc_standing_resupplyreads onlyfacts.json(slug/host/ip) and happily prints the host/IP. Butoc_standing_teardown's S5 guard is gated on bothhostandsecret, wheresecretis mined from a different source —oc_standing_secretgrepsstate/forclaimSecret. When the secret is not present instate/(e.g. an adopted community whosestate/never carried it), that guard fails, release+offboard are skipped ("no host/secret on record … never reached S5"), yet the wipe still runs unconditionally — binningstate/(the one place the key could still be) and leaving the broker holding the name for its 24 h TTL. That is exactly the fire-7 log: facts readable (host printed), secret empty, name never freed, slug wedged.The offline test asserts remember-before-release ordering but has no assertion that the wipe is conditional on the name being freed, and no case for host-present/secret-empty — which is why this passed CI and only bit a live drive.
Agent Brief
Category: bug
Summary: A failed standing re-supply can wipe the community home even when the teardown could not free the name, wedging the slug at the broker for 24 h — because
oc_standing_teardownskips release+offboard when it cannot mine the claim secret, yet stillrm -rfs the home unconditionally.Current behavior:
On binary-only drift the drive re-supplies in place; if the re-supply fails (fire 7 failed at the
#1275gateway re-render step) it falls back to a re-found, whose first act isoc_standing_teardown. When the teardown cannot mine the claim secret fromstate/— even thoughfacts.jsonstill names the host that the re-supply just read and printed — it takes the "no host/secret on record" branch, skips the broker release + subdomain offboard, and then still wipes the standing home. Net: the gateway is reaped by the next drive's pre-rent slug sweep, the home and its key are gone, and the broker holds the name until its 24 h TTL lapses — the next drive dies on a 5-second Address refusal with no obvious cause.Desired behavior:
The teardown must never destroy the home when it has not provably freed the name. Concretely:
state//facts.jsonin place, emit a loud, greppable PARK line that names the wedged slug and this issue, and page through the same drive-park path the rest of the drive uses (the#1189page) when that mechanism is available to the sourcing script. A parked home is recoverable; a wiped one is not.facts.json(orstate/founding-state.json) names a host but no secret can be mined, that is a cannot-free-the-name condition (→ PARK), distinct from a genuinely never-founded community (nothing to free → safe to wipe).Key interfaces / behavioral contracts:
oc_standing_teardown— the terminal wipe must be guarded on a "name is safe to abandon" predicate (name released, or secret remembered to the claims store), not run unconditionally. Preserve the existing remember-before-spend and the#897facts.json→founding-state.jsonfallback.oc_standing_secret/ the S5 guard — distinguish "host known, secret unminable" (cannot free → park) from "nothing on record" (never founded → safe to wipe).#1189page/park mechanism from the sourcing script (smoke-private-path.sh); do not invent a second park channel.Acceptance criteria:
bash scripts/tests/rehearsal-standing-test.shpasses.facts.jsonhost present but no claim secret instate/does not remove the home, and emits a PARK line naming the slug — the state dir survives the call.FAKE_OFFBOARD_RC=1) and no secret was remembered does not remove the home.docs/GOTCHAS.mdgains a Symptom→Cause→Rule entry for the "next drive dies on a 5-second Address refusal because a prior teardown wiped the home without freeing the name" trap, in the same commit.Diagnosis lead (pursue, but land the safety fix regardless):
Why did the adopted standing home carry no mineable claim secret while
facts.jsonwas intact? The likely cause is that the adopt/re-supply lineage does not persistclaimSecretintostate/founding-state.jsonthe way a fresh S5 founding does, sooc_standing_secretfinds nothing on a community it never freshly founded. If confirmed, ensure the adopt path persists (or can re-mine) the secret. This is diagnosable from the code; a live standing drive would confirm it but is not required to land the safety fix above.Out of scope:
#1275gateway re-render failed on fire 7 (Shape §3). A re-render can fail for many reasons; the point of this ticket is that a re-render/re-supply failure must not be catastrophic. File a separate issue for the re-render failure if it recurs..sandcastle/**or to the broker's release/offboard/TTL behavior.swarm-claim host=matou-dev-server-01 run=30761
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1755 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope