observability: transport-network-read — the Network read family — one projection over three owners, shape-aware not shape-branching #815

Closed
opened 2026-08-25 10:59:06 +00:00 by matou-build-agent · 2 comments

Parent

Feature spec: #792 — control-panel observability child spec: network (P11) (DDR 0204).
Design ticket #761; slice-map fan-in #770; wayfinder map #7.
Slice transport-network-read of docs/slices/observability.yaml; covers spec #792 stories 21–27 (shape half), 45–50.

What to build

One read family for the whole surface, so three owners are projected once rather than three
times: the certificate source × the heartbeat's Status() × the front-door probe
observation
, plus the portmap lease reading only when a lease is genuinely held.

The load-bearing decision: the read is shape-aware, not shape-branching in the UI. It reports
the deployment shape (subdomain / own-domain / private path / first-run) and the per-section
stated limits as CONTENT — so S1 / S1f / S1o / S1p are one surface rendering the read's own
answer rather than four screens behind a UI conditional.

Ageing is marked here, once: the read marks each observation aged or current, and components
compute no durations against a clock. The heartbeat's standing state is projected, not
re-derived
— the name rows are that status's own state, detail, last-pointed address, pending
address and since-time. Owner faults map to the shared Problem body. One route on the existing
OpenAPI spec behind the existing auth gate, generated client consumed by an httpNetworkClient,
following the fleetClient / overviewClient pattern.

Acceptance criteria

  • (story 45) Given the control plane, when the dashboard reads the network surface, then a single read returns the whole view — served certificates, the address/name reading, the port groups with their probe states and lease reading, the deployment shape, and every observation's observed-at — as a thin projection that re-derives nothing.
  • (decisions) Given the read family, then it reports the deployment shape and the per-section stated limits as content, so one surface can render S1 / S1f / S1o / S1p.
  • (story 48) Given an observation older than its cadence, then the read marks it aged — the surface computes no duration.
  • (story 49) Given the heartbeat's Status(), then the read projects its own state, detail, last-pointed address, pending address and since-time, re-judged nowhere.
  • (story 47) Given a deployment with no available vantage, then the read reports the Ports section as a stated limit — no open, no closed, no unknown-that-implies-a-check-ran.
  • (story 19) Given a router lease genuinely held, then the read carries the lease reading; given none held, then the field carries the honest no-lease posture instead.
  • (story 23) Given the own-domain path, then the read includes the certificate-zone port group as required; given the subdomain path, then that group is absent from the answer.
  • (story 38) Given a standing heartbeat repoint-failed fault and a subsequent read gap, then the read still carries the standing fault (aged, with its last-good time) and never reverts it to a done check or a bare unknown.
  • (story 50) Given an unauthenticated caller, then the route is refused by the existing front-door auth gate with no fact disclosed; given an authenticated operator, then it answers.
  • Given any owner fault, then it maps to the shared Problem body.

Blocked by

  • #814 — observability:monitor-front-door-observation
  • bootstrap:control-plane-tracer (#127 — done, satisfied)

Task manifest

task: observability:transport-network-read
interface: a `Network`-shaped read service on `controlapi` — one thin projection over the certificate
  source × the heartbeat's `Status()` × the front-door probe observation (+ the portmap lease reading
  when held) — reporting the deployment shape, per-section stated limits and per-observation ageing as
  content; one route on the existing OpenAPI spec behind the existing auth gate, with a generated-client
  `httpNetworkClient`
seam: 'Go projection tests over hand-written fakes for the three owners plus a transport integration test
  (prior art `fleet_integration_test.go`, `overview_integration_test.go`, `monitor_test.go`, `heartbeat_test.go`,
  `authgate_test.go`): shape selection; ageing at the cadence boundary; a heartbeat fault surviving an
  aged read; a missing vantage rendering a stated limit; lease-present vs lease-absent; an owner fault
  mapping to the shared Problem body; an unauthenticated call refused disclosing nothing'
acceptance:
- given: a self-hosted subdomain community
  when: the network read is served
  then: one read returns certificates, address/name, port groups, the shape and every observed-at
- given: an own-domain community
  when: the network read is served
  then: the shape and the Address section's stated limit come back as content, and the certificate-zone
    group is present and required
- given: a private-path community
  when: the network read is served
  then: the two stated limits come back as content and neither section is omitted
- given: a deployment with no probe vantage
  when: the network read is served
  then: the Ports section is a stated limit — no `open` and no `closed`
- given: a standing heartbeat `repoint-failed` and an aged read
  when: the network read is served
  then: the standing fault is still carried, aged, with its last-good time
- given: an unauthenticated caller
  when: the route is requested
  then: it is refused with no fact disclosed
depends_on:
- monitor-front-door-observation
- bootstrap:control-plane-tracer
out_of_scope:
- any lever — no renew, no re-point, no re-ask, no retry-the-probe
- 'building the portmap seam (ADR 0141, #331) — the lease field renders only if one is reported'
- a live own-domain registrar check
- zone and registrar detail (provider names, tokens, `reservedSlugs`, TTLs, the claim secret)
- the surface itself (`dashboard-network-surface`)
needs_human_decision: []

Emitted by /to-tickets over docs/slices/observability.yaml in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.

## Parent Feature spec: **#792** — control-panel observability child spec: network (P11) (DDR 0204). Design ticket #761; slice-map fan-in **#770**; wayfinder map #7. Slice `transport-network-read` of `docs/slices/observability.yaml`; covers spec #792 stories 21–27 (shape half), 45–50. ## What to build One read family for the whole surface, so three owners are projected **once** rather than three times: the **certificate source** × the heartbeat's **`Status()`** × the **front-door probe observation**, plus the portmap lease reading **only when a lease is genuinely held**. The load-bearing decision: the read is **shape-aware, not shape-branching in the UI**. It reports the deployment shape (subdomain / own-domain / private path / first-run) and the per-section **stated limits as CONTENT** — so S1 / S1f / S1o / S1p are one surface rendering the read's own answer rather than four screens behind a UI conditional. **Ageing is marked here, once**: the read marks each observation aged or current, and components compute no durations against a clock. The heartbeat's standing state is **projected, not re-derived** — the name rows are that status's own state, detail, last-pointed address, pending address and since-time. Owner faults map to the shared Problem body. One route on the existing OpenAPI spec behind the existing auth gate, generated client consumed by an `httpNetworkClient`, following the `fleetClient` / `overviewClient` pattern. ## Acceptance criteria - [ ] (story 45) Given the control plane, when the dashboard reads the network surface, then a **single read** returns the whole view — served certificates, the address/name reading, the port groups with their probe states and lease reading, the deployment shape, and every observation's observed-at — as a thin projection that re-derives nothing. - [ ] (decisions) Given the read family, then it reports the deployment shape and the per-section stated limits **as content**, so one surface can render S1 / S1f / S1o / S1p. - [ ] (story 48) Given an observation older than its cadence, then the read marks it aged — the surface computes no duration. - [ ] (story 49) Given the heartbeat's `Status()`, then the read projects its own state, detail, last-pointed address, pending address and since-time, re-judged nowhere. - [ ] (story 47) Given a deployment with no available vantage, then the read reports the Ports section as a **stated limit** — no `open`, no `closed`, no unknown-that-implies-a-check-ran. - [ ] (story 19) Given a router lease genuinely held, then the read carries the lease reading; given none held, then the field carries the honest no-lease posture instead. - [ ] (story 23) Given the own-domain path, then the read includes the certificate-zone port group as required; given the subdomain path, then that group is absent from the answer. - [ ] (story 38) Given a standing heartbeat `repoint-failed` fault and a subsequent read gap, then the read still carries the standing fault (aged, with its last-good time) and never reverts it to a done check or a bare unknown. - [ ] (story 50) Given an unauthenticated caller, then the route is refused by the existing front-door auth gate with **no fact disclosed**; given an authenticated operator, then it answers. - [ ] Given any owner fault, then it maps to the shared Problem body. ## Blocked by - #814 — `observability:monitor-front-door-observation` - `bootstrap:control-plane-tracer` (#127 — done, satisfied) ## Task manifest ```yaml task: observability:transport-network-read interface: a `Network`-shaped read service on `controlapi` — one thin projection over the certificate source × the heartbeat's `Status()` × the front-door probe observation (+ the portmap lease reading when held) — reporting the deployment shape, per-section stated limits and per-observation ageing as content; one route on the existing OpenAPI spec behind the existing auth gate, with a generated-client `httpNetworkClient` seam: 'Go projection tests over hand-written fakes for the three owners plus a transport integration test (prior art `fleet_integration_test.go`, `overview_integration_test.go`, `monitor_test.go`, `heartbeat_test.go`, `authgate_test.go`): shape selection; ageing at the cadence boundary; a heartbeat fault surviving an aged read; a missing vantage rendering a stated limit; lease-present vs lease-absent; an owner fault mapping to the shared Problem body; an unauthenticated call refused disclosing nothing' acceptance: - given: a self-hosted subdomain community when: the network read is served then: one read returns certificates, address/name, port groups, the shape and every observed-at - given: an own-domain community when: the network read is served then: the shape and the Address section's stated limit come back as content, and the certificate-zone group is present and required - given: a private-path community when: the network read is served then: the two stated limits come back as content and neither section is omitted - given: a deployment with no probe vantage when: the network read is served then: the Ports section is a stated limit — no `open` and no `closed` - given: a standing heartbeat `repoint-failed` and an aged read when: the network read is served then: the standing fault is still carried, aged, with its last-good time - given: an unauthenticated caller when: the route is requested then: it is refused with no fact disclosed depends_on: - monitor-front-door-observation - bootstrap:control-plane-tracer out_of_scope: - any lever — no renew, no re-point, no re-ask, no retry-the-probe - 'building the portmap seam (ADR 0141, #331) — the lease field renders only if one is reported' - a live own-domain registrar check - zone and registrar detail (provider names, tokens, `reservedSlugs`, TTLs, the claim secret) - the surface itself (`dashboard-network-surface`) needs_human_decision: [] ``` --- *Emitted by `/to-tickets` over `docs/slices/observability.yaml` in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.*
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=10067
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10067 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #815 — status success

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

envelope
{
  "issue": 815,
  "status": "success",
  "commits": [
    "9d745c2bca1bb314f986d540928e427ad4097c4a"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/api/networkClient.ts",
    "dashboard/src/lib/network.ts",
    "dashboard/tests/unit/networkLive.test.ts",
    "internal/certsource/certsource.go",
    "internal/controlapi/network.go",
    "internal/controlapi/network_integration_test.go",
    "internal/controlapi/network_test.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./... (via nix develop .#go-ci, pre-push gate)",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/ ./internal/certsource/ ./internal/monitor/ ./internal/heartbeat/",
      "exit_code": 0
    },
    {
      "command": "node scripts/generate-client.mjs --check (openapi client in sync)",
      "exit_code": 0
    },
    {
      "command": "vitest run (dashboard, 1071 tests incl networkLive)",
      "exit_code": 0
    },
    {
      "command": "vue-tsc -p tsconfig.json --noEmit (dashboard)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "story 45 — a single read returns the whole view (certs, address/name, port groups + lease, shape, observed-at) as a thin projection that re-derives nothing": "ProjectNetwork in internal/controlapi/network.go composes all three owners once; TestNetworkHandler_ProjectsTheWholeReadFromEveryOwner + TestProjectNetwork_SubdomainProjectsAllThreeOwners assert the whole view incl observed-at",
    "decisions — reports the deployment shape and per-section stated limits as content so one surface renders S1/S1f/S1o/S1p": "Network.Shape + NetworkAddress.StatedLimit + NetworkPorts.StatedLimit carried as content; TestProjectNetwork_OwnDomainStatesAddressLimitAndKeepsCertZone, _PrivatePathStatesBothLimits, _FirstRunNeverEmpty",
    "story 48 — an observation older than its cadence is marked aged; the surface computes no duration": "aged flags carried verbatim from monitor.FrontDoorObservation; TestProjectNetwork_AgedObservationCarriedNotComputed",
    "story 49 — the heartbeat Status() is projected (state, detail, last-pointed, pending, since), re-judged nowhere": "NetworkAddress projects heartbeat.Status verbatim; TestProjectNetwork_SubdomainProjectsAllThreeOwners + _StandingHeartbeatFaultSurvivesAnAgedRead",
    "story 47 — no available vantage: Ports is a stated limit, no open/closed/unknown-that-implies-a-check": "ProjectNetwork sets PortsNoVantageLimit + empty groups when !HasVantage; TestProjectNetwork_NoVantageStatesPortsLimitWithNoVerdicts + TestNetworkHandler_EmptyGroupsSerialiseAsArray",
    "story 19 — a lease genuinely held carries the reading; none held carries the honest no-lease posture": "NetworkLease.Held + Detail; TestProjectNetwork_LeasePresentThenAbsent",
    "story 23 — own-domain includes the certificate-zone port group as required; subdomain omits it": "groups projected verbatim from the probe; TestProjectNetwork_OwnDomainStatesAddressLimitAndKeepsCertZone + TestProjectNetwork_SubdomainOmitsCertZoneGroup",
    "story 38 — a standing repoint-failed fault survives a read gap (aged, with last-good), never reverted to a done check or bare unknown": "heartbeat holds the fault; ProjectNetwork projects it verbatim; TestProjectNetwork_StandingHeartbeatFaultSurvivesAnAgedRead",
    "story 50 — unauthenticated caller refused by the front-door auth gate with no fact disclosed; authenticated operator answers": "route rides /api/v1 admin surface behind WithAuthGate; TestNetworkRoute_UnauthenticatedRefusedDisclosingNothing (401, body discloses no network fact; operator gets 204 + the route answers)",
    "any owner fault maps to the shared Problem body": "registerNetwork uses writeReadErr → 500 Problem; TestNetworkHandler_OwnerFaultMapsToProblem"
  },
  "summary": "The P11 Network read family: one GET /api/v1/network projecting the certificate source, the heartbeat Status() and the front-door probe (+ portmap lease) once, shape-aware not shape-branching, behind the existing auth gate, with its generated httpNetworkClient.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #815 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 815, "status": "success", "commits": [ "9d745c2bca1bb314f986d540928e427ad4097c4a" ], "changed_files": [ "STATUS.md", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/api/networkClient.ts", "dashboard/src/lib/network.ts", "dashboard/tests/unit/networkLive.test.ts", "internal/certsource/certsource.go", "internal/controlapi/network.go", "internal/controlapi/network_integration_test.go", "internal/controlapi/network_test.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./... (via nix develop .#go-ci, pre-push gate)", "exit_code": 0 }, { "command": "go test ./internal/controlapi/ ./internal/certsource/ ./internal/monitor/ ./internal/heartbeat/", "exit_code": 0 }, { "command": "node scripts/generate-client.mjs --check (openapi client in sync)", "exit_code": 0 }, { "command": "vitest run (dashboard, 1071 tests incl networkLive)", "exit_code": 0 }, { "command": "vue-tsc -p tsconfig.json --noEmit (dashboard)", "exit_code": 0 } ], "criteria": { "story 45 — a single read returns the whole view (certs, address/name, port groups + lease, shape, observed-at) as a thin projection that re-derives nothing": "ProjectNetwork in internal/controlapi/network.go composes all three owners once; TestNetworkHandler_ProjectsTheWholeReadFromEveryOwner + TestProjectNetwork_SubdomainProjectsAllThreeOwners assert the whole view incl observed-at", "decisions — reports the deployment shape and per-section stated limits as content so one surface renders S1/S1f/S1o/S1p": "Network.Shape + NetworkAddress.StatedLimit + NetworkPorts.StatedLimit carried as content; TestProjectNetwork_OwnDomainStatesAddressLimitAndKeepsCertZone, _PrivatePathStatesBothLimits, _FirstRunNeverEmpty", "story 48 — an observation older than its cadence is marked aged; the surface computes no duration": "aged flags carried verbatim from monitor.FrontDoorObservation; TestProjectNetwork_AgedObservationCarriedNotComputed", "story 49 — the heartbeat Status() is projected (state, detail, last-pointed, pending, since), re-judged nowhere": "NetworkAddress projects heartbeat.Status verbatim; TestProjectNetwork_SubdomainProjectsAllThreeOwners + _StandingHeartbeatFaultSurvivesAnAgedRead", "story 47 — no available vantage: Ports is a stated limit, no open/closed/unknown-that-implies-a-check": "ProjectNetwork sets PortsNoVantageLimit + empty groups when !HasVantage; TestProjectNetwork_NoVantageStatesPortsLimitWithNoVerdicts + TestNetworkHandler_EmptyGroupsSerialiseAsArray", "story 19 — a lease genuinely held carries the reading; none held carries the honest no-lease posture": "NetworkLease.Held + Detail; TestProjectNetwork_LeasePresentThenAbsent", "story 23 — own-domain includes the certificate-zone port group as required; subdomain omits it": "groups projected verbatim from the probe; TestProjectNetwork_OwnDomainStatesAddressLimitAndKeepsCertZone + TestProjectNetwork_SubdomainOmitsCertZoneGroup", "story 38 — a standing repoint-failed fault survives a read gap (aged, with last-good), never reverted to a done check or bare unknown": "heartbeat holds the fault; ProjectNetwork projects it verbatim; TestProjectNetwork_StandingHeartbeatFaultSurvivesAnAgedRead", "story 50 — unauthenticated caller refused by the front-door auth gate with no fact disclosed; authenticated operator answers": "route rides /api/v1 admin surface behind WithAuthGate; TestNetworkRoute_UnauthenticatedRefusedDisclosingNothing (401, body discloses no network fact; operator gets 204 + the route answers)", "any owner fault maps to the shared Problem body": "registerNetwork uses writeReadErr → 500 Problem; TestNetworkHandler_OwnerFaultMapsToProblem" }, "summary": "The P11 Network read family: one GET /api/v1/network projecting the certificate source, the heartbeat Status() and the front-door probe (+ portmap lease) once, shape-aware not shape-branching, behind the existing auth gate, with its generated httpNetworkClient.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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#815
No description provided.