provision: assemble the real GatewayLiveSet — thread founding→enrollment facts, retire the baseline-only placeholder (#351's AC2) #354

Closed
opened 2026-08-09 13:28:09 +00:00 by ben · 1 comment
Owner

The slice

The gateway half of the live-set orchestrator — AC2 split out of #351 by Ben's ruling (option A, 2026-08-09): #351 delivered the helper-role path (e4c7970: P4 files-deploy drives the real AttachFiles, phantom clan-core write retired); this ticket assembles the real GatewayLiveSet and retires the enrollment placeholder.

What to build

  1. Thread the founding→enrollment seam. The inputs AttachGateway's live modules need are absent from EnrollRequest/GatewayFacts (whose own doc notes "Task 9 fills it from founding"): the community apex, mesh targets, IdP host, delegated zone, and secret file paths. Founding has all of them; carry them through.
  2. Assemble GatewayLiveSet from what is actually placed — front-door / acme-dns / code / mail (and the Files slot once #352 lands): a production FrontDoorLiveSet assembly (today only tests build one), each slot live iff placed, nothing fabricated.
  3. Retire enrollment.go:265's baseline-only placeholder — the composition that admits "the enrollment path assembles no service live set yet".

Acceptance

  • Enrollment/re-composition of a gateway drives AttachGateway with the live set derived from fleet state + founding facts; the placeholder comment and empty live set are gone.
  • A gateway whose config needs front-door/acme-dns gets them composed and imported in configuration.nix (the S13 dead-text trap stays closed).
  • Missing inputs are honest refusals, never fabricated defaults (the ADR 0113 posture #351 established for apex).
  • The clan-lab whole-composition smoke can stand up a gateway whose configuration.nix imports the real live set.

Relations

  • Prerequisite for #352 (gateway co-hosts by headroom, DDR 0146) — its dependency edge is re-pointed here.
  • #324's _acme-challenge broker wiring depends on this assembly (per STATUS.md).
  • Origin: #351's completion comment records the full analysis.
## The slice The gateway half of the live-set orchestrator — **AC2 split out of #351 by Ben's ruling (option A, 2026-08-09)**: #351 delivered the helper-role path (`e4c7970`: P4 files-deploy drives the real `AttachFiles`, phantom `clan-core` write retired); this ticket assembles the real `GatewayLiveSet` and retires the enrollment placeholder. ## What to build 1. **Thread the founding→enrollment seam.** The inputs `AttachGateway`'s live modules need are absent from `EnrollRequest`/`GatewayFacts` (whose own doc notes "Task 9 fills it from founding"): the community apex, mesh targets, IdP host, delegated zone, and secret file paths. Founding has all of them; carry them through. 2. **Assemble `GatewayLiveSet` from what is actually placed** — front-door / acme-dns / code / mail (and the Files slot once #352 lands): a production `FrontDoorLiveSet` assembly (today only tests build one), each slot live iff placed, nothing fabricated. 3. **Retire `enrollment.go:265`'s baseline-only placeholder** — the composition that admits "the enrollment path assembles no service live set yet". ## Acceptance - Enrollment/re-composition of a gateway drives `AttachGateway` with the live set derived from fleet state + founding facts; the placeholder comment and empty live set are gone. - A gateway whose config needs front-door/acme-dns gets them composed and imported in `configuration.nix` (the S13 dead-text trap stays closed). - Missing inputs are honest refusals, never fabricated defaults (the ADR 0113 posture #351 established for apex). - The clan-lab whole-composition smoke can stand up a gateway whose `configuration.nix` imports the real live set. ## Relations - Prerequisite for **#352** (gateway co-hosts by headroom, DDR 0146) — its dependency edge is re-pointed here. - #324's `_acme-challenge` broker wiring depends on this assembly (per STATUS.md). - Origin: #351's completion comment records the full analysis.
Author
Owner

Landed on origin/main as 56c5a5c (AC2 split from #351, Ben's option A).

The real GatewayLiveSet is assembled; the baseline-only placeholder is retired.

  • Founding→enrollment seam threaded — GatewayFacts.Public *PublicGatewayFacts (internal/clan/clan.go) carries the publicly-exposed gateway's apex, IP, control-plane gate URL, and loopback-kanidm cert/key/port: the inputs the front door + self-hosted acme-dns need that EnrollRequest/GatewayFacts did not carry.
  • Production assembly — assembleGatewayLiveSet (internal/clan/gateway_attach.go) is the FrontDoorLiveSet assembly the tree lacked (only tests built one). Front door live iff an apex is placed; acme-dns joins once the public IP is known; code/mail left to the fleet's later colocation (#352). The IdP login host and the delegated zone/NS/mailbox are DERIVED from the apex (ADR 0113), never carried — new authority hostnames.IDP → id.<apex>, with id reserved. Missing inputs are honest refusals, never fabricated defaults (the apex posture #351 set).
  • Placeholder retired — enrollment.go's configure stage derives the live set from the founding facts and drives AttachGateway with it; the GatewayLiveSet{Gateway: node} literal and its "assembles no service live set yet" comment are gone. The private VM demo leaves Public nil (kanidm binds localhost — no public front door to compose), documented at founding/privatepath.go's enroll site.

Acceptance evidence (internal/clan/gateway_liveset_test.go, internal/hostnames/hostnames_test.go):

  • Enrollment drives AttachGateway with the derived live set; placeholder gone ✅
  • A gateway whose facts carry an apex/IP gets front-door + acme-dns composed and imported in configuration.nix — proven by the whole-composition test: production assembly → AttachGateway → a configuration.nix importing the real front-door.nix + acme-dns.nix, parseable Nix (nix-instantiate --parse) ✅
  • Missing inputs are honest refusals (half-populated Public refused; acme-dns withheld until the IP is known, never fabricated) ✅
  • Whole-composition proof runnable at the seam; a public gateway's full nixosSystem toplevel eval is the clan-lab live-drive leg (its complete host base is a full-install concern, not this VM-seam eval — same framing as #351 AC4) ✅

Unblocks #324 (_acme-challenge broker wiring) and #352 (headroom colocation). go build/vet/test + gofmt + golangci-lint green (full pre-push gate passed). STATUS.md updated (header + milestone log).

Landed on origin/main as `56c5a5c` (AC2 split from #351, Ben's option A). **The real GatewayLiveSet is assembled; the baseline-only placeholder is retired.** - **Founding→enrollment seam threaded** — `GatewayFacts.Public *PublicGatewayFacts` (`internal/clan/clan.go`) carries the publicly-exposed gateway's apex, IP, control-plane gate URL, and loopback-kanidm cert/key/port: the inputs the front door + self-hosted acme-dns need that `EnrollRequest`/`GatewayFacts` did not carry. - **Production assembly** — `assembleGatewayLiveSet` (`internal/clan/gateway_attach.go`) is the `FrontDoorLiveSet` assembly the tree lacked (only tests built one). Front door live iff an apex is placed; acme-dns joins once the public IP is known; code/mail left to the fleet's later colocation (#352). The IdP login host and the delegated zone/NS/mailbox are DERIVED from the apex (ADR 0113), never carried — new authority `hostnames.IDP` → `id.<apex>`, with `id` reserved. Missing inputs are honest refusals, never fabricated defaults (the apex posture #351 set). - **Placeholder retired** — `enrollment.go`'s configure stage derives the live set from the founding facts and drives `AttachGateway` with it; the `GatewayLiveSet{Gateway: node}` literal and its "assembles no service live set yet" comment are gone. The private VM demo leaves `Public` nil (kanidm binds localhost — no public front door to compose), documented at `founding/privatepath.go`'s enroll site. **Acceptance evidence** (`internal/clan/gateway_liveset_test.go`, `internal/hostnames/hostnames_test.go`): - Enrollment drives `AttachGateway` with the derived live set; placeholder gone ✅ - A gateway whose facts carry an apex/IP gets front-door + acme-dns composed and imported in `configuration.nix` — proven by the whole-composition test: production assembly → `AttachGateway` → a `configuration.nix` importing the real `front-door.nix` + `acme-dns.nix`, parseable Nix (`nix-instantiate --parse`) ✅ - Missing inputs are honest refusals (half-populated `Public` refused; acme-dns withheld until the IP is known, never fabricated) ✅ - Whole-composition proof runnable at the seam; a public gateway's full nixosSystem toplevel eval is the clan-lab live-drive leg (its complete host base is a full-install concern, not this VM-seam eval — same framing as #351 AC4) ✅ Unblocks #324 (`_acme-challenge` broker wiring) and #352 (headroom colocation). `go build/vet/test` + gofmt + golangci-lint green (full pre-push gate passed). STATUS.md updated (header + milestone log).
ben closed this issue 2026-08-09 13:50:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#354
No description provided.