enroll-configure: clan's path:<config-repo> flake ref makes nix ingest the live .git, so a mid-run repack reds vars generate (drive 20260828T051317Z, sig 25304f657c24) #923
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#923
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?
Failure
Drive
20260828T051317Z(device target) redded at legstanding/ journey rowenroll-configure:artifacts/legs.json(8 green, 2 red),artifacts/verdict.json(firstRedLeg: standing, commitbd9796b5),logs/founding-state.log(last threeenroll-configureevents).This is not a config fault. The exact revision the drive died on evaluates cleanly:
git -C <clan-config> rev-parse HEAD→ebb865a12fad630ed03cedd783237530425b772enix eval --raw "git+file://<clan-config>?rev=ebb865a…#nixosConfigurations.gateway.config.system.build.toplevel.drvPath"→/nix/store/qgvjha73pi5nff6028wkq9p12qydzfb2-nixos-system-gateway-26.11.20260612.173d0ad.drv, exit 0.git fsckclean;git cat-file -t 177ffd08eaf2d8c3628053a9f00e9605218b41e1→tree. The "missing" object is present — it is packed, not loose.Diagnosis
Three facts, each verified on this machine:
1. The failing command was
clan vars generate, not the eval preflight.preflight(internal/clan/enrollment.go:619-669) runse.generate(...)first, thenReadiness. A preflight failure renderspreflightInstruction(internal/clan/enrollment.go:1545-1551) and would have ended"…does not evaluate — fix it so the node evaluates, then re-drive"withStatusBlocked(resumable, no error returned). The captured message has no such tail and propagated as a hard fault, so it isfailureEventMessageover aClassifyresult (internal/clan/errors.go:254-260) raised bygenerateatinternal/clan/enrollment.go:787-789. That call site has no retry at all — the#461bounded retry and the#542transient-fetch hold live only onevalReadiness(internal/clan/adapter.go:658-690).2.
path:<dir>makes nix ingest the repo's live.git.generatebuilds its flake ref withflakeRef(dir, "")(internal/clan/enrollment.go:752), which returns"path:" + dir(internal/clan/adapter.go:778-783). Verified:nix flake prefetch --json path:/tmp/heal-coldproduced a store path that contains.git, with 117 loose-object fanout directories copied in. Nine call sites use this ref shape —internal/clan/vars.go:161,:229;internal/clan/enrollment.go:752,:1006,:1256;internal/clan/supply.go:55,:79;internal/clan/seedcommunity.go:109;internal/clan/store_count.go:155. So every clan invocation copies the entire git history — mutable state the same command is concurrently writing to.3. The repo was fully repacked inside that window.
.gitmtimes from the surviving state dir:git count-objects -v→count: 0, in-pack: 133. Every loose object — including17/7ffd08…— was deleted in that 48 ms window, ~30 ms after the final vars commit and inside the failing command.error: path '%s' does not existis libnixutil's POSIX read error (confirmed withstringsondeterminate-nix-util-3.22.2/lib/libnixutil.so), i.e. nix was reading the loose-object file off disk when it vanished. Nix runs here withlazy-trees = true, so the ingest reads the live directory rather than a snapshot.Suspected layer
internal/clan— the flake ref the adapter hands clan. The config repo is the single writer (ADR 0102) andpath:puts its.gitinside nix's ingest, so the repo's own git housekeeping is a hazard to any concurrent clan/nix run. The three-attempt eval retry does not cover it because the failure lands one call earlier.Open and needed before a fix: who repacked. I ruled out, by test on this box:
git+file://eval left the source repo atpacks: 0(no repack).clan-cli— its only git verbs areadd/diff --cached/commit(clan_lib/git/__init__.py:76-130)./usr/bin/git2.53 nor nix's git 2.54 repacks after commits at 183 loose objects..sample), global/system git config (onlyuser.*), scheduledgit maintenance(none registered).The artifact set (
multi-pack-index+objects/info/packs+info/refs, nocommit-graph) matchesgit repack -ad --write-midxfollowed byupdate-server-info. Nothing in this checkout, the drive checkout atbd9796b5, or the payload contains the stringrepack.What plugging it needs
A ruling on which layer takes it — these are not interchangeable:
.gitto nix.git+file://<dir>(no?rev=) excludes.gitand honours the working tree, but clan writes files and commits them mid-run (itsCLAN_NO_COMMIT/--intent-to-adddance exists for exactly this), so untracked-file visibility has to be proven against a real clan run before the swap. Touches nine call sites.generatethe transient hardening the eval preflight already has. Needs a discriminator scoped to<repo>/.git/objects/**— a baredoes not existmatch would spin on genuine config errors (a missing imported.nixprints the same shape), which is the fail-loud ruleinternal/clan/adapter.go:610-623is written to protect.gc.auto=0/maintenance.auto=falseinConfigRepo.ensureStore(internal/clan/configrepo.go:114-125) as a belt-and-braces. On its own this is unproven — no git on this box auto-repacks at this object count.Also seen in this run (separate, concrete)
The gateway-side evidence harvest cannot authenticate to a rented gateway.
logs/gateway-journal.txt,gateway-caddy.txt,gateway-stall.txt,gateway-units.txtall readroot@209.38.87.90: Permission denied (publickey,keyboard-interactive), whilelogs/gateway-do-forensics.txtproves the box was up andtcp/22: a FRESH connect succeeded.oc_droplet_evidencedials with no identity (scripts/lib/rehearsal-droplet.sh:450,:463,:477,:496,:537), but on the rented path the box only trusts the app's per-run key — the sibling harvester atscripts/lib/rehearsal-droplet.sh:980-981already knows it as$run_dir/state/rent-operator/id_ed25519. Result: this red has zero gateway-side evidence. Offline seam tests exist for this surface (scripts/tests/device-evidence-order-test.sh,scripts/tests/droplet-evidence-order-test.sh).The captured flake is not in the run dir.
logs/state-logs.logreadsERROR: no state logs directory at …/standing-rented/state/logs, and the run dir's ownstate/is empty. The repo this red is about survives only at the shared pathtest-results/standing-rented/state/clan-config— atrial-resetor the next drive destroys the only copy.Healer history
Signature
25304f657c24has now redded three consecutive drives. The two prior self-fixes (5c8f4c6e,8b34ddeb) both landed on evidence-harvest surfaces, not on this fault. Filing rather than self-fixing: no line in this checkout is mechanically wrong, the candidate fixes are semantic changes I cannot verify against a real clan run here, and the repacking agent is still unidentified.drive
20260828T051317Zred atstanding: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 captured.git— swappath:<dir>forgit+file://<dir>at the nine call sites (deeper fix behind #923) #925oc_droplet_evidencemust use the per-runrent-operator/id_ed25519(seen on drive 20260828T051317Z) #926Close-report — landed & proven at the seam (advances #923)
Ruled by agent under ADR 0174 — veto anytime. The diagnosis asked for a ruling on which layer takes the fault. Ruling:
internal/clan, via the two session-provable two-way doors (options 2 + 3); option 1 is filed as a follow-up that needs a live clan run.What landed — commit
aafba196generategains the transient-hold the eval preflight already has. A bounded settle-retry (generateRepackAttempts = 3,transientRepackRetryDelay) discriminated to nix's.git/objects/**-anchored read error (isTransientGitRepack, a regexp onpath '…/.git/objects/…' does not exist). This absorbs the fault the retry could not reach before: it landed one call site earlier thanevalReadiness's #461/#542 retry. The race settles the instant the repack finishes — the object is now packed, so nix's next readdir never lists the vanished loose file — so the re-ingest reads the stable pack. Cause-agnostic: it absorbs the race whoever repacks, which matters because the repacker is still unidentified.ConfigRepo.ensureStorepinsgc.auto=0/maintenance.auto=falseon provision, closing git's auto-repack culprit class on the ingest source.Why this is a two-way door (ADR 0174 rule 1)
internal/clan/generate_repack_retry_test.go(retry-to-success; genuine.nix-source config error takes NO hold and reds terminal at once — the fail-loud discriminator; persistent repack is BOUNDED) +internal/clan/configrepo_repack_test.go(the pin lands on provision).go build/go vet/go test ./internal/clanall green..git/objects/**, which only the ingest-vs-repack race can print — a genuine config error names a missing.nixsource or a flake input, never a packed object — sointernal/clan/adapter.go:610-623's rule is honoured (verified by theRealConfigErrorNotRetriedtest).The human residue, filed not forced
path:<dir>→git+file://<dir>at nine call sites so.gitnever enters the ingest. Left as a follow-up because it needs a live clan run to prove untracked-file visibility (clan'sCLAN_NO_COMMIT/--intent-to-adddance) — not a session-provable two-way door, exactly the residue the diagnosis flagged.Also-seen defects from this run, filed separately (session rule 1)
oc_droplet_evidence), so this red harvested zero gateway-side evidence; should use$run_dir/state/rent-operator/id_ed25519.Closing: the diagnosed fault is plugged and proven at the seam; the deeper fix and the two harness defects are tracked in #925/#926/#927.
.git— swappath:<dir>forgit+file://<dir>at the nine call sites (deeper fix behind #923) #925