services-row: S11's services apply runs clan machines update on a revision declaring ungenerated Nextcloud vars — ADR 0126's unsandboxed pre-generate never runs, so Files never stands up #1496
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.
Reference
Matou/idss#1496
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
20260915T155605Z(rented-services), leg services-row, red at 19 green / 1 red:The community itself came up live (control plane, brand, admin, both public front doors over TLS). Only the placed Files & documents service failed, exactly as
internal/founding/services.go:242-245words aprovisioned && applyFailedrow.What actually happened
S11 provisioned and committed the files module, then applied that revision — and the apply died in seconds without ever reaching the box.
1. The services commit landed.
state/clan-config(harvested config repo), commits all at2026-09-15 16:07:07:2. That new
files.nixdeclares two brand-new clan-vars generators.git show e636e9b:machines/gateway/files.nix:Neither existed at the enroll-configure revision, so the enrollment's
vars generateat 16:00:4x never covered them.3. Neither generator was ever generated.
git ls-files | grep ^vars/on the harvested repo listsgate-oidc,idss-claim-secret,idss-community-ca-*,kanidm-*,netbird-*,state-version— and nonextcloud-admin, nonextcloud-db.4. The apply died before any build or switch.
logs/founding-state.log→standup.deploy.log:logs/droplet-journal.txtcorroborates: the last on-box switch isclan-switch-gateway-ad7e4909at 16:07:05→16:07:07 (the control-plane apply, before the services commits). After 16:07:07 there is no furtherswitching to system configurationline at all, and every switch in the run targets the SAME store path/nix/store/qrhaj78fzqbdphdwv9izlh1wmq11w8qb-nixos-system-gateway-…— i.e. no system carrying Nextcloud was ever built.logs/droplet-units.txtconfirms the box end state:Unit phpfpm-nextcloud.service could not be found,systemctl --failedempty. The deploy-complete milestone is stamped16:07:30.910, so the whole services apply took ~20s — far too fast to have built a Nextcloud closure.The defect
internal/founding/services.go:198-204goes straight from the provision commit to the apply:applyControlPlane(internal/founding/deploy.go:807) →clan.Deploy→deploy.updateNode(internal/clan/adapter.go:626-648), whose only invocation is:There is no
vars generateanywhere on the deploy path. But that is precisely what ADR 0126 forbids relying on —internal/clan/enrollment.go:22-31(package doc) and:1098-1107:So the enrollment leg runs
clan vars generate <node> --flake <flake> --no-sandboxahead of every update (internal/clan/enrollment.go:1150). The S11 services apply — which is the first apply after new module-declared generators appear — does not, and the drive host haskernel.apparmor_restrict_unprivileged_userns=1(Ubuntu 24.04), exactly the ADR 0126 condition. Every observable matches: fast death, no vars committed, no build, no switch, and an error text matching none ofclassify()'s cases so it lands in theFailUnknowndefault.This is not founding-only:
internal/provision/deploy.go:693(applyRevision, the P4 control-panel path) has the same gap, so "add Files from the control panel" — the remedy the failed row offers the operator — should hit the same wall.A second, compounding defect: the cause was thrown away
internal/founding/services.go:200-203discards BOTH the returned*clan.Failure(itsSummary,Detaillog excerpt andTail) andaerr, logging only a generic sentence. The sibling branch six lines up (services.go:190) carrieserr.Error(), so this is an inconsistency, not a policy. The consequence is that the run directory contains no copy of clan's actual output — I grepped the whole of20260915T155605Z/and the only trace of the apply is"the operation failed". The root cause above had to be re-derived from the config-repo tree and the box journal rather than read. Carry the failure'sSummary/Detailinto the S11 log line the way the commit-error branch already does.Suspected layer
The deploy seam (
internal/clan) and its two callers (internal/founding/services.go,internal/provision/deploy.go).Why this needs a ruling (refusal rule 3)
The fix is a missing unsandboxed pre-generate step, but where it belongs is a design decision, not a mechanical repair:
deploy.updateNodefixes founding and P4 in one place, but changes the shared deploy hot path for every apply in the system.clan.Vars.Generate(internal/clan/vars.go:81) cannot be reused as-is: it iteratesm.Varsfrom the.idsssidecar inventory (generators registered viaSetVarSpec), so it structurally cannot see generators declared inside a nix module likefiles.nix. A node-wide generate is what is actually needed — andvars.go:73-76documents node-wide as deliberately avoided because it "would run undeclared prompting generators". Squaring that is a ruling.generate()as a seam method touches theclan.Claninterface (internal/clan/clan.go), the adapter,internal/clan/testing/fake.goand the call site(s) — over the healer's 3-file cap either way.I refused rather than take the fast lane because I cannot write a test here that proves the fix: the failure only reproduces against the real pinned clan CLI on a sandbox-restricted host, i.e. a paid re-drive. The diagnosis above is derived entirely from harvested artifacts and repo source, both cited.
drive
20260915T155605Zred atservices-row:the founding's own S11 row says Files did not stand up — the files row is failed: the deploy did not hold — add Files & documents from the control panelevidence:
/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260915T155605Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled by agent under ADR 0174 — veto anytime. The design ruling the ticket asked for, and the fix, are landed and proven at the seam level. Commit
47c3fcfd.The ruling (the "why this needs a ruling" questions)
clan.GenerateNodeVars(node) (Commit, error)— node-wide,--no-sandbox, through the single writer, returning the post-generate tip — invoked by the deploy callers before the apply. This is enrollment's openingvars generate(ADR 0126,enrollment.go) lifted to a standalone step, so the ADR-0126 discipline lives in ONE place the steady-state callers reuse rather than being re-implemented at each site.deploy.updateNode: the apply pins an EXACT revision (ADR 0102). A pre-generate commits vars as a NEW commit, so the apply must ride the POST-generate tip — a?rev=pinned at the pre-generate revision git-archives a tree with none of the freshly-sealed ciphertext. The callers own the revision they pin, so they own the seal→advance→apply;deploy.Runstays pure (and rollback, which must go BACKWARD, is untouched).Vars.Generate: confirmed it structurally cannot see a generator declared inside a nix module — it iterates the.idsssidecar inventory. Node-wide is what is actually needed, and it is exactly what enrollment already does; the "node-wide runs undeclared prompting generators" note is enrollment's own accepted posture (pre-fed answers), and here the new generators are non-promptingopenssl rand.What landed
internal/clan/clan.go—GenerateNodeVarson theClanseam;internal/clan/vars.go— the*Adapterimpl (mirrors enrollment's argv exactly);internal/clan/testing/fake.go— the fake +GeneratedNodeVars()accessor +GenerateNodeVarsFailshook.internal/founding/services.go), P4 add-from-panel (internal/provision/deploy.go), and the full-install takeover (internal/provision/takeover.go) — the last two via a sharedprovision.sealApplyNodeVarsthat advancesrun.Revisionto the sealed tip.*clan.Failure— it carries the seam's classifiedSummary/Detailinto the log line (servicesApplyFailureLines), so a future failed apply is READ, not re-derived from the config tree + box journal.STATUS.mdheader entry;GOTCHAS.md#234.Proof (revertible + provable — ADR 0174 rule 1)
Red→green seam tests, driving the fake clan CLI:
founding.TestStory_S11SealsGatewayVarsBeforeApplyingServices— S11 seals the gateway's vars before the apply and pins the sealed tip (was: never sealed).provision.TestDeploy_GatewayFilesSealsVarsUnsandboxedBeforeApply— the P4 gateway-files co-host (the exact "add Files from the control panel" remedy) seals unsandboxed BEFOREclan.Deployand pins the sealed tip.go test ./...+go veton touched packages clean; host gofmt gate passed on push.The one-way residue: live green
The failure only reproduces against the real pinned clan CLI on a sandbox-restricted host (Ubuntu 24.04,
apparmor_restrict_unprivileged_userns=1) — a paid drive, which a one-shot session does not run (ADR 0174 rule 7). The live green rides the nextrented-servicesdrive (#1491's rehearsal-executor frontier); the code change is proven to do exactly what ADR 0126 requires at the seam. Closing on that basis — the ticket asked for the ruling + fix, both complete; if the re-drive surprises, re-open.deploy.targetHost#1497