idip: the gateway composes RESTING forever — composeWhole's identity precondition is kanidm-only, so the authority flip never sees whole (drive 20260828T201246Z, sig 4c82deb1e678) #954

Closed
opened 2026-08-28 20:27:47 +00:00 by matou-build-agent · 1 comment

Failure

The drive-idip rehearsal drive redded at the activation leg (first drive to reach it — the two prior reds were create and deploy-takeover):

activation faulted: founding: push the config repo and flip authority: fleetwire:
the seeded control plane did not compose whole after the authority flip within 1m30s
(last answer: HTTP 200, X-Idss-Composition="resting": {"gateway":{...},"nodes":[]})

artifacts/legs.json (leg 11), artifacts/verdict.json (firstRedLeg: activation, commit 7f0f7875). Ten legs green; the flip itself succeeded — only the whole-proof timed out.

Diagnosis

The drive walks the IDIP identity path (state/founding-state.json → /draft/identity = idip). On that path the composition root can never go whole, by construction:

  1. internal/clan/vmguest.go:803-812 — gatewayIdentityEnv renders export IDSS_IDP_URL=http://127.0.0.1:8465 on the IDIP branch and deliberately no kanidm exports ("On the IDIP path there is NO kanidm … the kanidm exports would reference an undeclared generator and would be a lie the fleet deployed", DDR 0200 / #778).
  2. control-plane/cmd/control-plane/main.go:237-242 — productionIDP reads IDSS_KANIDM_URL; empty ⇒ returns nil. Confirmed live: logs/droplet-journal.txt:1437 "member identity provider resting: no IDSS_KANIDM_URL", and :1452 "idip adapter wired" on the same start (pid 2964) — proving IDSS_IDP_URL is set (main.go:939 gates on it) while IDSS_KANIDM_URL is not.
  3. control-plane/cmd/control-plane/compose.go:687 — compose() dispatches to composeWhole only when deps.repo != nil && deps.stateDir != "" && deps.idp != nil. With a nil idp it falls to composeResting: logs/droplet-journal.txt:1448 "monitor aggregation loop resting: composition root not whole (config repo / state dir / kanidm not all present)", :1455 composition_whole=false.
  4. control-plane/cmd/control-plane/main.go:868 — WithCompositionSignal(c.whole) therefore stamps X-Idss-Composition: resting on every response, permanently.
  5. internal/fleetwire/fleet.go:266-269 — PushConfigRepo's whole-proof requires HTTP 200 && header == "whole" && body contains "gateway". Status and body both passed; the header never will. It times out at Timeout (90s, fleet.go:97) and faults the leg.

The other two preconditions were satisfied on the final restart — logs/droplet-journal.txt:1426 "config repo wired … dir=/srv/idss/config" and IDSS_STATE_DIR=/var/lib/idss is exported unconditionally (internal/clan/vmguest.go:762). deps.idp is the sole missing precondition.

Suspected layer

The composition root (control-plane/cmd/control-plane/), not fleetwire and not the gateway render. The render is correct and intentional for IDIP; compose() and productionIDP were written when kanidm was the only identity tier (ADR 0105/0107) and were never taught the IDIP path (ADR 0194 / DDR 0200 / ADR 0212, #778).

This is not a fleetwire timeout to widen — the header would still read resting after any bound. Raising Timeout or relaxing the whole-proof would only convert a loud, correct fault into a silent lie about a resting fleet.

What plugging it needs

A design ruling first — this is needs-design, not directly actionable:

  • composeWhole feeds deps.idp straight into member.New (control-plane/cmd/control-plane/whole_composition.go:402), and the only member.IDP implementation in the tree is internal/kanidm (internal/kanidm/kanidm.go:96; the IDIP member lifecycle is a different shape — internal/keria/standing.go's Standing, described in STATUS as "the counterpart of the kanidm-tier member.Orchestrator"). There is no IDIP member.IDP to hand it.
  • So the ruling is what "whole" means on the IDIP path. Two shapes, both amending ADR 0107's "a family lands whole or not at all":
    • (a) compose() gains an IDIP branch that composes whole over the keria Standing lifecycle in place of the kanidm member family — the honest close, larger slice.
    • (b) the identity precondition becomes "an identity provider of either shape is present" (kanidm URL or IDSS_IDP_URL), with the kanidm-only member family resting fail-loud inside an otherwise-whole composition. Cheaper, but member.New currently receives a nil idp — every member verb would need the resting posture (restingMemberIDP, resting_composition.go:237) rather than a nil deref.
  • Whichever lands, the log line at compose.go/main.go:240 and the resting message "config repo / state dir / kanidm not all present" must stop naming kanidm on the IDIP path.

Test gap to close in the same change

There is no composition-root test covering the IDIP path's wholeness: IDSS_IDP_URL appears in tests only in internal/clan/seedleg_idip_test.go:86,124 (render assertions). Nothing composes with the IDIP environment and asserts the signal, so a unit-green tree shipped a gateway that can never satisfy the flip. The fix should carry a composition-root regression in the class of logs_wiring_test.go — compose with the IDIP env set and kanidm absent, assert X-Idss-Composition: whole — which is exactly the check that would have caught this before a paid droplet did.

Not a fault

The operator surface reported this honestly — error-context.md shows the fault text and a "Retry finishing setup" button on the stand-up page. No presentation defect here.

logs/broker-journal.txt harvested nothing (executor off the admin mesh, ADR 0208 / #681) — expected, and the verdict does not depend on it.

drive 20260828T201246Z red at activation: activation faulted: founding: push the config repo and flip authority: fleetwire: the seeded control plane did not compose whole after the authority flip within 1m30s (last answer: HTTP 200, X-Idss-Co
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260828T201246Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure The `drive-idip` rehearsal drive redded at the **activation** leg (first drive to reach it — the two prior reds were `create` and `deploy-takeover`): ``` activation faulted: founding: push the config repo and flip authority: fleetwire: the seeded control plane did not compose whole after the authority flip within 1m30s (last answer: HTTP 200, X-Idss-Composition="resting": {"gateway":{...},"nodes":[]}) ``` `artifacts/legs.json` (leg 11), `artifacts/verdict.json` (`firstRedLeg: activation`, commit `7f0f7875`). Ten legs green; the flip itself succeeded — only the whole-proof timed out. ## Diagnosis The drive walks the **IDIP** identity path (`state/founding-state.json` → `/draft/identity = idip`). On that path the composition root can never go whole, by construction: 1. `internal/clan/vmguest.go:803-812` — `gatewayIdentityEnv` renders `export IDSS_IDP_URL=http://127.0.0.1:8465` on the IDIP branch and **deliberately no kanidm exports** ("On the IDIP path there is NO kanidm … the kanidm exports would reference an undeclared generator and would be a lie the fleet deployed", DDR 0200 / #778). 2. `control-plane/cmd/control-plane/main.go:237-242` — `productionIDP` reads `IDSS_KANIDM_URL`; empty ⇒ returns `nil`. Confirmed live: `logs/droplet-journal.txt:1437` *"member identity provider resting: no IDSS_KANIDM_URL"*, and `:1452` *"idip adapter wired"* on the same start (pid 2964) — proving `IDSS_IDP_URL` **is** set (`main.go:939` gates on it) while `IDSS_KANIDM_URL` is not. 3. `control-plane/cmd/control-plane/compose.go:687` — `compose()` dispatches to `composeWhole` only when `deps.repo != nil && deps.stateDir != "" && deps.idp != nil`. With a nil `idp` it falls to `composeResting`: `logs/droplet-journal.txt:1448` *"monitor aggregation loop resting: composition root not whole (config repo / state dir / kanidm not all present)"*, `:1455` `composition_whole=false`. 4. `control-plane/cmd/control-plane/main.go:868` — `WithCompositionSignal(c.whole)` therefore stamps `X-Idss-Composition: resting` on every response, permanently. 5. `internal/fleetwire/fleet.go:266-269` — `PushConfigRepo`'s whole-proof requires `HTTP 200 && header == "whole" && body contains "gateway"`. Status and body both passed; the header never will. It times out at `Timeout` (90s, `fleet.go:97`) and faults the leg. The other two preconditions were satisfied on the final restart — `logs/droplet-journal.txt:1426` *"config repo wired … dir=/srv/idss/config"* and `IDSS_STATE_DIR=/var/lib/idss` is exported unconditionally (`internal/clan/vmguest.go:762`). **`deps.idp` is the sole missing precondition.** ## Suspected layer The **composition root** (`control-plane/cmd/control-plane/`), not fleetwire and not the gateway render. The render is correct and intentional for IDIP; `compose()` and `productionIDP` were written when kanidm was the only identity tier (ADR 0105/0107) and were never taught the IDIP path (ADR 0194 / DDR 0200 / ADR 0212, #778). This is **not** a `fleetwire` timeout to widen — the header would still read `resting` after any bound. Raising `Timeout` or relaxing the whole-proof would only convert a loud, correct fault into a silent lie about a resting fleet. ## What plugging it needs A **design ruling first** — this is `needs-design`, not directly actionable: - `composeWhole` feeds `deps.idp` straight into `member.New` (`control-plane/cmd/control-plane/whole_composition.go:402`), and the only `member.IDP` implementation in the tree is `internal/kanidm` (`internal/kanidm/kanidm.go:96`; the IDIP member lifecycle is a *different shape* — `internal/keria/standing.go`'s `Standing`, described in STATUS as "the counterpart of the kanidm-tier `member.Orchestrator`"). There is no IDIP `member.IDP` to hand it. - So the ruling is what "whole" *means* on the IDIP path. Two shapes, both amending ADR 0107's "a family lands whole or not at all": - **(a)** `compose()` gains an IDIP branch that composes whole over the keria `Standing` lifecycle in place of the kanidm member family — the honest close, larger slice. - **(b)** the identity precondition becomes "an identity provider **of either shape** is present" (kanidm URL *or* `IDSS_IDP_URL`), with the kanidm-only member family resting fail-loud inside an otherwise-whole composition. Cheaper, but `member.New` currently receives a nil `idp` — every member verb would need the resting posture (`restingMemberIDP`, `resting_composition.go:237`) rather than a nil deref. - Whichever lands, the log line at `compose.go`/`main.go:240` and the resting message *"config repo / state dir / kanidm not all present"* must stop naming kanidm on the IDIP path. ### Test gap to close in the same change There is **no composition-root test covering the IDIP path's wholeness**: `IDSS_IDP_URL` appears in tests only in `internal/clan/seedleg_idip_test.go:86,124` (render assertions). Nothing composes with the IDIP environment and asserts the signal, so a unit-green tree shipped a gateway that can never satisfy the flip. The fix should carry a composition-root regression in the class of `logs_wiring_test.go` — compose with the IDIP env set and kanidm absent, assert `X-Idss-Composition: whole` — which is exactly the check that would have caught this before a paid droplet did. ## Not a fault The operator surface reported this honestly — `error-context.md` shows the fault text and a *"Retry finishing setup"* button on the stand-up page. No presentation defect here. `logs/broker-journal.txt` harvested nothing (executor off the admin mesh, ADR 0208 / #681) — expected, and the verdict does not depend on it. drive `20260828T201246Z` red at `activation`: `activation faulted: founding: push the config repo and flip authority: fleetwire: the seeded control plane did not compose whole after the authority flip within 1m30s (last answer: HTTP 200, X-Idss-Co` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260828T201246Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 4c82deb1e678 -->
Owner

Ruled by agent under ADR 0174 — veto anytime. This is a design-tier ruling that is revertible (one commit) and provable (a composition-root regression), so a standing session rules it and Ben vetoes asynchronously. The diagnosis called it needs-design; under ADR 0174 a design ruling of this shape is a two-way door.

The ruling (option b of the diagnosis) — DDR 0213, amends ADR 0107

Composition wholeness requires an identity provider of either shape — the kanidm adapter (deps.idp) OR the IDIP bridge (deps.idipIdentity, from IDSS_IDP_URL). On the IDIP path the composition now goes whole; the kanidm-tier member family rests fail-loud inside the otherwise-whole composition (composeWhole substitutes restingMemberIDP for the nil idp — every member verb the honest errMemberUnwired, reads project empty, ADR 0100), because IDIP membership is keria's roster/standing lifecycle wired separately (productionIdip, ADR 0198/0212).

Why (b) over (a):

  1. Wholeness gates only the monitor aggregation loop (real fleet-state read, heartbeat stream, backups' coverage) — none of which depend on the identity shape. deps.idp feeds only member.New.
  2. composeWhole was already half-taught the IDIP path (provision.WithBridgeIDP(), line 282) but that branch was dead code, unreachable because compose() never dispatched there on IDIP. This ruling reaches it.
  3. (a) — folding keria's Standing into compose() as a member.IDP — would re-architect a lifecycle that already works over the IDIP roster surfaces: a large slice, not a two-way door.

deps.idipIdentity is the single source of truth for "this is the IDIP path": main() reads IDSS_IDP_URL into it; compose()'s dispatch and composeWhole's bridge-IDP branch both read the field (line 282 no longer re-reads the env), so the wholeness decision and the provision wiring can never disagree.

What landed — commit d2e5843a

  • compose() identity precondition: deps.idp != nil || deps.idipIdentity.
  • composeWhole(): restingMemberIDP{} substituted for a nil idp before member.New; bridge-IDP branch reads deps.idipIdentity.
  • main(): sets idipIdentity from IDSS_IDP_URL; the resting-loop message and productionIDP's resting message no longer name kanidm as the sole identity precondition on the IDIP path (per the ticket's requirement) — productionIDP now logs the IDIP-path rest honestly instead of promising a kanidm connection that never comes.
  • WithCompositionSignal doc, compose/composeDeps/package docs: "an identity provider of either shape".
  • New DDR 0213 records the ruling.
  • STATUS.md header promoted to #954.

Proof

Red-first composition-root regression control-plane/cmd/control-plane/idip_wholeness_test.go — the exact test class the tree lacked (IDSS_IDP_URL appeared only in render assertions in seedleg_idip_test.go, so a unit-green tree shipped a gateway that could never satisfy the flip):

  • TestIDIPPathComposesWhole — compose over the IDIP env (bridge present, kanidm absent) → c.whole and X-Idss-Composition: whole, the exact byte fleetwire.PushConfigRepo's whole-proof reads after the flip. Confirmed failing before the fix (c.whole == false), passing after.
  • TestNoIdentityProviderRestsComposition — the fail-closed guard: with no provider of either shape, the root still rests.

go build ./..., go vet, and the control-plane + controlapi + clan + keria + member suites are green. The status was already HTTP 200 and the body already contained gateway (per the diagnosis) — the header was the sole failing condition, and it now reads whole, so the flip's whole-proof is satisfied offline at the composition root.

Live proof residue: the standing community re-founds on the next idip rehearsal drive, which is the end-to-end confirmation that activation now goes green — same offline-proven-then-drive-confirmed shape as #945/#952. No one-way door was touched.

Closing on the landed, offline-proven fix.

**Ruled by agent under ADR 0174 — veto anytime.** This is a design-tier ruling that is revertible (one commit) and provable (a composition-root regression), so a standing session rules it and Ben vetoes asynchronously. The diagnosis called it `needs-design`; under ADR 0174 a design ruling of this shape is a two-way door. ## The ruling (option b of the diagnosis) — DDR 0213, amends ADR 0107 **Composition wholeness requires an identity provider of _either_ shape** — the kanidm adapter (`deps.idp`) OR the IDIP bridge (`deps.idipIdentity`, from `IDSS_IDP_URL`). On the IDIP path the composition now goes whole; the kanidm-tier member family **rests fail-loud inside the otherwise-whole composition** (`composeWhole` substitutes `restingMemberIDP` for the nil `idp` — every member verb the honest `errMemberUnwired`, reads project empty, ADR 0100), because IDIP membership is keria's roster/standing lifecycle wired separately (`productionIdip`, ADR 0198/0212). **Why (b) over (a):** 1. Wholeness gates only the monitor aggregation loop (real fleet-state read, heartbeat stream, backups' coverage) — none of which depend on the identity shape. `deps.idp` feeds only `member.New`. 2. `composeWhole` was **already half-taught** the IDIP path (`provision.WithBridgeIDP()`, line 282) but that branch was dead code, unreachable because `compose()` never dispatched there on IDIP. This ruling reaches it. 3. (a) — folding keria's `Standing` into `compose()` as a `member.IDP` — would re-architect a lifecycle that already works over the IDIP roster surfaces: a large slice, not a two-way door. `deps.idipIdentity` is the single source of truth for "this is the IDIP path": `main()` reads `IDSS_IDP_URL` into it; `compose()`'s dispatch and `composeWhole`'s bridge-IDP branch both read the field (line 282 no longer re-reads the env), so the wholeness decision and the provision wiring can never disagree. ## What landed — commit `d2e5843a` - `compose()` identity precondition: `deps.idp != nil || deps.idipIdentity`. - `composeWhole()`: `restingMemberIDP{}` substituted for a nil `idp` before `member.New`; bridge-IDP branch reads `deps.idipIdentity`. - `main()`: sets `idipIdentity` from `IDSS_IDP_URL`; the resting-loop message and `productionIDP`'s resting message no longer name kanidm as the sole identity precondition on the IDIP path (per the ticket's requirement) — `productionIDP` now logs the IDIP-path rest honestly instead of promising a kanidm connection that never comes. - `WithCompositionSignal` doc, `compose`/`composeDeps`/package docs: "an identity provider of either shape". - **New DDR 0213** records the ruling. - **STATUS.md** header promoted to #954. ## Proof Red-first composition-root regression `control-plane/cmd/control-plane/idip_wholeness_test.go` — the exact test class the tree lacked (`IDSS_IDP_URL` appeared only in render assertions in `seedleg_idip_test.go`, so a unit-green tree shipped a gateway that could never satisfy the flip): - `TestIDIPPathComposesWhole` — compose over the IDIP env (bridge present, kanidm absent) → `c.whole` **and** `X-Idss-Composition: whole`, the exact byte `fleetwire.PushConfigRepo`'s whole-proof reads after the flip. Confirmed failing before the fix (`c.whole == false`), passing after. - `TestNoIdentityProviderRestsComposition` — the fail-closed guard: with no provider of either shape, the root still rests. `go build ./...`, `go vet`, and the control-plane + controlapi + clan + keria + member suites are green. The status was already `HTTP 200` and the body already contained `gateway` (per the diagnosis) — the header was the sole failing condition, and it now reads `whole`, so the flip's whole-proof is satisfied offline at the composition root. **Live proof residue:** the standing community re-founds on the next `idip` rehearsal drive, which is the end-to-end confirmation that `activation` now goes green — same offline-proven-then-drive-confirmed shape as #945/#952. No one-way door was touched. Closing on the landed, offline-proven fix.
ben 2026-08-28 20:51:50 +00:00
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.

Reference
Matou/idss#954
No description provided.