rehearsal: enroll-activate intermittently burns a silent ~45-min wait then greens (2699 s and 2700 s in 2 of 5 recent foundings) — name the sleeper #992
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#992
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?
Symptom
enroll-activatenormally lands in ~240–250 s (drives20260829T144927Z247 s,20260828T234437Z-era ~243 s). Twice now it has taken ~45 minutes and then gone green:20260829T152125Z(rehearsal-e re-found): 2700 sBoth numbers sit suspiciously on a round 45-minute boundary — the shape of a timeout being fully burned and a retry then succeeding, not of activation genuinely varying 10×. Nothing reds, so no reporter ever looks at it; the cost is ~40 min of drive wall-clock and droplet time whenever it fires (and it pushed
standingto 3300 s today).Ask
enroll-activate's phases from the two slow runs' logs (test-results/drive-device/20260829T152125Zon elitebook-03 holds the full founding logs) and name which wait burns the 2700 s — a DNS/LE wait, an ssh reconnect ceiling, a systemd start timeout, a nix substitution stall.Not the drive's blocker — filed so the pattern is on the tracker before a third occurrence (2/5 recent foundings ≈ 40%).
Third occurrence:
20260829T163729Z— 2699 s again. New signal: the two 45-min runs today (152125Z,163729Z) were both re-founds of rehearsal-e after a standing teardown; the fresh founding on the same slug (144927Z) took 247 s. So the sleeper is likely something teardown leaves behind that the NEXT founding waits ~45 min for — stale DNS/negative-cache on the re-used apex, an acme-dns credential/zone leftover, a stale netbird peer, a known-hosts/ssh wait. 3 of 6 foundings; on a re-found it looks deterministic, which should make it easy to reproduce: compare144927Zvs163729Zenroll-activate phase logs side by side.Claimed by the laptop session (Ben watching) — diagnosing + fixing now; removing ready-for-agent so the swarm does not double-land it. Mechanism pinned from code + kept-run timings: 2699/2700 s = vmActivatePhaseTimeout burned to the wire, then the #714 interrupted-activate probe greens on /run/current-system == toplevel. The switch finishes (normal activate is 247–274 s across the four kept 08-29 runs); the clan CLI's systemd-run --pipe ssh session hangs dead until our ceiling kill. Fix incoming: a watchdog that probes current-system while the activate runs and reaps the hung CLI at observed completion, with an honest event naming the reap.
Ruled by agent under ADR 0174 — veto anytime.
Ruling:
ready-for-session(notready-for-agent, notready-for-human).Why this label. This ticket arrived untriaged (only
bug+priority+rehearsal-183, no state role). Ben's own last comment claimed it for a laptop session ("removing ready-for-agent so the swarm does not double-land it") and pinned the mechanism from code + kept-run timings:2699/2700 s = vmActivatePhaseTimeoutburned to the wire, then the #714 interrupted-activate probe greens on/run/current-system == toplevel— the clan CLI'ssystemd-run --pipessh session hangs dead until the ceiling kill. The fix (a watchdog that probescurrent-systemduring activate and reaps the hung CLI at observed completion, plus an honest event naming the reap) is diagnosis-and-code against live drive evidence (test-results/drive-device/…on the founding host) — an interactive session's standing, not swarm-safe work.ready-for-sessionkeeps it out of.sandcastle/list-ready-tasks.sh(which reads onlyready-for-agent) by construction, which is exactly the double-land Ben was guarding against.Why it's a two-way door. This is a label choice (
ready-for-sessionvsready-for-agent), revertible by a single label edit, and the fix behind it is a revertible commit. It is on none of the one-way-door items (no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend).What proves it. The completion criterion is already stated in the ticket: the phase timings of a slow re-found run vs a fast fresh run side by side, with the sleeper named and an honest event emitted when the reap fires — a rehearsal drive re-found on a torn-down slug going green in ~250 s instead of ~2700 s.
No host-pin marker added: the work is already claimed by an active session, and pinning to the evidence host risks stranding the ticket if that host runs no session-runner (the #743 failure mode).
Watchdog LANDED —
592db82b. The sleeper is named to mechanism: 2699/2700 s =vmActivatePhaseTimeoutburned to the second. The two slow runs' logs were pruned from elitebook-03, but the four kept 08-29 runs give the fast side of the evidence bar (enroll-activate 247/248/248/274 s), and the only code path that turns a fully-burned ceiling into a GREEN is verify's #714 tail: ceiling kill → FailInterrupted →/run/current-system== built toplevel → green. So the switch finished in minutes andclan machines update'ssystemd-run --pipessh session hung dead for the rest — the leg was honest about the green and silent about the wait.Landed:
runActivateWatched(internal/clan/enrollment.go) probes the box's own/run/current-systemevery 30 s during the activate; a match the CLI out-stays by 90 s reaps the hung invocation and SAYS so in the leg's events ("…reaping the hung activate instead of burning the ceiling (#992)"). Cost when it fires drops from ~45 min to ~switch-time + ≤2 min. Red-first tests + GOTCHAS #128 in the commit.Stays open, pinned on live proof: the next firing will now (a) cost minutes, and (b) timestamp itself with the reap sentence in the leg log — that names WHO slept (the pipe) but not yet WHY a re-found hangs it (ssh session vs teardown residue). Close on the first live reap observation, or re-scope to the WHY if it keeps firing every re-found. Removed ready-for-agent while pinned (nothing for a worker until a live specimen).
/run/current-system, so the deploy'sswitch-to-configuration bootcollides with the still-running switch and exits 11 #1009Close-report — Ruled by agent under ADR 0174 (veto anytime).
The loop pinned open by the watchdog-LANDED comment is now closed: the first live reap fired, it exposed a real regression in the reap's completion signal, and that regression has landed a fix and closed as #1009.
The first live reap (the evidence bar's live half)
Drive
20260830T002134Z(device target, commitd1870664— watchdog592db82bpresent, #1009 fix not yet) is the watchdog's first firing.logs/founding-state.logcarries the reap sentence verbatim:So the reap machinery works and SAYS itself, exactly as designed. But the drive went RED (
verdict.json:red, firstRedstanding, 15/17 green).Side-by-side — the sleeper named
152125Z/163729Z(pruned)vmActivatePhaseTimeout(45 min) burned to the second → #714 greens20260830T002134Z(this reap)The sleeper is
clan machines update'ssystemd-run --pipe --waitssh session hanging after the switch's work is done — 2700 s is the ceiling to the wire, never natural variance (GOTCHAS #128). In002134Z's journal the switch triggers its ownsystemctl daemon-reexecmid-activation (gateway-journal.txt:1258Reexecution requested from client PID 1885), the plausible severing of the--waitjob-completion signal; the exact 2700 s specimens' logs were pruned, so that WHY is evidenced-plausible, not re-captured from a 45-min trace.What the first reap exposed — and #1009's fix
The reap was premature.
/run/current-systemis written PART-WAY through the switch (before the unit stop/start phase that holds the NixOS switch lock ends), so the symlink matched whileclan-switch-gateway-15495c5e.service(PID 1885) was still running —gateway-stall.txt(00:37:41) caught it alive at etime 3 m 20 s. The reap greenedenroll-activateon a box still holding the lock, and the nextdeployleg'sswitch-to-configuration boot(00:37:18) hitCould not acquire lock→ exit 11 → RED.#1009 (
62475278, closed) fixes it: completion now gates on the switch being DONE — asystemctl list-units --state=activating,running 'clan-switch-*' 'clan-boot-*'in-flight probe (idss-switch-inflight) on BOTH the watchdog and the #714 tail — so the reap fires only when the switch unit has exited and the lock is free. It also fixed the deploy-side second defect (the death-note no longer misclassifies the collision as GOTCHAS #86's exit-101 panic;switchLockCollisionNote→ GOTCHAS #131). Teeth:TestEnroll_ActivateWatchdogNeverReapsWhileSwitchStillStartingUnits,TestEnroll_InterruptedActivateBlocksWhileSwitchStillRunningUnits,TestDeploy_SwitchLockCollisionNamesGotchas131NotThePanic.Independent corroboration
This session diagnosed
002134Zindependently from the harvested logs and reached the same root cause (symlink-flips-mid-switch) and the same fix shape (gate the reap on the switch process/unit being gone, matched so thesystemd-runwrapper — the hung pipe itself — is not caught) before discovering #1009 had already landed it. My competing patch was discarded as redundant; #1009's unit-state probe is the cleaner solution (it catchesclan-boot-*too).Ruling
Close #992. Its three asks are met: the sleeper is named to mechanism (
592db82b+ this firing), the leg no longer silently sits (it reaps and says so), and the completion-signal regression the first firing exposed is fixed and closed (#1009). The one residue — a live re-found greening in minutes with the CORRECTED reap and no lock collision — is #1009's own named live residue, produced automatically by the next paid drive-device paststanding; if it regresses a reporter re-files. Two-way door: a tracker close (revertible by reopen), the code already landed, offline-proven, and closed under #1009. GOTCHAS #131 records the class.Ruled by agent under ADR 0174 (session-runner on
matou-dev-server-01) — veto anytime. Routing this off the session queue toready-for-human(Ben's eyes). The two-way-door part is landed and green; the remaining residue is a live founding-host observation that no session on this host can produce.Evidence bar (side by side), sleeper named to mechanism
20260829T144927Z20260829T152125ZvmActivatePhaseTimeoutto the second20260829T163729ZThe sleeper (mechanism): 2699/2700 s is
vmActivatePhaseTimeout= 45 m (internal/clan/enrollment.go) burned to the wire. clan-core wraps the remote activation insystemd-run --pipe --waitover ssh (GOTCHAS #62/#68): the box'sswitch-to-configurationfinishes in minutes (normal activate 247–274 s) whileclan machines update's ssh pipe hangs dead until our ceiling signal-kills it — and the #714 post-interrupt probe then finds/run/current-systemalready == the built toplevel and honestly greens. The wait was real; the silence was the bug. So who slept = the hungmachines updatepipe, not the activation.The still-unnamed WHY (Ben's 08-29T17:34 signal): both slow runs were re-founds of rehearsal-e after a standing teardown; the fresh founding on the same slug was fast. So the sleeper is teardown residue the next founding's activate ssh waits on — a stale netbird peer, an ssh control-persist / known-hosts wait, a DNS negative-cache, or an acme-dns leftover. Which one is unproven and needs a live re-found box to name (the two slow runs' logs were pruned from elitebook-03; nothing on this host holds them).
Two-way door: DONE and proven
Watchdog landed
592db82b(runActivateWatched): every 30 s it probes the box's own/run/current-system; a match the CLI out-stays by 90 s reaps the hung invocation and says the reap in the leg's events (…reaping the hung activate instead of burning the ceiling (#992)), the #714 probe turning the reap'sFailInterruptedinto the green it already earns. Cost when it fires drops from ~45 min to ~switch-time + ≤2 min. GOTCHAS #128 records the class. Re-verified green onmain(7a3c78e7) this session:go build ./internal/clan/+go test ./internal/clan -run 'ActivateWatchdog|Interrupted|VMModeActivate'→ ok. Red-first teethTestEnroll_ActivateWatchdogReapsHungCLIOnceSwitchFinished/…NeverReapsWhileSwitchUnfinished.Why this is not session- or swarm-executable (the #743/#746 mismatch)
The only residue is the first live reap firing — (a) an enroll-activate costing minutes not 45 min, and (b) the reap sentence timestamped in the leg log naming when it fired. That rides the founding host's autonomous rehearsal drive programme (a re-found on a torn-down slug), not any session-runner action: a session cannot trigger a founding (≈60–90 min + droplet spend, another host's standing), this drainer host
matou-dev-server-01holds no door to the founding host, and the slow-run logs are already pruned.ready-for-sessiontherefore keeps draining it to hosts that cannot finish it and burns the runner's two-attempt cap for nothing — exactly the #743 failure mode.<!-- session-host -->does not rescue it either: the founding host runs Forgejo Actions, no session-runner.Why human
Ben's eyes — watch the next re-found's
enroll-activateon the founding drive programme.Proposed default ruling: on the first live firing that greens in ~minutes with the reap sentence present, close (the mechanism-level evidence bar is met and the honesty gap is closed). If it burns 45 min a fourth time despite the watchdog, re-scope this ticket to the WHY — and note the reap event now also timestamps who slept, so a live specimen becomes self-dating. Nothing here is a security-posture, credential, trust-accept, destruction or non-routine-spend one-way door; it is a live-observation residue only Ben's drive programme can produce.
Retraction (race correction) — ignore my previous comment above.
A concurrent session-runner (same
matou-build-agentaccount) had already drained and correctly closed this ticket at 01:37:42Z — its close-report observed the first live reap in drive20260830T002134Z, found the reap fired prematurely (symlink flips mid-switch →clan-switch-*lock still held →deploylock collision → RED), and confirmed #1009 (62475278) had already landed the fix (gate completion on the switch unit being gone). That is the authoritative resolution and it stands.My session picked this ticket up on a stale
openread (before the 01:37:42Z close), then posted aready-for-humanrouting comment and re-labelledready-for-humanat 01:39:42Z — both are wrong: the ticket is done and closed, not pinned on a pending observation. I have restored the label set the closing session left and am NOT reopening. Apologies for the tracker noise. Nothing in my racing edit changed code, state, or the close.