observability: transport-fleet-telemetry — the Fleet aggregating read grows readings and state — no second telemetry source #801

Closed
opened 2026-08-25 10:58:09 +00:00 by matou-build-agent · 3 comments

Parent

Feature spec: #769 — control-panel observability child spec: device telemetry (P9) (DDR 0202).
Design ticket #759; slice-map fan-in #770; wayfinder map #7.
Slice transport-fleet-telemetry of docs/slices/observability.yaml; covers spec #769 stories 1–6 (wire half), 40.

What to build

The Fleet tab's one aggregating read grows; no TelemetrySource is minted. That is the
whole point: a row and a drill-in that read the same seam can never disagree (DDR 0155 §3).

The fleet node view gains nullable cpuPct / memPct / diskPct, a sampledAt timestamp and
the monitoring-computed telemetry state. Nullable is load-bearing — it is what makes —
structural rather than a rendering convention. The control-plane handler stays a thin projection
over the owners (fleet store × monitoring), re-deriving nothing and mapping faults to the shared
Problem body exactly as the existing Fleet route does. OpenAPI spec first (ADR 0037), generated
client as the transport (no hand-rolled fetch), wire snake_case camelised at the client boundary
(standards wire-snake-case, #126).

And the list is never refused because a reading is missing: if monitoring cannot produce readings
for some or all nodes, the aggregating read still returns the fleet with its health chips and null
telemetry (story 40) — one new signal cannot take the Fleet tab down.

Acceptance criteria

  • (story 2/decisions) Given the Fleet read, then it is the same seam that serves both the DF row and the P9 drill-in — no separately-fetched CPU/MEM/DISK number exists anywhere.
  • (story 1) Given the aggregating read, when it returns, then each fleet node view carries nullable cpuPct / memPct / diskPct, sampledAt and monitoring's computed telemetry state.
  • (story 39) Given a node with no readings, then the fields serialise null on the wire — never 0 — and the generated client camelises them intact.
  • (story 1) Given a gateway-alone fleet (the never-empty rule, DDR 0095), then the read still serialises structurally with row one present and its telemetry joined.
  • (story 40) Given monitoring cannot produce readings for some or all nodes, when the Fleet read is served, then it still returns the list with health chips and null telemetry — the list is never refused because a reading is missing.
  • Given an owner read that faults, then it maps to the shared Problem body, exactly as the existing Fleet route does.

Blocked by

  • #800 — observability:monitor-node-readings
  • shell:transport-fleet-live (#152 — done, satisfied)

Task manifest

task: observability:transport-fleet-telemetry
interface: '`FleetService` behind `GET /fleet` (and the dashboard''s `FleetSource.load()`) grows nullable
  `cpuPct` / `memPct` / `diskPct`, `sampledAt` and the monitoring-computed telemetry `state` on the fleet
  node view — the existing seam grown, not a new one'
seam: 'the Fleet endpoint''s integration test + the live client test (prior art `fleet_integration_test.go`,
  `fleetLive.test.ts`): new fields returned, a gateway-alone fleet still serialising structurally, a node
  with no readings serialising null (never `0`), an owner fault mapping to the shared Problem body, the
  generated client camelising the new fields, and a broken collector never refusing the list'
acceptance:
- given: a fleet whose nodes report readings
  when: the aggregating read is served
  then: each node view carries the readings, `sampledAt` and monitoring's telemetry state
- given: a node with no readings
  when: the read serialises
  then: the reading fields are null on the wire, never `0`
- given: a gateway-alone fleet
  when: the read serialises
  then: row one is present with its telemetry joined
- given: monitoring unable to produce any readings
  when: the Fleet read is served
  then: the list still returns with health chips and null telemetry
- given: an owner read that faults
  when: the handler answers
  then: the shared Problem body is returned
depends_on:
- monitor-node-readings
- shell:transport-fleet-live
out_of_scope:
- a separate `TelemetrySource` — explicitly rejected (DDR 0155 §3)
- 'the per-device read (its own slice: `transport-device-telemetry-detail`)'
- any dashboard rendering — the DF columns are `shell-fleet-telemetry-columns`
- hand-rolled fetch — the generated client is the transport (ADR 0037)
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: **#769** — control-panel observability child spec: device telemetry (P9) (DDR 0202). Design ticket #759; slice-map fan-in **#770**; wayfinder map #7. Slice `transport-fleet-telemetry` of `docs/slices/observability.yaml`; covers spec #769 stories 1–6 (wire half), 40. ## What to build The Fleet tab's **one** aggregating read grows; **no `TelemetrySource` is minted**. That is the whole point: a row and a drill-in that read the same seam can never disagree (DDR 0155 §3). The fleet node view gains nullable `cpuPct` / `memPct` / `diskPct`, a `sampledAt` timestamp and the monitoring-computed telemetry state. **Nullable is load-bearing** — it is what makes `—` structural rather than a rendering convention. The control-plane handler stays a thin projection over the owners (fleet store × monitoring), re-deriving nothing and mapping faults to the shared Problem body exactly as the existing Fleet route does. OpenAPI spec first (ADR 0037), generated client as the transport (no hand-rolled fetch), wire snake_case camelised at the client boundary (standards `wire-snake-case`, #126). And the list is never refused because a reading is missing: if monitoring cannot produce readings for some or all nodes, the aggregating read still returns the fleet with its health chips and null telemetry (story 40) — one new signal cannot take the Fleet tab down. ## Acceptance criteria - [ ] (story 2/decisions) Given the Fleet read, then it is the **same** seam that serves both the DF row and the P9 drill-in — no separately-fetched CPU/MEM/DISK number exists anywhere. - [ ] (story 1) Given the aggregating read, when it returns, then each fleet node view carries nullable `cpuPct` / `memPct` / `diskPct`, `sampledAt` and monitoring's computed telemetry state. - [ ] (story 39) Given a node with no readings, then the fields serialise **null** on the wire — never `0` — and the generated client camelises them intact. - [ ] (story 1) Given a gateway-alone fleet (the never-empty rule, DDR 0095), then the read still serialises structurally with row one present and its telemetry joined. - [ ] (story 40) Given monitoring cannot produce readings for some or all nodes, when the Fleet read is served, then it still returns the list with health chips and null telemetry — the list is never refused because a reading is missing. - [ ] Given an owner read that faults, then it maps to the shared Problem body, exactly as the existing Fleet route does. ## Blocked by - #800 — `observability:monitor-node-readings` - `shell:transport-fleet-live` (#152 — done, satisfied) ## Task manifest ```yaml task: observability:transport-fleet-telemetry interface: '`FleetService` behind `GET /fleet` (and the dashboard''s `FleetSource.load()`) grows nullable `cpuPct` / `memPct` / `diskPct`, `sampledAt` and the monitoring-computed telemetry `state` on the fleet node view — the existing seam grown, not a new one' seam: 'the Fleet endpoint''s integration test + the live client test (prior art `fleet_integration_test.go`, `fleetLive.test.ts`): new fields returned, a gateway-alone fleet still serialising structurally, a node with no readings serialising null (never `0`), an owner fault mapping to the shared Problem body, the generated client camelising the new fields, and a broken collector never refusing the list' acceptance: - given: a fleet whose nodes report readings when: the aggregating read is served then: each node view carries the readings, `sampledAt` and monitoring's telemetry state - given: a node with no readings when: the read serialises then: the reading fields are null on the wire, never `0` - given: a gateway-alone fleet when: the read serialises then: row one is present with its telemetry joined - given: monitoring unable to produce any readings when: the Fleet read is served then: the list still returns with health chips and null telemetry - given: an owner read that faults when: the handler answers then: the shared Problem body is returned depends_on: - monitor-node-readings - shell:transport-fleet-live out_of_scope: - a separate `TelemetrySource` — explicitly rejected (DDR 0155 §3) - 'the per-device read (its own slice: `transport-device-telemetry-detail`)' - any dashboard rendering — the DF columns are `shell-fleet-telemetry-columns` - hand-rolled fetch — the generated client is the transport (ADR 0037) 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=10077
(automated multi-host claim — lowest live claim id works this ticket)

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

close-report for #801 — status success

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

  • commit a8579b2 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/shell_surfaces.go' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/lib/api/generated.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/lib/fleet.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/tests/fakes/fleet.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/tests/unit/fleetLive.test.ts' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/fleet.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/fleet_integration_test.go' is not in the diff of the claimed commits
  • changed_files: 'packages/openapi-spec/openapi.yaml' is not in the diff of the claimed commits
  • changed_files: 'packages/openapi-spec/scripts/generate-client.mjs' is not in the diff of the claimed commits
envelope
{
  "issue": 801,
  "status": "success",
  "commits": [
    "a8579b2"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/shell_surfaces.go",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/fleet.ts",
    "dashboard/tests/fakes/fleet.ts",
    "dashboard/tests/unit/fleetLive.test.ts",
    "internal/controlapi/fleet.go",
    "internal/controlapi/fleet_integration_test.go",
    "packages/openapi-spec/openapi.yaml",
    "packages/openapi-spec/scripts/generate-client.mjs"
  ],
  "tests": [
    {
      "command": "go test ./internal/controlapi/ ./control-plane/... ./internal/monitor/",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./internal/controlapi/ ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "npx vitest run (dashboard, 1121 tests)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)",
      "exit_code": 0
    },
    {
      "command": "node scripts/generate-client.mjs --check (openapi-spec)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(story 2/decisions) same seam serves DF row and P9 drill-in — no separately-fetched CPU/MEM/DISK number": "FleetService.Telemetry() delegates to monitor.Orchestrator.Telemetry() — the SAME seam device_telemetry.go reads via NodeTelemetry; no TelemetrySource minted (internal/controlapi/fleet.go, shell_surfaces.go restingFleet.Telemetry)",
    "(story 1) each fleet node view carries nullable cpu/mem/disk, sampled_at and monitoring's telemetry state": "FleetNode grows CPUPct/MemPct/DiskPct/SampledAt/TelemetryState; TestFleetHandler_GrowsEachRowWithMonitoringsTelemetry proves rimu carries readings+stamp+state",
    "(story 39) fields serialise null on the wire — never 0 — and client camelises intact": "reading fields carry no omitempty (nil->null); TestFleetHandler_NoReadingsSerialiseNullNeverZero asserts wire literal null for matai; fleetLive.test.ts asserts matai.cpuPct/memPct/diskPct === null after camelise; openapi 3.1 [number,'null'] -> number|null in generated.ts",
    "(story 1) gateway-alone fleet still serialises structurally with row one present and telemetry joined": "TestFleetHandler_GatewayAloneSerialisesNodesAsEmptyArray extended: gateway telemetry state=reporting, cpu=12 joined when it stands alone",
    "(story 40) monitoring cannot produce readings -> list still returns with chips and null telemetry": "handler's readTelemetry tolerates the error (logs, empty map); TestFleetHandler_BrokenCollectorNeverRefusesTheList asserts 200 with whole list, chips present, telemetry null across every row",
    "owner read that faults maps to shared Problem body, exactly as existing Fleet route": "Gateway/Nodes/Chip faults still writeReadErr -> 500 Problem; TestFleetHandler_OwnerFaultMapsToProblem asserts the shared Problem body on a faulting owner read"
  },
  "summary": "Grew the ONE Fleet aggregating read to carry monitoring's nullable readings, sample stamp and computed telemetry state — same seam as the P9 drill-in, null-never-0 on the wire, and a telemetry fault never refuses the list.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #801 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit a8579b2 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/shell_surfaces.go' is not in the diff of the claimed commits - changed_files: 'dashboard/src/lib/api/generated.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/src/lib/fleet.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/tests/fakes/fleet.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/tests/unit/fleetLive.test.ts' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/fleet.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/fleet_integration_test.go' is not in the diff of the claimed commits - changed_files: 'packages/openapi-spec/openapi.yaml' is not in the diff of the claimed commits - changed_files: 'packages/openapi-spec/scripts/generate-client.mjs' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 801, "status": "success", "commits": [ "a8579b2" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/shell_surfaces.go", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/fleet.ts", "dashboard/tests/fakes/fleet.ts", "dashboard/tests/unit/fleetLive.test.ts", "internal/controlapi/fleet.go", "internal/controlapi/fleet_integration_test.go", "packages/openapi-spec/openapi.yaml", "packages/openapi-spec/scripts/generate-client.mjs" ], "tests": [ { "command": "go test ./internal/controlapi/ ./control-plane/... ./internal/monitor/", "exit_code": 0 }, { "command": "go build ./... && go vet ./internal/controlapi/ ./control-plane/...", "exit_code": 0 }, { "command": "npx vitest run (dashboard, 1121 tests)", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)", "exit_code": 0 }, { "command": "node scripts/generate-client.mjs --check (openapi-spec)", "exit_code": 0 } ], "criteria": { "(story 2/decisions) same seam serves DF row and P9 drill-in — no separately-fetched CPU/MEM/DISK number": "FleetService.Telemetry() delegates to monitor.Orchestrator.Telemetry() — the SAME seam device_telemetry.go reads via NodeTelemetry; no TelemetrySource minted (internal/controlapi/fleet.go, shell_surfaces.go restingFleet.Telemetry)", "(story 1) each fleet node view carries nullable cpu/mem/disk, sampled_at and monitoring's telemetry state": "FleetNode grows CPUPct/MemPct/DiskPct/SampledAt/TelemetryState; TestFleetHandler_GrowsEachRowWithMonitoringsTelemetry proves rimu carries readings+stamp+state", "(story 39) fields serialise null on the wire — never 0 — and client camelises intact": "reading fields carry no omitempty (nil->null); TestFleetHandler_NoReadingsSerialiseNullNeverZero asserts wire literal null for matai; fleetLive.test.ts asserts matai.cpuPct/memPct/diskPct === null after camelise; openapi 3.1 [number,'null'] -> number|null in generated.ts", "(story 1) gateway-alone fleet still serialises structurally with row one present and telemetry joined": "TestFleetHandler_GatewayAloneSerialisesNodesAsEmptyArray extended: gateway telemetry state=reporting, cpu=12 joined when it stands alone", "(story 40) monitoring cannot produce readings -> list still returns with chips and null telemetry": "handler's readTelemetry tolerates the error (logs, empty map); TestFleetHandler_BrokenCollectorNeverRefusesTheList asserts 200 with whole list, chips present, telemetry null across every row", "owner read that faults maps to shared Problem body, exactly as existing Fleet route": "Gateway/Nodes/Chip faults still writeReadErr -> 500 Problem; TestFleetHandler_OwnerFaultMapsToProblem asserts the shared Problem body on a faulting owner read" }, "summary": "Grew the ONE Fleet aggregating read to carry monitoring's nullable readings, sample stamp and computed telemetry state — same seam as the P9 drill-in, null-never-0 on the wire, and a telemetry fault never refuses the list.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Author
Member

close-report for #801 — status success

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

envelope
{
  "issue": 801,
  "status": "success",
  "commits": [
    "a8579b2"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/shell_surfaces.go",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/fleet.ts",
    "dashboard/tests/fakes/fleet.ts",
    "dashboard/tests/unit/fleetLive.test.ts",
    "internal/controlapi/fleet.go",
    "internal/controlapi/fleet_integration_test.go",
    "packages/openapi-spec/openapi.yaml",
    "packages/openapi-spec/scripts/generate-client.mjs"
  ],
  "tests": [
    {
      "command": "go test ./internal/controlapi/ ./control-plane/... ./internal/monitor/",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./internal/controlapi/ ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "npx vitest run (dashboard, 1121 tests)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)",
      "exit_code": 0
    },
    {
      "command": "node scripts/generate-client.mjs --check (openapi-spec)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(story 2/decisions) same seam serves DF row and P9 drill-in — no separately-fetched CPU/MEM/DISK number": "FleetService.Telemetry() delegates to monitor.Orchestrator.Telemetry() — the SAME seam device_telemetry.go reads via NodeTelemetry; no TelemetrySource minted (internal/controlapi/fleet.go, shell_surfaces.go restingFleet.Telemetry)",
    "(story 1) each fleet node view carries nullable cpu/mem/disk, sampled_at and monitoring's telemetry state": "FleetNode grows CPUPct/MemPct/DiskPct/SampledAt/TelemetryState; TestFleetHandler_GrowsEachRowWithMonitoringsTelemetry proves rimu carries readings+stamp+state",
    "(story 39) fields serialise null on the wire — never 0 — and client camelises intact": "reading fields carry no omitempty (nil->null); TestFleetHandler_NoReadingsSerialiseNullNeverZero asserts wire literal null for matai; fleetLive.test.ts asserts matai.cpuPct/memPct/diskPct === null after camelise; openapi 3.1 [number,'null'] -> number|null in generated.ts",
    "(story 1) gateway-alone fleet still serialises structurally with row one present and telemetry joined": "TestFleetHandler_GatewayAloneSerialisesNodesAsEmptyArray extended: gateway telemetry state=reporting, cpu=12 joined when it stands alone",
    "(story 40) monitoring cannot produce readings -> list still returns with chips and null telemetry": "handler's readTelemetry tolerates the error (logs, empty map); TestFleetHandler_BrokenCollectorNeverRefusesTheList asserts 200 with whole list, chips present, telemetry null across every row",
    "owner read that faults maps to shared Problem body, exactly as existing Fleet route": "Gateway/Nodes/Chip faults still writeReadErr -> 500 Problem; TestFleetHandler_OwnerFaultMapsToProblem asserts the shared Problem body on a faulting owner read"
  },
  "summary": "Grew the ONE Fleet aggregating read to carry monitoring's nullable readings, sample stamp and computed telemetry state — same seam as the P9 drill-in, null-never-0 on the wire, and a telemetry fault never refuses the list.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #801 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 801, "status": "success", "commits": [ "a8579b2" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/shell_surfaces.go", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/fleet.ts", "dashboard/tests/fakes/fleet.ts", "dashboard/tests/unit/fleetLive.test.ts", "internal/controlapi/fleet.go", "internal/controlapi/fleet_integration_test.go", "packages/openapi-spec/openapi.yaml", "packages/openapi-spec/scripts/generate-client.mjs" ], "tests": [ { "command": "go test ./internal/controlapi/ ./control-plane/... ./internal/monitor/", "exit_code": 0 }, { "command": "go build ./... && go vet ./internal/controlapi/ ./control-plane/...", "exit_code": 0 }, { "command": "npx vitest run (dashboard, 1121 tests)", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)", "exit_code": 0 }, { "command": "node scripts/generate-client.mjs --check (openapi-spec)", "exit_code": 0 } ], "criteria": { "(story 2/decisions) same seam serves DF row and P9 drill-in — no separately-fetched CPU/MEM/DISK number": "FleetService.Telemetry() delegates to monitor.Orchestrator.Telemetry() — the SAME seam device_telemetry.go reads via NodeTelemetry; no TelemetrySource minted (internal/controlapi/fleet.go, shell_surfaces.go restingFleet.Telemetry)", "(story 1) each fleet node view carries nullable cpu/mem/disk, sampled_at and monitoring's telemetry state": "FleetNode grows CPUPct/MemPct/DiskPct/SampledAt/TelemetryState; TestFleetHandler_GrowsEachRowWithMonitoringsTelemetry proves rimu carries readings+stamp+state", "(story 39) fields serialise null on the wire — never 0 — and client camelises intact": "reading fields carry no omitempty (nil->null); TestFleetHandler_NoReadingsSerialiseNullNeverZero asserts wire literal null for matai; fleetLive.test.ts asserts matai.cpuPct/memPct/diskPct === null after camelise; openapi 3.1 [number,'null'] -> number|null in generated.ts", "(story 1) gateway-alone fleet still serialises structurally with row one present and telemetry joined": "TestFleetHandler_GatewayAloneSerialisesNodesAsEmptyArray extended: gateway telemetry state=reporting, cpu=12 joined when it stands alone", "(story 40) monitoring cannot produce readings -> list still returns with chips and null telemetry": "handler's readTelemetry tolerates the error (logs, empty map); TestFleetHandler_BrokenCollectorNeverRefusesTheList asserts 200 with whole list, chips present, telemetry null across every row", "owner read that faults maps to shared Problem body, exactly as existing Fleet route": "Gateway/Nodes/Chip faults still writeReadErr -> 500 Problem; TestFleetHandler_OwnerFaultMapsToProblem asserts the shared Problem body on a faulting owner read" }, "summary": "Grew the ONE Fleet aggregating read to carry monitoring's nullable readings, sample stamp and computed telemetry state — same seam as the P9 drill-in, null-never-0 on the wire, and a telemetry fault never refuses the list.", "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#801
No description provided.