control plane: the P11 Network read (GET /api/v1/network) is never composed — WithNetwork exists but main() never calls it, so the Services front-door card and Network surface read "no such endpoint" on every live gateway #1343

Closed
opened 2026-09-09 04:14:52 +00:00 by ben · 4 comments
Owner

Seen: manual trial 2026-09-08 (Whakatohea, rented, build db1d1b23 and again on today's second founding): the admin dashboard's Services front-door card / Network surface shows no such endpoint.

Verified against the live box (https://whakatohea.idss.nz/api/v1/…, composition whole): probing every static GET the dashboard's generated client issues —

404 /network
404 /updates/rollout
404 /idip/credentials  /idip/invites  /idip/roster  /idip/stewards/rotation   (kanidm path — expected off-IDIP)
401 /catalogue  /mail/status                                                (gated — expected on the ungated apex)
200 everything else (25 reads)

Cause: #815 landed controlapi.WithNetwork(svc NetworkService) + registerNetwork (internal/controlapi/network.go:280–291) and #816–#818 landed the dashboard side, but no production caller composes it — grep -rn 'WithNetwork(' control-plane internal finds only the definition. The #1331 class ("dead code main() never wired"): the route exists in source at db1d1b23 and on main, and 404s on the box.

Also in the probe, decide separately:

  • /updates/rollout 404s even though whole_composition.go:556 chains .WithRollout(...) — check its registration guard (updates.go:136 if !ok) against a resting release source (the box logs release source resting: no IDSS_RELEASE_FEED_URL). If the Updates surface reads rollout on mount, it wears the same "no such endpoint" on every gateway without a feed.
  • The four /idip/* 404s are the kanidm path — the dashboard's Members IDIP panels should not issue them off-IDIP (or should render the honest "not on this path" state, not a 404 problem).

Fix: compose WithNetwork in whole_composition.go over the three owners the read fans out to (deployment / front door / mesh — see network.go's NetworkService), with the e2e pin: a served gateway answers GET /api/v1/network 200 behind the gate. Add the route to whatever seam asserts the dashboard's mount-time reads all resolve (the probe above is a 5-line shell loop — worth a harness leg: every static GET in generated.ts answers non-404 on a founded gateway).

**Seen:** manual trial 2026-09-08 (Whakatohea, rented, build db1d1b23 and again on today's second founding): the admin dashboard's Services front-door card / Network surface shows **no such endpoint**. **Verified against the live box** (`https://whakatohea.idss.nz/api/v1/…`, composition `whole`): probing every static GET the dashboard's generated client issues — ``` 404 /network 404 /updates/rollout 404 /idip/credentials /idip/invites /idip/roster /idip/stewards/rotation (kanidm path — expected off-IDIP) 401 /catalogue /mail/status (gated — expected on the ungated apex) 200 everything else (25 reads) ``` **Cause:** #815 landed `controlapi.WithNetwork(svc NetworkService)` + `registerNetwork` (internal/controlapi/network.go:280–291) and #816–#818 landed the dashboard side, but **no production caller composes it** — `grep -rn 'WithNetwork(' control-plane internal` finds only the definition. The `#1331` class ("dead code main() never wired"): the route exists in source at db1d1b23 and on main, and 404s on the box. **Also in the probe, decide separately:** - `/updates/rollout` 404s even though `whole_composition.go:556` chains `.WithRollout(...)` — check its registration guard (updates.go:136 `if !ok`) against a resting release source (the box logs *release source resting: no IDSS_RELEASE_FEED_URL*). If the Updates surface reads rollout on mount, it wears the same "no such endpoint" on every gateway without a feed. - The four `/idip/*` 404s are the kanidm path — the dashboard's Members IDIP panels should not issue them off-IDIP (or should render the honest "not on this path" state, not a 404 problem). **Fix:** compose `WithNetwork` in `whole_composition.go` over the three owners the read fans out to (deployment / front door / mesh — see network.go's NetworkService), with the e2e pin: a served gateway answers `GET /api/v1/network` 200 behind the gate. Add the route to whatever seam asserts the dashboard's mount-time reads all resolve (the probe above is a 5-line shell loop — worth a harness leg: *every static GET in generated.ts answers non-404 on a founded gateway*).

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: bug + ready-for-agent.

Why this is a two-way door: the classification is a label change (revertible by a later edit), and the fix is provable by an existing seam contract — internal/controlapi/network_integration_test.go already exercises WithNetwork(svc) through NewHandler, and the report states the e2e pin (a founded gateway answers GET /api/v1/network 200 behind the gate). None of the one-way-door residue applies (no personal credentials, no security-posture widening — the route rides the existing front-door auth gate unchanged — no member-facing trust accept, no data destruction, no non-routine spend).

What proves it: I confirmed the claim against the tree — grep -rn 'WithNetwork(' internal control-plane finds the definition (internal/controlapi/network.go, WithNetwork(svc NetworkService)) and four test call-sites only; the production option list assembled in control-plane/cmd/control-plane/main.go (the opts slice passed to controlapi.NewHandler) never appends it. Confirmed #1331-class dead code: the route exists in source and 404s on the box.


Agent Brief

Category: bug
Summary: The P11 Network read (GET /api/v1/network) is defined but never composed into the production control-plane handler, so the Services front-door card and Network surface read "no such endpoint" on every live gateway.

Current behavior:
controlapi.WithNetwork(svc NetworkService) and its registerNetwork route (from #815) exist in the controlapi package and are covered by an integration test, but no production caller composes the option. The control-plane's handler option list (the opts slice handed to controlapi.NewHandler) omits it, so GET /api/v1/network 404s on a served gateway. The dashboard side (#816–#818) issues the read and renders "no such endpoint".

Desired behavior:
A founded/served gateway answers GET /api/v1/network with 200 behind the front-door auth gate, returning the aggregated P11 answer. An unauthenticated caller is still refused at the gate with no network fact disclosed (unchanged posture — the route rides the existing /api/v1 admin surface).

Key interfaces:

  • controlapi.NetworkService — the four-method read face (Deployment(), FrontDoor(), Address(), Lease()). A production adapter must implement it, bound to the composition's already-live sources: the deployment/zones shape, monitoring's front-door observation (monitor.FrontDoorObservation), the heartbeat's standing Status(), and the portmap lease reading. Where a shape robs a section of meaning, the adapter carries the stated-limit content per the interface docs (own-domain / private-path).
  • controlapi.WithNetwork(svc) — append this option to the production handler option list alongside the other With… options, wiring the adapter above.
  • The read is all-or-nothing: any owner read that faults maps to a 500 Problem (already the route's contract), not a half-composed answer.

Acceptance criteria:

  • GET /api/v1/network returns 200 (not 404) on a founded gateway, behind the front-door gate; an unauthenticated caller is still refused with no network fact disclosed.
  • A production NetworkService adapter is composed via WithNetwork in the control-plane handler assembly; grep -rn 'WithNetwork(' control-plane finds a non-test caller.
  • The existing network_integration_test.go seam still passes, and a composition-level assertion covers that the whole handler answers /api/v1/network non-404 (extend the mount-time reads seam if one exists).
  • Consider adding the harness leg the report suggests: every static GET the dashboard's generated client issues answers non-404 on a founded gateway (the 5-line probe loop) — worthwhile but may be split to its own ticket if it grows.

Out of scope (file separately — do NOT fold in):

  • /updates/rollout 404 — WithRollout is chained, but its registration guard (updates.go, the if !ok path) appears to skip mounting when the release source is resting (no IDSS_RELEASE_FEED_URL). This is a distinct route-guard bug and should be its own ticket.
  • The four /idip/* 404s — the kanidm/off-IDIP path. Whether the dashboard's Members IDIP panels should suppress those reads or render an honest "not on this path" state is a dashboard/design question (likely needs-design), not this composition fix.
> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `bug` + `ready-for-agent`. **Why this is a two-way door:** the classification is a label change (revertible by a later edit), and the fix is provable by an existing seam contract — `internal/controlapi/network_integration_test.go` already exercises `WithNetwork(svc)` through `NewHandler`, and the report states the e2e pin (a founded gateway answers `GET /api/v1/network` 200 behind the gate). None of the one-way-door residue applies (no personal credentials, no security-posture widening — the route rides the existing front-door auth gate unchanged — no member-facing trust accept, no data destruction, no non-routine spend). **What proves it:** I confirmed the claim against the tree — `grep -rn 'WithNetwork(' internal control-plane` finds the definition (`internal/controlapi/network.go`, `WithNetwork(svc NetworkService)`) and four test call-sites only; the production option list assembled in `control-plane/cmd/control-plane/main.go` (the `opts` slice passed to `controlapi.NewHandler`) never appends it. Confirmed `#1331`-class dead code: the route exists in source and 404s on the box. --- ## Agent Brief **Category:** bug **Summary:** The P11 Network read (`GET /api/v1/network`) is defined but never composed into the production control-plane handler, so the Services front-door card and Network surface read "no such endpoint" on every live gateway. **Current behavior:** `controlapi.WithNetwork(svc NetworkService)` and its `registerNetwork` route (from #815) exist in the `controlapi` package and are covered by an integration test, but no production caller composes the option. The control-plane's handler option list (the `opts` slice handed to `controlapi.NewHandler`) omits it, so `GET /api/v1/network` 404s on a served gateway. The dashboard side (#816–#818) issues the read and renders "no such endpoint". **Desired behavior:** A founded/served gateway answers `GET /api/v1/network` with 200 behind the front-door auth gate, returning the aggregated P11 answer. An unauthenticated caller is still refused at the gate with no network fact disclosed (unchanged posture — the route rides the existing `/api/v1` admin surface). **Key interfaces:** - `controlapi.NetworkService` — the four-method read face (`Deployment()`, `FrontDoor()`, `Address()`, `Lease()`). A production adapter must implement it, bound to the composition's already-live sources: the deployment/zones shape, monitoring's front-door observation (`monitor.FrontDoorObservation`), the heartbeat's standing `Status()`, and the portmap lease reading. Where a shape robs a section of meaning, the adapter carries the stated-limit content per the interface docs (own-domain / private-path). - `controlapi.WithNetwork(svc)` — append this option to the production handler option list alongside the other `With…` options, wiring the adapter above. - The read is all-or-nothing: any owner read that faults maps to a 500 Problem (already the route's contract), not a half-composed answer. **Acceptance criteria:** - [ ] `GET /api/v1/network` returns 200 (not 404) on a founded gateway, behind the front-door gate; an unauthenticated caller is still refused with no network fact disclosed. - [ ] A production `NetworkService` adapter is composed via `WithNetwork` in the control-plane handler assembly; `grep -rn 'WithNetwork(' control-plane` finds a non-test caller. - [ ] The existing `network_integration_test.go` seam still passes, and a composition-level assertion covers that the whole handler answers `/api/v1/network` non-404 (extend the mount-time reads seam if one exists). - [ ] Consider adding the harness leg the report suggests: *every static GET the dashboard's generated client issues answers non-404 on a founded gateway* (the 5-line probe loop) — worthwhile but may be split to its own ticket if it grows. **Out of scope (file separately — do NOT fold in):** - **`/updates/rollout` 404** — `WithRollout` *is* chained, but its registration guard (`updates.go`, the `if !ok` path) appears to skip mounting when the release source is resting (no `IDSS_RELEASE_FEED_URL`). This is a distinct route-guard bug and should be its own ticket. - **The four `/idip/*` 404s** — the kanidm/off-IDIP path. Whether the dashboard's Members IDIP panels should suppress those reads or render an honest "not on this path" state is a dashboard/design question (likely `needs-design`), not this composition fix.

swarm-claim host=matou-dev-server-01 run=20420
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=20420 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1343 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 35d9f7e0df is not reachable from origin/main (not landed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'control-plane/cmd/control-plane/main.go' is not in the diff of the claimed commits
  • changed_files: 'control-plane/cmd/control-plane/network_wiring.go' is not in the diff of the claimed commits
  • changed_files: 'control-plane/cmd/control-plane/network_wiring_test.go' is not in the diff of the claimed commits
envelope
{
  "issue": 1343,
  "status": "success",
  "commits": [
    "35d9f7e0dfdfbe6517776a4389f79dc515d1f7dd"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/network_wiring.go",
    "control-plane/cmd/control-plane/network_wiring_test.go"
  ],
  "tests": [
    {
      "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./control-plane/cmd/control-plane/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l control-plane/cmd/control-plane/network_wiring.go control-plane/cmd/control-plane/network_wiring_test.go control-plane/cmd/control-plane/main.go",
      "exit_code": 0
    }
  ],
  "criteria": {
    "GET /api/v1/network returns 200 (not 404) on a founded gateway, behind the front-door gate; an unauthenticated caller is still refused with no network fact disclosed": "network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway asserts 200 (never 404) on the composed whole handler over the production adapter; the unauthenticated-refusal posture is unchanged (the route rides the existing /api/v1 admin surface behind WithAuthGate) and stays pinned by internal/controlapi/network_integration_test.go TestNetworkRoute_UnauthenticatedRefusedDisclosingNothing",
    "A production NetworkService adapter is composed via WithNetwork in the control-plane handler assembly; grep -rn 'WithNetwork(' control-plane finds a non-test caller": "control-plane/cmd/control-plane/main.go:1476 composes controlapi.WithNetwork(newNetworkReadAdapter(apex, c.mon, addressHeartbeat)); adapter in network_wiring.go — grep 'WithNetwork(' control-plane | grep -v _test returns that line",
    "The existing network_integration_test.go seam still passes, and a composition-level assertion covers that the whole handler answers /api/v1/network non-404": "internal/controlapi network_integration_test.go stays green; network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway is the composition-level non-404 pin",
    "Consider adding the harness leg (every static GET in generated.ts answers non-404): worthwhile but may be split to its own ticket": "the composition-level non-404 pin lands the core; the full generated.ts sweep is deferred (a larger e2e harness), noted in the commit and STATUS lead"
  },
  "summary": "Composed the P11 Network read via a production NetworkService adapter so GET /api/v1/network answers 200 on every gateway instead of 404.",
  "blockers": []
}
**close-report** for #1343 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 35d9f7e0dfdfbe6517776a4389f79dc515d1f7dd is not reachable from origin/main (not landed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'control-plane/cmd/control-plane/main.go' is not in the diff of the claimed commits - changed_files: 'control-plane/cmd/control-plane/network_wiring.go' is not in the diff of the claimed commits - changed_files: 'control-plane/cmd/control-plane/network_wiring_test.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1343, "status": "success", "commits": [ "35d9f7e0dfdfbe6517776a4389f79dc515d1f7dd" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/network_wiring.go", "control-plane/cmd/control-plane/network_wiring_test.go" ], "tests": [ { "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./control-plane/cmd/control-plane/ ./internal/controlapi/", "exit_code": 0 }, { "command": "gofmt -l control-plane/cmd/control-plane/network_wiring.go control-plane/cmd/control-plane/network_wiring_test.go control-plane/cmd/control-plane/main.go", "exit_code": 0 } ], "criteria": { "GET /api/v1/network returns 200 (not 404) on a founded gateway, behind the front-door gate; an unauthenticated caller is still refused with no network fact disclosed": "network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway asserts 200 (never 404) on the composed whole handler over the production adapter; the unauthenticated-refusal posture is unchanged (the route rides the existing /api/v1 admin surface behind WithAuthGate) and stays pinned by internal/controlapi/network_integration_test.go TestNetworkRoute_UnauthenticatedRefusedDisclosingNothing", "A production NetworkService adapter is composed via WithNetwork in the control-plane handler assembly; grep -rn 'WithNetwork(' control-plane finds a non-test caller": "control-plane/cmd/control-plane/main.go:1476 composes controlapi.WithNetwork(newNetworkReadAdapter(apex, c.mon, addressHeartbeat)); adapter in network_wiring.go — grep 'WithNetwork(' control-plane | grep -v _test returns that line", "The existing network_integration_test.go seam still passes, and a composition-level assertion covers that the whole handler answers /api/v1/network non-404": "internal/controlapi network_integration_test.go stays green; network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway is the composition-level non-404 pin", "Consider adding the harness leg (every static GET in generated.ts answers non-404): worthwhile but may be split to its own ticket": "the composition-level non-404 pin lands the core; the full generated.ts sweep is deferred (a larger e2e harness), noted in the commit and STATUS lead" }, "summary": "Composed the P11 Network read via a production NetworkService adapter so GET /api/v1/network answers 200 on every gateway instead of 404.", "blockers": [] } ``` </details>

close-report for #1343 — status success

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

envelope
{
  "issue": 1343,
  "status": "success",
  "commits": [
    "35d9f7e0dfdfbe6517776a4389f79dc515d1f7dd"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/network_wiring.go",
    "control-plane/cmd/control-plane/network_wiring_test.go"
  ],
  "tests": [
    {
      "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./control-plane/cmd/control-plane/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l control-plane/cmd/control-plane/network_wiring.go control-plane/cmd/control-plane/network_wiring_test.go control-plane/cmd/control-plane/main.go",
      "exit_code": 0
    }
  ],
  "criteria": {
    "GET /api/v1/network returns 200 (not 404) on a founded gateway, behind the front-door gate; an unauthenticated caller is still refused with no network fact disclosed": "network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway asserts 200 (never 404) on the composed whole handler over the production adapter; the unauthenticated-refusal posture is unchanged (the route rides the existing /api/v1 admin surface behind WithAuthGate) and stays pinned by internal/controlapi/network_integration_test.go TestNetworkRoute_UnauthenticatedRefusedDisclosingNothing",
    "A production NetworkService adapter is composed via WithNetwork in the control-plane handler assembly; grep -rn 'WithNetwork(' control-plane finds a non-test caller": "control-plane/cmd/control-plane/main.go:1476 composes controlapi.WithNetwork(newNetworkReadAdapter(apex, c.mon, addressHeartbeat)); adapter in network_wiring.go — grep 'WithNetwork(' control-plane | grep -v _test returns that line",
    "The existing network_integration_test.go seam still passes, and a composition-level assertion covers that the whole handler answers /api/v1/network non-404": "internal/controlapi network_integration_test.go stays green; network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway is the composition-level non-404 pin",
    "Consider adding the harness leg (every static GET in generated.ts answers non-404): worthwhile but may be split to its own ticket": "the composition-level non-404 pin lands the core; the full generated.ts sweep is deferred (a larger e2e harness), noted in the commit and STATUS lead"
  },
  "summary": "Composed the P11 Network read via a production NetworkService adapter so GET /api/v1/network answers 200 on every gateway instead of 404.",
  "blockers": []
}
**close-report** for #1343 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1343, "status": "success", "commits": [ "35d9f7e0dfdfbe6517776a4389f79dc515d1f7dd" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/network_wiring.go", "control-plane/cmd/control-plane/network_wiring_test.go" ], "tests": [ { "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./control-plane/cmd/control-plane/ ./internal/controlapi/", "exit_code": 0 }, { "command": "gofmt -l control-plane/cmd/control-plane/network_wiring.go control-plane/cmd/control-plane/network_wiring_test.go control-plane/cmd/control-plane/main.go", "exit_code": 0 } ], "criteria": { "GET /api/v1/network returns 200 (not 404) on a founded gateway, behind the front-door gate; an unauthenticated caller is still refused with no network fact disclosed": "network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway asserts 200 (never 404) on the composed whole handler over the production adapter; the unauthenticated-refusal posture is unchanged (the route rides the existing /api/v1 admin surface behind WithAuthGate) and stays pinned by internal/controlapi/network_integration_test.go TestNetworkRoute_UnauthenticatedRefusedDisclosingNothing", "A production NetworkService adapter is composed via WithNetwork in the control-plane handler assembly; grep -rn 'WithNetwork(' control-plane finds a non-test caller": "control-plane/cmd/control-plane/main.go:1476 composes controlapi.WithNetwork(newNetworkReadAdapter(apex, c.mon, addressHeartbeat)); adapter in network_wiring.go — grep 'WithNetwork(' control-plane | grep -v _test returns that line", "The existing network_integration_test.go seam still passes, and a composition-level assertion covers that the whole handler answers /api/v1/network non-404": "internal/controlapi network_integration_test.go stays green; network_wiring_test.go TestNetworkRoute_MountsNon404OnAFoundedGateway is the composition-level non-404 pin", "Consider adding the harness leg (every static GET in generated.ts answers non-404): worthwhile but may be split to its own ticket": "the composition-level non-404 pin lands the core; the full generated.ts sweep is deferred (a larger e2e harness), noted in the commit and STATUS lead" }, "summary": "Composed the P11 Network read via a production NetworkService adapter so GET /api/v1/network answers 200 on every gateway instead of 404.", "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#1343
No description provided.