clan-lab droplet 594171376 is 2 days past its own clan-lab-expires- tag and still billing — and nothing seems to enforce that tag #723
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#723
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?
Droplet
594171376(clan-lab-rehearsal-1d5d33df, 170.64.180.202, Ubuntu 24.04,s-2vcpu-4gb, syd1) was created2026-08-21T22:38:50Zwith tagclan-lab-expires-1787373527— 2026-08-22 04:38 UTC. It is still running, two days past its own expiry tag, and has been billing since.Noticed while renting lab boxes for #717's copy measurement. Not destroyed there: it is not that ticket's box, nobody's session claims it, and destroying lab state someone may still be reading is a one-way door — a human (or the
clan-labskill's own cleanup path, which knows the expiry contract) should confirm and reap it.Worth checking at the same time whether anything enforces the
clan-lab-expires-tag, or whether it is only ever honoured by the session that set it. If it is the latter, an expired-lab sweep is the actual fix and this droplet is just its first customer.Ruled by agent under ADR 0174 — veto anytime
The ruling. Both calls this ticket parks on a human are two-way doors, so triage takes them:
bug, not an enhancement request for a sweep.594171376is not a fresh destruction decision. It executes a standing authorization that a PATH bug has been swallowing for 12 days. Verified empty, so nothing is lost.Routed
ready-for-session(+priority), notready-for-human: no one-way door is involved, but the fix is a host-crontab edit plus a live droplet destroy under the DO token — outside what a containerised swarm worker can reach (docs/agents/triage-labels.md, ADR 0174 rule 5).Verification — the claim, checked
The droplet is real and still billing. It is the only
clan-lab-tagged droplet on the account:Expiry tag decodes to 2026-08-22 04:38 UTC; as of this triage it is
up 2 days, 2:43. Tagging is correct — it is not invisible to the reaper.The reaper exists, on an hourly cron, and has failed on every single tick.
crontab -lonmatou-workstation:~/swarm/logs/clan-lab-reap.logis 293 lines, all identical:293 hourly ticks ≈ 12.2 days with zero successful reaps.
docs/agents/worker-classes.jsonalready describes this worker (id: clan-lab-reap) — and records"invisible_failure": false. That field is falsified by this evidence: the worker logged a fatal error hourly for twelve days with no alert and nobody noticed. Its ownstuck_signal: "none"predicted exactly this.Root cause
doctlis not on the host PATH. It exists only via Nix:Cron's default PATH does not include
/home/dev/.nix-profile/bin, soclan-lab'scommand -v doctl >/dev/null || die(.claude/skills/clan-lab/clan-lab:27) fires before any subcommand runs. The reap line is one of the two hand-added crontab entries (outside the# BEGIN factory-managedblock) — and it is the one that does not sourcehost-env.sh. Its sibling does:host-env.sh:21setsPATH=/home/dev/.local/bin:/home/dev/.nix-profile/bin:.... Confirmed directly:So the fix is one line, and it is the same shape the working cron entry already uses.
Why destroying this box is not the one-way door the filer feared
The filer was right to stop — checked, and the caution does not survive the check:
/nix/storeholds 0 paths — the drive that rented it died beforeenroll-copyever pushed a closure./rootis skeleton dotfiles only (.bashrc,.profile,.ssh, and a.wget-hstswhose single entry is DigitalOcean's ownrepos-droplet.digitalocean.comapt agent). Onlysshdandsystemd-resolveare listening.lastshows no login since boot — the "1 user" inuptimeis stale.594590436, created 2026-08-23T17:08:31Z and destroyed by the drive's own teardown at 18:40:37Z. This is a different, older droplet (2026-08-21).#721 blocked by 1 open issue(s) — the swarm is plugging), and nothing on the host references170.64.180.202.clan-lab reapdestroys every expiredclan-labdroplet unattended, andreapstructurally cannot address anything outside theclan-labtag (labs()filters--tag-name clan-lab;resolve()refuses everything else). ADR 0174 carves out "routine lab-droplet money" explicitly.What proves it (two-way door): the fix is a crontab line — revertible by editing one line back. It is provable before it touches anything, by running the cron command's exact text by hand and reading the log:
doctl not foundbecomesreap done (N destroyed).Agent brief —
ready-for-sessionGoal: the
clan-lab-expires-contract is actually enforced, and the leaked box is gone.matou-workstationso it resolvesdoctl— sourcehost-env.shthe way the rehearsal-executor line does: Consider instead moving the line into the factory-managed host-cron registry (/home/dev/swarm/host-registry.conf) so it is rendered rather than hand-held — ADR 0004 host-state ownership, and ADR 0194's host-shape framing. Note that elitebook-03 (#659) will need the same entry, which argues for the registry.reaped clan-lab-rehearsal-1d5d33df (expired …)/reap done (1 destroyed). That single run is the cleanup — no separate destroy step, and it lets the standing contract do the deleting rather than a handdoctl droplet delete.clan-labfall back to the Nix-profiledoctl(or fail with the PATH it searched) instead of a baredie;reapa non-silent failure path — a Mattermost line or non-zero exit that the backstop notices — so a dead reaper alerts instead of accruing log lines.worker-classes.jsonalready flagsstuck_signal: noneand "no alert on a doctl deletion failure" as known gaps.docs/agents/worker-classes.jsonclan-lab-reap:invisible_failureis true, with this ticket as the evidence.host-env.shcannot see any Nix-provided tool — the reap line and the executor line differ by exactly that, and only one worked.Scope note: #708 (per-drive DO SSH keys, ~20 leaked, never reaped) is the sibling leak on the same account, already closed. This ticket is the droplet-side equivalent; keep them separate.
Out of scope: widening the
clan-labtag's reach, or any change to whatreapis allowed to address. The tag guardrail is what makes unattended destruction safe.Ruled by agent under ADR 0174 — veto anytime
The answer to the ticket's second question is worse than either option it offered. The
clan-lab-expires-tag is not "only honoured by the session that set it" — an enforcer was installed all along, an hourly cron line on matou-workstation, and it had never once run.293 hourly runs, zero successes, every line
clan-lab: doctl not found — install and authenticate it first. cron runs commands via/bin/shwithPATH=/usr/bin:/binand sources no profile;doctllives in~/.nix-profile/bin. The CLI's own fail-loud guard exited 1 before it ever touched the account — hourly, into a log withMAILTO=""that nobody read. Reproduced verbatim before changing anything:Every other cron line on that host survives because it sources
~/swarm/host-env.shfirst, whose job is exporting the real PATH. The reaper line was hand-written without it. CI carries the identical hazard and the identical workaround, spelled out inci.yml("the runner is host-mode and its service PATH predates the nix install").Two failures that only bite together: a cron line is a bare environment, and a cleanup job's success is invisible by nature — nothing happening is what it looks like when it works — so the one signal separating "reaped nothing, correctly" from "died on line one" is the one nobody reads.
The one-way-door question, answered with evidence rather than assumed
The ticket reserved destroying
594171376for a human because "destroying lab state someone may still be reading is a one-way door". I probed the box read-only before ruling, and there was no lab state to read:--fresh, so no clan was ever inside it;/rootheld only distro dotfiles (.bashrc,.profile,.ssh); nothing installed;sshdandsystemd-resolved;last/wtmp recorded no interactive login in its entire two-day life — the only ssh sessions it ever had were01:22/01:23today (this ticket's filing session probing it) and mine at01:53.Ruled a two-way door: no data, no claimant, 45h past a self-expire contract already accepted when the skill was written ("reap … is safe to run from cron or any session"), and the box is recreatable in ~2 minutes by
clan-lab create. This ticket also named "theclan-labskill's own cleanup path, which knows the expiry contract" as an acceptable reaper — that is exactly the path that destroyed it, no bespokedoctlcall. No personal credential, no posture widening, no member-facing accept, no non-routine spend.Proven live
The in-flight rental
idss-gateway-rehearsal-c-8bc1was never at risk:reapresolves targets only amongclan-lab-tagged droplets, and that box carriesidss-gateway,idss-rental. Verified after — it is the only droplet left besides the four production boxes.Close report
Both halves of the ticket are done: the droplet is reaped, and the thing that should have reaped it 45 hours earlier now works and is proven.
What landed
2674abascripts/clan-lab-reap.sh+scripts/tests/clan-lab-reap-test.sh, GOTCHAS #74, STATUS.mdc6cc131HOMEeither — caught running the installed cron line underenv -i6579942HOME, not just read it:doctlrefuses to start without it57f4a82scripts/clan-lab-reap.sh— the expiry tag's enforcer, in a form cron can actually run. It prepends the well-known nix profile dirs only whendoctlis otherwise unreachable (an interactive run resolves exactly as before), derives and exportsHOMEwhen unset, falls back to the host-only token file whenDIGITALOCEAN_ACCESS_TOKENis not exported, and on any CANNOT-REAP condition exits non-zero and pings Mattermost — so the next breakage lasts an hour instead of 293 of them. It adds no droplet selection of its own; the "onlyclan-lab-tagged droplets are addressable" guardrail stays the CLI's.The host cron line (product-owned, outside the factory-managed block) now calls it behind the same
host-env.sh+idss-env.shprefix every other line on the box already had. Previous crontab backed up to~/swarm/logs/crontab.before-723.20260824T020318Z.bak; exactly one line differs.Proof
doctl not foundagainst the old shape before the entrypoint existed;env -i PATH=/usr/bin:/binreproduced it against the real installed command.scripts/tests/clan-lab-reap-test.shdrives the enforcer the way cron calls it, not the way a human does:PATH=/usr/bin:/bin, no exported token, a stubdoctlreachable only through the dirs the script resolves. It asserts up front that no realdoctlis on that PATH, so it cannot go vacuously green. Cases:HOMEunset; the reproduction; the selection guardrail (an unexpired lab survives — this runs hourly, so a slip would destroy live labs all day); a 0-destroyed hour exiting clean; both CANNOT-REAP paths failing loud.env -i— the first successful run in that log's 293-line history:That
env -icheck earned its keep twice: it caughtHOME: unbound variablein my own script (c6cc131) and thendoctl's ownneither $XDG_CONFIG_HOME nor $HOME are defined(6579942). Real cron setsHOME, so neither reached production — but a script written to end "the environment was barer than you assumed" should not contain another instance of it.One thing I got wrong, and fixed
The enforcer pages on CANNOT-REAP by design, and the test deliberately drives two of those — so run from a session holding the host's Mattermost credentials, the test posted 9 real alerts into the team channel naming
/tmpfixture paths. Fixed in57f4a82(the test strips theMATTERMOST_*trio; production behaviour untouched), proven by re-running the suite with the credentials sourced: 5/5 green, channel silent. A correction was posted to the channel so nobody chases them.Found, filed, not fixed
Both live in
.claude/skills/clan-lab/clan-lab, which is permission-gated for a session under this harness:ResourceCount, a field 1.160.1 renders<nil>(the real one isDropletCount), so its$2 == 0filter has never matched: 170+ deadclan-lab-expires-*tags remain, confirmed still there after a successful reap. Plus aset -ehazard inset_expiryline 93 that killsclan-lab extendon a lab with no expiry tag. The test's comment block records why it deliberately does not assert that sweep today — a fixture printing0would make a production no-op look green, which is the exact class of lie this ticket is about.idss-rentalgateway droplets carry no expiry tag at all, andreapstructurally cannot see them. That is the droplet class the rehearsal drive rents today, protected only by its own teardown trap — the same shape that failed in #393 and here.The lesson, recorded as GOTCHAS #74
A cron line is a bare environment: never assume PATH, a HOME-derived profile, or an exported credential. Give the job a repo-owned entrypoint that resolves its own tools and secret and fails loud somewhere a human sees, and test it the way cron calls it. Corollary, earned the expensive way: an enforcement mechanism with no successful run in its log has never run — before trusting any sweep, TTL or reaper, read its log for a success, not for the absence of errors.
Closing.