enroll-configure: config_eval reds on a loose git object that vanished mid-eval #924
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#924
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?
The failure
Drive
20260828T051317Z, targetdevice, commitbd9796b5.artifacts/verdict.json:Eight legs green (
wizard-rent→claim→create→image-boot→connect→point-row→seed→supply). The two reds areenroll-configureand its wrapperstanding, carrying the same fault verbatim inartifacts/legs.json:This is not the KNOWN frontier.
legs.jsonrecords"skip": 0and carries no skip reasons at all, so nothing in this drive's own records names anything as out of scope. The own-VPS pairing carrier never came into play either — this is the RENTED path, andlogs/founding-state.logshows the pairing stage passing by design:The drive died two stages later, founding the gateway. Device-add never ran.
The evidence lines
logs/founding-state.log, the last threeenroll-configureevents in order:The commit into the config repo succeeded, and the very next clan step failed reading a file out of that same repo's
.git/objects/. Two things follow from the path alone: the thing nix could not find is a loose git object file, not a nix expression or a store path — so this is git plumbing, not a config defect; and nix was reading the repo's.gitdirectory at all, which only happens if the flake ref handed to it ingests the working directory wholesale (path:<dir>) rather than the git tree (git+file://<dir>).A loose object referenced by the just-written commit disappearing between the commit and the read is the signature of a concurrent
git repackcollapsing loose objects into a pack underneath a reader.The eval target is the shared standing-rented state dir, not this run's:
test-results/standing-rented/state/clan-config. This run's ownstate/is empty, andlogs/state-logs.logreads:Suspected layer
Product — the clan seam in the operator app (
internal/clan), aggravated by shared cross-drive state on the harness side. The failure is a race between clan's own git writes/housekeeping in the config repo and nix's ingest of that same directory; nothing about the node's configuration is wrong.This drive's in-run healer (
logs/healer-claude.out) reached the same conclusion and recorded verifications it ran on the live host. I quote these as its claims, not as facts I re-checked:I could not re-run any of it. This session is sandboxed to the run directory:
test-results/standing-rented/state/clan-configand theinternal/clansources are both unreadable from here, so the healer's line references, the repack timing, and thepath:prefetch result are all unverified by me. They should be re-checked by whoever picks this up.One detail worth a second look when someone does have the sources: nix prints the path with a doubled leading slash —
path '//home/swarm/…'— consistent with a ref built by concatenating a scheme onto an already-absolute path.What plugging it needs
A human ruling first, because the candidate fixes are not interchangeable and each has a cost:
.gitto nix — swap thepath:<dir>ref forgit+file://<dir>. Excludes.gitfrom the ingest and kills the race at the root, but changes untracked-file visibility, which matters because clan writes files and commits them mid-run. Must be proven against a real clan run, and touches every call site that builds this ref.<repo>/.git/objects/**; a baredoes not existmatch would retry genuine config errors, which print the same shape, and that would trade a loud red for a silent spin.gc.auto=0/maintenance.auto=falsewhere the config repo is created is cheap belt-and-braces but unproven on its own.Preserve the evidence before re-driving. The repo this red is about survives only at the shared path
test-results/standing-rented/state/clan-config; atrial-resetor the next drive destroys the only copy.Also in this run (separate, and concrete)
logs/gateway-do-forensics.txt:"tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did", droplet595802091status: active— but the harness's own harvest could not authenticate to it. All four gateway files are one line:"root@209.38.87.90: Permission denied (publickey,keyboard-interactive)."(gateway-journal.txt,gateway-caddy.txt,gateway-stall.txt,gateway-units.txt). So this red carries zero gateway-side evidence. The healer traces this to the evidence harvester dialling with no identity while the rented gateway trusts only the app's per-run key atstate/rent-operator/id_ed25519— a small, self-contained fix, unlike the main fault.artifacts/journey.jsonis{"rows": null, "fault": null}— no founding rows captured, despite the fault being fully recorded inlegs.jsonandfounding-state.log.logs/droplet-journal.txtdoes not exist in this drive under that name. The equivalents present aredevice-journal.txt(the added device,134.199.151.161, healthy: sshd listening, no failed units) and the emptygateway-journal.txtabove.logs/broker-journal.txtis also a permission-denied stub, which #681 says is by design off-mesh.25304f657c24) as having redded three consecutive drives, with two prior self-fixes landing on evidence-harvest surfaces rather than on this fault.drive
20260828T051317Zred atenroll-configure:journey leg "enroll-configure" went red: founding: stand up the rented server: clan: config_eval on gateway: the node's config does not evaluate: error: error: path '//home/swarm/swarm/Matou/idss/testevidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T051317Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedClose report — ADR 0174 ruling (veto anytime)
This was a duplicate. While this session was diagnosing, the swarm's #923 landed a fix for the same bug (same drive
20260828T051317Z, same sig25304f657c24) and is already closed onmain. I hit it as a rebase conflict oninternal/clan/configrepo.go, reconciled cleanly, and kept only the piece #923 was missing.The diagnosis (confirmed against sources the failing session couldn't read)
The failing session was sandboxed away from
internal/clan; this standing session read it. The fault is a git-auto-maintenance race on the config repo, exactly as the ticket's "suspected layer" reasoned:internal/clan/configrepo.go:ensureStoregit inited the repo with git's background housekeeping on.clan vars generatereads the working tree via apath:<dir>flake ref (flakeRef(dir, ""),adapter.go:778) — which copies the whole.git/objects/**into the nix store.vars generatetriggers git's post-commandrun_auto_maintenance, which repacks the loose objects out from under that concurrent copy → nix dies reading…/.git/objects/17/177ffd… does not exist.vars generate(not the eval preflight) is correct and now explained by code:evalReadiness(adapter.go:657) retries any non-zero eval up to 3× (#461/#542), so the eval preflight survives this race; the fault only ever lands at the no-retrypath:sites (vars generate,flake archive,flake lock). That the drive did not recover is itself the proof it wasn't the preflight.path '//home/…') is consistent with thepath:copy of the live.git(clan-cli's own re-emitted ingest path), not load-bearing for the fix.What landed (
f618a6ce)#923 fixed it two ways: (1) a bounded settle-retry on
generatescoped to the.git/objects/**signature (isTransientGitRepack), and (2) a gc pin applied only on freshgit init.The gap #924 closes: (2) never hardens the persistent
standing-rentedconfig repo — it wasgit inited long before either pin existed, so a fresh-init-only pin leaves the exact repo that redded retry-only until atrial-resetrecreates it. My change moves the pin intopinOffAutoMaintenance, called on everyensureStore(idempotentgit config --local; #923's duplicate inline block folded in), addsgc.autoDetach=false, and hardens that persistent repo in place on its next mutation, no state wipe.internal/clan/configrepo_provision_test.go—TestConfigRepo_ProvisionDisablesGitAutoMaintenance,TestConfigRepo_HardensAPreExistingUnpinnedRepo.CGO_ENABLED=0 go build ./... && go vet ./internal/clan && go test ./internal/clanall green (coexists with #923'sgenerate_repack_retry_test.go/configrepo_repack_test.go).Honest residue
test-results/standing-rented/state/clan-config. The fix is seam-proven (the pin is applied) and the mechanism is now fully explained; the retry (#923) is the load-bearing backstop and the pin is belt-and-braces. Preserve that path before the next drive/trial-reset if a live post-mortem is still wanted.artifacts/journey.jsonserialising{"rows":null,"fault":null}is now #928.595802091(209.38.87.90) was stillactiveat harvest time — a lab-spend/cleanup item outside this ticket, left to the reaper / a clan-lab sweep rather than destroyed blind from here.path:forgit+file://to drop.gitfrom the ingest at nine call sites; needs a live clan run to prove untracked-file visibility) stands as the deeper root fix.Ruled by agent under ADR 0174 — a revertible config change on an ephemeral repo, proven-set by the seam tests; veto anytime. Closing as resolved (a completion of #923).
.git— swappath:<dir>forgit+file://<dir>at the nine call sites (deeper fix behind #923) #925