deploy-takeover: app tail's descriptor probe burns 10-min budget awaiting community.aid #1700
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.
Blocks
Reference
Matou/idss#1700
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?
Not the known frontier
This red is not the documented pairing/own-VPS-carrier frontier.
artifacts/legs.jsonrecordspairas green (5061 ms) andverdict.jsonreports"skip": 0— the drive's own records carry no skip reasons at all, so nothing here is marked out of scope. The failing leg isdeploy-takeover, leg 8 of 12.The failure
artifacts/legs/deploy-takeover.pngshows the app frozen on a non-terminal card: "Standing up the gateway… Bringing up the control plane over the established connection." (app/src/i18n/founding/g1.en.ts:37). No terminaldata-statusever rendered, so Playwright burned the full 25-minuteCEILING.deployTakeover.What actually happened (live box, still up)
The deploy succeeded.
systemctl --failedis empty; control-plane, caddy, keria, netbird and the five anysync containers are running. The deploy got well past seeding:19:48:31—clan-switch-gateway-da9cc55e.serviceran.switch-to-conf(activation)19:48:32.746—state/founding-state.jsonpersisted"activated": true(deploy.go:568)19:48:33— config repo's final commit:a9721e0 idss: record community apex (rehearsal-f.idss.nz)=WriteCommunityApex, deploy.go:694Then founding entered
runCommunityAppTail(deploy.go:795) — this drive is the app-at-founding variant (HEAD4d906f1d), so the tail acts. Caddy's access log shows the helper polling from the executor every 5 s, 81 times, 19:48:35 → 19:55:21, right up to the timeout:That is
probeDescriptorLive(internal/founding/communityapptail.go:291) atdoorProbeDefaultAttempts = 120×doorProbeDefaultDelay = 5s(deploy.go:1237-38) = a 10-minute budget. It requires bothversionandcommunity.aid. The descriptor served is missingcommunity.aidentirely:Root cause — an ordering defect
community.aidcan only appear once the control plane's descriptor writer is live, and that writer rests:The unit's start script gates the var on a directory that does not exist yet:
And that is by design at this point in the sequence:
docs/vm-full-install-divergence.md:86records/srv/idss/config[.git]as created by the "supply, finish" legs — the bare-init/push/checkout runs in the finish leg, which comes afterdeploy-takeover.So the community-app tail's descriptor probe is sequenced inside
runDeploy, at a point where its precondition (gateway carries its config repo → descriptor writer live →community.aidpublished) cannot yet be true. It is guaranteed to exhaust all 120 attempts on every IDIP app-at-founding run. Here the deploy reached the tail at 19:48:35, so the 10-minute budget would not have expired until ~19:58:35 — over three minutes past the leg's 19:55:20 ceiling. This also contradicts the tail's own stated contract (communityapptail.go / deploy.go:786-794): "STRICTLY non-fatal … founding never waits on the build (DDR 0228 §3)" — it does wait, for ten minutes.Second, independent defect — nil-deref panic on the resting routes
The same nil config repo crashes two live HTTP routes. At
19:48:34the control plane panicked twice:productionConfigRepo(main.go:208-213) returns(nil, nil)and documents "the config-repo-backed ports … rest at their honest founding state (ADR 0100)". Butmain.go:2163member.NewConfigRepoAppOnly(repo)andmain.go:2229communityapp.NewConfigRepoStore(repo)are built unconditionally over the nil repo and their routes registered live; theif repo != nilguard atmain.go:2234covers only the poller/resubmitter. First call → nil-receiver(*ConfigRepo).Dir()→ panic, dropped connection instead of the intended resting response. Verified on the box:IDSS_CONFIG_REPOis absent from PID 4486's/proc/.../environ.Suspected layer
Product, both defects —
internal/founding(tail sequencing) andcontrol-plane/cmd/control-plane/main.go(unguarded registration). Not harness, not infra: the droplet deployed cleanly and both public doors answered 200 over TLS throughout.What plugging it needs
repo != nil, mirroring the descriptor writer's existingelse { log.Info("… resting …") }pattern, and have the routes answer awriteProblem503 "resting" rather than nil-deref. Alternatively make(*ConfigRepo).Dir()/RepoDoc.Load()nil-safe. Red-first test: register with a nil repo, GET both paths, assert 503 not panic.failed/pendingon the app record per ADR 0100); or moverunCommunityAppTailto the finish leg, after/srv/idss/configlands; or give the tail its own short budget independent ofdoorProbeDefaultAttempts. Which of the three is right is a design call — DDR 0228 §3 says founding never waits on the build, which argues for skip-or-defer, but the placement comment at deploy.go:786-794 deliberately puts it after the door gate. Worth a ruling before the swarm picks.Lower-severity finding (not the blocker)
299 failed reverse-forward binds, every ~2.8 s from
19:41:24to19:55:23, each opening and closing a root SSH session:/run/idssdoes not exist post-takeover and nothing on the NixOS gateway creates it (noidss-agentunit or binary, no tmpfiles rule,RuntimeDirectory=empty).internal/fleetwire/relay.go:27assumes "the box's /run/idss socket dir does not exist until the agent installs" and supervises unboundedly — but on the self-hosted full-install path the takeover wipes the Ubuntu agent, so the directory can never appear. The forwarder should be stopped at the activation boundary, or bounded with a surfaced fault. This is background noise here (the supervisor runs in its own goroutine and the deploy demonstrably progressed past it), not the cause of the red.Absent from the run directory
legs.json; the own-VPS carrier frontier is named in no artifact this drive produced.finish-hand-offorfounded— the run stopped at leg 8 of 12.logs/broker-journal.txtharvested nothing:dev@100.98.48.68: Permission denied (publickey)— off-mesh executor, by design (ADR 0208, #681); the verdict does not depend on it.logs/guest-*.logare 129-byte stubs andlogs/qemu.logreportsspawn qemu-system-x86_64 ENOENT— the VM path is unused on this self-hosted droplet drive, so those are expected empties, not harvest failures.legs/deploy-takeover.pnganderror-context.md.drive
20260921T192808Zred atdeploy-takeover:expect(locator).toBeVisible() failed Locator: locator('[data-status="deploy-live"]').or(locator('[data-status="hand-off"]')).or(locator('[data-status="deploy-failed"]')).first() Expected: visible Timeevidence:
/home/swarm/session-runner/idss/test-results/drive-idip/20260921T192808Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=bens-mac-04 run=29500
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The panic (defect 1) needed no ruling and is fixed. Defect 2 — the ceiling overrun — the issue flagged as a design call between three options: skip, defer the tail to the finish leg, or give the tail its own short budget. I ruled option 3 (own short, independent budget).
The ruling: the tail's outside-in descriptor probe now uses its OWN budget (
descriptorProbeDefaultAttempts = 12, ~1 min atdoorDelay) instead of borrowing the door probe'sdoorAttempts(~10 min, sized for acme-dns registration + LE wildcard issuance). On the app-at-founding path the descriptor'scommunity.aidcannot appear until the gateway carries its config repo, which the finish leg lands after this deploy-takeover tail runs — so no budget makes the probe pass here; a short one merely stops it burning the whole ten minutes and blocking the deploy past the leg ceiling. This honours DDR 0228 §3 ("founding never waits on the build") and respects the deliberate placement comment atdeploy.go:786-794(the tail stays after the door gate).Why it is a two-way door: revertible by a later commit (a constant + one field) and provable by a seam test —
TestTail_DescriptorProbeBoundedByOwnBudgetNotDoorBudgetasserts the tail re-probes exactly its own budget (3), not the door's (120). Not on the one-way-door list (no credentials, no security widening, no trust accept, no data destruction, no spend).The deeper call I did NOT make (left for #1522's re-drive): whether the app-at-founding path should instead defer the tail to run after the config repo lands, so the probe actually passes and the card reaches
pendingat hand-off (what #1522'sapp-pending-at-handoffleg asserts). That is option 2 — the architecturally "right" fix — but it moves a founding-pipeline stage across all carriers and I cannot prove it end-to-end without a live drive (the config-repo checkout, the control-plane restart to pick upIDSS_CONFIG_REPO, and the community-identity record must all be in place by then). With option 3 in place, #1700's red (deploy-takeover burning its ceiling) is cleared and the panic is gone; if the subsequentapp-pending-at-handoffleg then reds because the card isfailednotpending, that is the defer decision surfacing on #1522, where a session with a live drive can rule and prove it.Also still open (lower severity, not this red): the reverse-forward relay supervisor binding
/run/idss/enroll-relay.sockunboundedly post-takeover (internal/fleetwire/relay.go:27) — background noise here, worth its own ticket.close-report for #1700 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope