founding + IDIP: services picked at founding ALL fail — the founding-time provisioner rewrites the front door as KANIDM's, and leaves the config repo un-evaluable so nothing can deploy afterwards #1701

Closed
opened 2026-09-21 20:10:54 +00:00 by ben · 3 comments
Owner

What happened

Nine services placed on the gateway at founding (files, docs-editing, calendar, document-archive, surveys, newsletters, data-collections, whakapapa, archive), identity = IDIP. Founding reached hand-off live, every service card reads NOT RUNNING / Not open yet. Deploy log:

services: provisioning the services you placed on the gateway over the community's own installer
preflight: excluded: node does not evaluate
services: clan reported: error: attribute 'kanidm-admins' missing
services: <each> was set up but the deploy did not hold — add it from the control panel

Cause (config repo history, laptop ~/.config/IDSS/clan-config and gateway /srv/idss/config)

  • 4861059 (founding compose): front-door.nix is the IDIP front door — 10 KERIA routes, no kanidm reference.
  • c63c41e "attach front door routes" (the founding-time services leg, 14:57:02): front-door.nix rewritten WHOLE as the Kanidm front door — KERIA routes gone, config.clan.core.vars.generators.kanidm-admins referenced. files.nix, newsletters.nix, paperless.nix, whakapapa.nix are rendered Kanidm-flavoured too.

This is exactly the failure reproduceIdentityPath (internal/provision/deploy.go:~1540, #788) exists to prevent — but the orchestrator the FOUNDING-time provisioner builds is not told the community is IDIP (bridgeIDP unset), so the rewrite reverts the identity axis. Provision-on-founding (phase 9, #1491) was proven on the Kanidm path only; IDIP drives install services from the panel after founding. Founding-time services + IDIP has never run.

Second defect — the failed leg is not rolled back

The preflight rightly refused, so the RUNNING gateway is intact (IDIP front door still serving). But the ten commits stay at HEAD in both repos: the machine imports eight service modules and a Kanidm front door, and does not evaluate. Every later deploy is dead on arrival — a control-panel install, a brand apply, and the update lane's pin-commit deploy. The hand-off copy "the community stays live — add it from the control panel" is therefore untrue. And had it evaluated, it would have swapped the sign-in front door for a Kanidm that does not exist.

Fix

  1. The founding-time provisioner carries the identity path (same source as the control plane's bridgeIDP) — one constructor, not two. Seam test: IDIP community + founding-time service ⇒ front door keeps its KERIA routes, no kanidm-* generator referenced, node evaluates.
  2. A services leg that does not hold reverts its config-repo commits (or works on a branch and fast-forwards only on a held deploy). Seam test: refused preflight ⇒ HEAD tree equals the pre-leg tree; a following deploy evaluates.
  3. Extend the IDIP prove-it drive (#1688) or the phase-9 drive with an IDIP + founding-time-services variant.

Repair on the demo (Ben's hands — kept community)

Revert 3a8e5dc..c780e44 in /srv/idss/config on the gateway (later commits touch only vars / org-identity), confirm the node evaluates, then install the seven from the panel.

Found on the hand re-founding of Whakatōhea Demo 2026-09-21 (rented + IDIP). Build: idss_0.1.0_amd64.deb sha256 ecff1f99…6e87febc, source 5b910ef3.

## What happened Nine services placed on the gateway at founding (files, docs-editing, calendar, document-archive, surveys, newsletters, data-collections, whakapapa, archive), identity = IDIP. Founding reached hand-off *live*, every service card reads **NOT RUNNING / Not open yet**. Deploy log: ``` services: provisioning the services you placed on the gateway over the community's own installer preflight: excluded: node does not evaluate services: clan reported: error: attribute 'kanidm-admins' missing services: <each> was set up but the deploy did not hold — add it from the control panel ``` ## Cause (config repo history, laptop `~/.config/IDSS/clan-config` and gateway `/srv/idss/config`) - `4861059` (founding compose): `front-door.nix` is the IDIP front door — 10 KERIA routes, no kanidm reference. - `c63c41e` "attach front door routes" (the founding-time services leg, 14:57:02): `front-door.nix` rewritten WHOLE as the **Kanidm** front door — KERIA routes gone, `config.clan.core.vars.generators.kanidm-admins` referenced. `files.nix`, `newsletters.nix`, `paperless.nix`, `whakapapa.nix` are rendered Kanidm-flavoured too. This is exactly the failure `reproduceIdentityPath` (`internal/provision/deploy.go:~1540`, #788) exists to prevent — but the orchestrator the FOUNDING-time provisioner builds is not told the community is IDIP (`bridgeIDP` unset), so the rewrite reverts the identity axis. Provision-on-founding (phase 9, #1491) was proven on the Kanidm path only; IDIP drives install services from the panel after founding. **Founding-time services + IDIP has never run.** ## Second defect — the failed leg is not rolled back The preflight rightly refused, so the RUNNING gateway is intact (IDIP front door still serving). But the ten commits stay at HEAD in both repos: the machine imports eight service modules and a Kanidm front door, and **does not evaluate**. Every later deploy is dead on arrival — a control-panel install, a brand apply, and the update lane's pin-commit deploy. The hand-off copy "the community stays live — add it from the control panel" is therefore untrue. And had it evaluated, it would have swapped the sign-in front door for a Kanidm that does not exist. ## Fix 1. The founding-time provisioner carries the identity path (same source as the control plane's `bridgeIDP`) — one constructor, not two. Seam test: IDIP community + founding-time service ⇒ front door keeps its KERIA routes, no `kanidm-*` generator referenced, node evaluates. 2. A services leg that does not hold **reverts its config-repo commits** (or works on a branch and fast-forwards only on a held deploy). Seam test: refused preflight ⇒ HEAD tree equals the pre-leg tree; a following deploy evaluates. 3. Extend the IDIP prove-it drive (#1688) or the phase-9 drive with an IDIP + founding-time-services variant. ## Repair on the demo (Ben's hands — kept community) Revert `3a8e5dc..c780e44` in `/srv/idss/config` on the gateway (later commits touch only vars / org-identity), confirm the node evaluates, then install the seven from the panel. Found on the hand re-founding of Whakatōhea Demo 2026-09-21 (rented + IDIP). Build: `idss_0.1.0_amd64.deb` sha256 `ecff1f99…6e87febc`, source `5b910ef3`.
Author
Owner

Demo repaired 2026-09-21 (Ben's go-ahead): git revert 3a8e5dc^..c780e44 in /srv/idss/config (18 revert commits, rollback tag before-repair-1701). Result: machines/gateway byte-identical to the founding compose f7a3398, 0 kanidm-admins references, 10 KERIA routes in the front door, full toplevel eval passes on the gateway. Orphan service var generators (nextcloud-db, *-secrets) remain in vars/ — harmless, reused on install.

**Demo repaired 2026-09-21 (Ben's go-ahead):** `git revert 3a8e5dc^..c780e44` in `/srv/idss/config` (18 revert commits, rollback tag `before-repair-1701`). Result: `machines/gateway` byte-identical to the founding compose `f7a3398`, 0 `kanidm-admins` references, 10 KERIA routes in the front door, full toplevel eval passes on the gateway. Orphan service var generators (nextcloud-db, *-secrets) remain in `vars/` — harmless, reused on install.

swarm-claim host=bens-mac-04 run=29511
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=29511 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1701 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1701,
  "status": "success",
  "commits": [
    "86580736a426e1a8450bf9490c4b07b815aba51b"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/resting_composition.go",
    "internal/clan/clan.go",
    "internal/clan/config.go",
    "internal/clan/configrepo.go",
    "internal/clan/configrepo_reset_test.go",
    "internal/clan/testing/fake.go",
    "internal/founding/services.go",
    "internal/founding/services_idip_test.go",
    "internal/rescue/deviceladder_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/ ./internal/clan/ ./internal/provision/ ./internal/rescue/ -count=1",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/founding/ ./internal/clan/ ./internal/clan/testing/ ./internal/rescue/ ./control-plane/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Fix 1: founding-time provisioner carries the identity path (one constructor, not two) — IDIP community + founding-time service => front door keeps its KERIA routes, no kanidm-* generator referenced": "internal/founding/services.go provisionServicer now passes provision.WithBridgeIDP() when bridgeIDP (s.Draft.Identity==IdentityIDIP) and WithPrivateFrontDoor() for a .idss.internal apex, mirroring the control plane. Seam test TestStory_S11IDIPServicesKeepIdentityPath asserts every AttachFrontDoor rewrite keeps IdentityIDIP+Keri (red without the fix: verified front-door rewrite 0 IdentityIDIP=false).",
    "Fix 2: a services leg that does not hold reverts its config-repo commits; a following deploy evaluates": "New clan.Config.ResetToRevision (internal/clan/{clan,config,configrepo}.go) hard-resets to an ancestor; founding.revertServicesLeg captures the pre-leg Config().Head and reverts on a provision-commit error OR non-held apply. Seam tests TestStory_S11IDIPServicesLegRevertsWhenApplyDoesNotHold (revert fires once) + …NoRevertWhenHeld (held leg never reverts); TestConfigRepo_ResetToRevisionDropsTipCommits proves the reverted tree is byte-identical to the pre-leg commit so a later deploy evaluates; …RefusesNonAncestor guards the mechanic.",
    "Fix 3: extend the IDIP prove-it drive (#1688) or the phase-9 drive with an IDIP + founding-time-services variant": "Deferred as a live-environment follow-up (recorded in STATUS.md milestone log and the commit message) — a drive-leg assertion is not unit-provable in this sandbox; the seam is proven here."
  },
  "summary": "Founding-time services now work on the IDIP path: the founding-time provisioner carries the identity path so the front-door rewrite keeps its KERIA doors, and a services leg that does not hold reverts its config-repo commits to a clean, evaluable tip.",
  "reason": "",
  "blockers": []
}
**close-report** for #1701 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1701, "status": "success", "commits": [ "86580736a426e1a8450bf9490c4b07b815aba51b" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/resting_composition.go", "internal/clan/clan.go", "internal/clan/config.go", "internal/clan/configrepo.go", "internal/clan/configrepo_reset_test.go", "internal/clan/testing/fake.go", "internal/founding/services.go", "internal/founding/services_idip_test.go", "internal/rescue/deviceladder_test.go" ], "tests": [ { "command": "go test ./internal/founding/ ./internal/clan/ ./internal/provision/ ./internal/rescue/ -count=1", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/founding/ ./internal/clan/ ./internal/clan/testing/ ./internal/rescue/ ./control-plane/...", "exit_code": 0 } ], "criteria": { "Fix 1: founding-time provisioner carries the identity path (one constructor, not two) — IDIP community + founding-time service => front door keeps its KERIA routes, no kanidm-* generator referenced": "internal/founding/services.go provisionServicer now passes provision.WithBridgeIDP() when bridgeIDP (s.Draft.Identity==IdentityIDIP) and WithPrivateFrontDoor() for a .idss.internal apex, mirroring the control plane. Seam test TestStory_S11IDIPServicesKeepIdentityPath asserts every AttachFrontDoor rewrite keeps IdentityIDIP+Keri (red without the fix: verified front-door rewrite 0 IdentityIDIP=false).", "Fix 2: a services leg that does not hold reverts its config-repo commits; a following deploy evaluates": "New clan.Config.ResetToRevision (internal/clan/{clan,config,configrepo}.go) hard-resets to an ancestor; founding.revertServicesLeg captures the pre-leg Config().Head and reverts on a provision-commit error OR non-held apply. Seam tests TestStory_S11IDIPServicesLegRevertsWhenApplyDoesNotHold (revert fires once) + …NoRevertWhenHeld (held leg never reverts); TestConfigRepo_ResetToRevisionDropsTipCommits proves the reverted tree is byte-identical to the pre-leg commit so a later deploy evaluates; …RefusesNonAncestor guards the mechanic.", "Fix 3: extend the IDIP prove-it drive (#1688) or the phase-9 drive with an IDIP + founding-time-services variant": "Deferred as a live-environment follow-up (recorded in STATUS.md milestone log and the commit message) — a drive-leg assertion is not unit-provable in this sandbox; the seam is proven here." }, "summary": "Founding-time services now work on the IDIP path: the founding-time provisioner carries the identity path so the front-door rewrite keeps its KERIA doors, and a services leg that does not hold reverts its config-repo commits to a clean, evaluable tip.", "reason": "", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1701
No description provided.