provision: deploy writes a phantom clan-core inventory module — wire the service live-set orchestrator to the real Attach* renders #351
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.
Dependencies
No dependencies set.
Reference
Matou/idss#351
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?
Problem
The P4 provisioning journey completes end to end in the UI — Assess → Select → Review impact → Deploy → Active — but the ticked service never actually runs. The deploy path and the real per-service NixOS renders are two disconnected paths:
internal/provision/deploy.go:214calls the genericConfig().AttachService, which atinternal/clan/config.go:84writes an inventory instanceinvModule{Name: s.Service, Input: "clan-core"}— i.e. provisioningfilesdeclares a clan-core module literally named"files", which does not exist.internal/clan/files.goRenderFiles(FilesConfig)emitsfiles.nix(services.nextcloud, local Postgres, admin + DB secrets on clan-var paths,nextcloud-brandtheming oneshot), applied by(*Adapter).AttachFilesininternal/clan/files_attach.go— butAttachFiles/FilesLiveSethave zero production callers (only their own tests).AttachGatewaycall isinternal/clan/enrollment.go:265, with an empty live set — its own comment says the enrollment path assembles no service live set yet and composes the baseline alone.STATUS.md(§ the gateway composition, ~line 404) names this as the open frontier:What to build
The service live-set orchestrator: when provisioning deploys (and when enrollment re-composes the gateway), assemble the live set from the running fleet — which node holds which role/services, the community apex, and the secret paths the
Attach*configs need — and drive the realAttach*renders instead of (or beneath) the phantomclan-coreinventory write.filesonto a helper node must callAttachFileswith aFilesConfigderived from the fleet (host, apex, secret paths), so the deployed machine actually getsservices.nextcloud.GatewayLiveSet(internal/clan/gateway_attach.go:54-66: FrontDoor, AcmeDNS, Code, Mail) must be assembled from what is actually placed, not passed empty.control-plane/cmd/control-plane/servicehealth.go:401nextcloudHealthCheck(/status.php) is already registered whendeps.nextcloudURLderives (whole_composition.go:61-64), so P4-S4's health gate should go green for real.invModule{Input: "clan-core"}write for catalogue services that ship their own render — a deploy that "succeeds" while declaring a nonexistent module is a silent lie.Acceptance
fileson a helper produces a machine config containing the renderedfiles.nix, with secrets on the declared clan-var paths — proven by tests at the adapter seam.enrollment.go:265comment's placeholder is retired).STATUS.md~line 1810) becomes runnable; running it is a separate live-drive leg, not this ticket's gate.Out of scope
Whether the gateway may co-host catalogue services (Nextcloud-on-gateway) is the sibling design ticket — this ticket wires the existing helper-role path. Landing this first is what makes any colocation ruling actionable.
(Sibling design ticket: #352.)
Helper-role half landed and pushed (origin/main
e4c7970), and a scope decision on the remaining half needs a human.What landed (AC1, AC3, AC4-enabling)
The service live-set orchestrator's helper-role path: the P4 deploy now drives the REAL
AttachFilesrender for thefilesservice instead of the phantominvModule{Input:"clan-core"}inventory write.internal/clan:AttachFilesjoins theClaninterface;FilesSlugexported; deploy-time live-set conventions (NextcloudAdminUser,NextcloudAdminPassPath,NextcloudDBPassPath) get one home beside the render; the clan-testingFakerecords AttachFiles and refuses an apex-less placement (ADR 0113).internal/provision:Orchestrator.attachCatalogueServiceroutes a self-rendering service (files) toAttachFiles, assembling the live set from the fleet (node + community apex + clan-var secret paths); a renderless service still lands as a declarative inventory placement. Both deploy paths (deployServicesOnly,deployTakeover) use it. NewWithCommunityApexoption, wired fromdeps.apexinwhole_composition.go.A files deploy with no apex is refused, never fabricated.
AC1 — P4 files deploy produces a machine config with the rendered
files.nix+ secrets on the declared clan-var paths ✅ (seam-tested:deploy_test.goroutes to AttachFiles with the fleet-derived live set;files_attach_test.goproves the render).AC3 — no deploy path writes an inventory module name with no corresponding module ✅ (proven: the deploy asserts no
attach-service filesinventory write; a no-apex deploy does not fall back to the phantom write).AC4 — the deferred clan-lab
assign-files → deploy → health-passsmoke is now runnable (the wiring half); running it is the separate live-drive leg.go build/vet/test+ gofmt + golangci-lint green. (The commit also cleared pre-existing whole-repo gate lint/gofmt debt — DDR 0145idpbrandCss→CSS, a fleetwire test param, afrontdoor_attach.goalignment — the #142/#198 'never leave the gate wedged' precedent.)What remains (AC2) — the decision
The GATEWAY half: assembling the real
GatewayLiveSet(front-door/acme-dns/code/mail) from what is placed and passing it toAttachGateway, soenrollment.go:265's baseline-only placeholder retires. This is blocked on inputs the enrollment seam does not carry — the apex, mesh targets, IDP host, delegated zone and secret files are absent fromEnrollRequest/GatewayFacts(theGatewayFactsdoc itself notes 'Task 9 fills it from founding') — and it overlaps the gateway-colocation ruling (sibling #352). No production code assembles aFrontDoorLiveSettoday (only tests do). So AC2 is a separate, larger slice that first needs the founding→enrollment seam threaded.Decision needed: (A) close #351 — the helper-role path was the stated deliverable ('this ticket wires the existing helper-role path') — and split AC2 (gateway live-set assembly) into its own follow-up; or (B) keep #351 open until the gateway half also lands. Asked in chat; no reply within the window, so routing to
ready-for-human. A maintainer: pick A (and I'll happily take the follow-up) or B (re-addready-for-agentonce the enrollment-seam inputs are available).Ben's ruling: option A. The helper-role path was this ticket's stated deliverable and it is landed, pushed (
e4c7970) and seam-proven — closing. AC2 (gateway live-set assembly + the founding→enrollment seam threading it needs) is split out as #354 (ready-for-agent). #352's dependency edge is re-pointed from this ticket to #354 so the headroom gate still cannot land before the gateway assembly exists.