observability: transport-device-telemetry-detail — the per-device read on the SAME seam — facts, silence verdict, and a fault reported inside the payload #803

Closed
opened 2026-08-25 10:58:17 +00:00 by matou-build-agent · 2 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-device-telemetry-detail of docs/slices/observability.yaml; covers spec #769 stories 10–29 (wire half).

What to build

The drill-in's fuller record on the same grown Fleet seam, keyed by node id: the readings plus
temperature (nullable), heartbeat age, the pairing-time probed specs (CPU count, RAM, disk), the
services-on-this-device join (each service wearing monitoring's own chip), and — for the
last-known state — monitoring's silence verdict and the reference P5-S1x opens on.

The load-bearing decision here is that a telemetry fault is reported inside the payload, not as
a failed read
: for an online device whose collector faults, the per-device read returns
state: unavailable with the other facts populated, so the drill-in can render a partial state
with the health chip, heartbeat and services still true. A transport-level failure of the read
itself falls to the shared async guard's rendered error state. Two failures, two mechanisms,
deliberately.

Thin projection over the owners, re-deriving nothing; OpenAPI first, generated client, wire
snake_case camelised at the boundary.

Acceptance criteria

  • (stories 10–13) Given a per-device read for a reporting device, then it returns the readings, nullable temperature, heartbeat age and the pairing-time probed specs, with the sample timestamp and monitoring's named state.
  • (story 14) Given the same read, then it carries the services-on-this-device join, each service wearing monitoring's own chip — the seams' services truth, not container chips.
  • (story 21) Given a device in the last-known state, then the read carries monitoring's silence verdict verbatim and the reference P5-S1x opens on — this layer re-judges nothing.
  • (story 13) Given a device that reports no temperature sensor, then temperature is null and is reported as not-reported — never a fabricated value.
  • (story 27/28) Given an online device whose collector faults, then the read returns state: unavailable with the other facts populated — the fault is inside the payload, not a failed read.
  • (story 29) Given the read itself failing at transport, then it maps to the shared Problem body so the surface can render the shared error state — distinct from the in-payload unavailable.
  • Given the wire, then it stays snake_case and camelises at the client boundary, served by the generated client from the OpenAPI spec.

Blocked by

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

Task manifest

task: observability:transport-device-telemetry-detail
interface: the Fleet seam gains a per-device read keyed by node id returning readings + nullable temperature,
  heartbeat age, pairing-time probed specs, the services-on-this-device join with monitoring's chips,
  and (for `last-known`) monitoring's silence verdict and its P5-S1x reference
seam: 'the Fleet endpoint''s integration test grown for the per-device route (prior art `fleet_integration_test.go`,
  `fleetLive.test.ts`): each state''s payload, null temperature reported as not-reported, `state: unavailable`
  returned **with** the other facts populated, a transport fault mapping to the shared Problem body, and
  the generated client camelising the new fields'
acceptance:
- given: a reporting device
  when: the per-device read is served
  then: readings, temperature, heartbeat age, probed specs and the services join return with monitoring's
    named state
- given: a device in `last-known`
  when: the read is served
  then: monitoring's silence verdict and its P5-S1x reference are carried verbatim
- given: an online device whose collector faults
  when: the read is served
  then: '`state: unavailable` returns with the health, heartbeat and services facts still populated'
- given: the read failing at transport
  when: the handler answers
  then: the shared Problem body is returned — a different mechanism from the in-payload fault
- given: a device with no temperature sensor
  when: the read is served
  then: temperature is null and reported as not-reported, never fabricated
depends_on:
- monitor-node-readings
- shell:transport-fleet-live
out_of_scope:
- a second aggregating read — this is the same seam, keyed by node
- 'any classification: the state, the silence verdict and the chips are monitoring''s'
- history / series for the drill-in
- the surface itself (`shell-device-detail-drill-in`)
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-device-telemetry-detail` of `docs/slices/observability.yaml`; covers spec #769 stories 10–29 (wire half). ## What to build The drill-in's fuller record on the **same** grown Fleet seam, keyed by node id: the readings plus temperature (nullable), heartbeat age, the pairing-time probed specs (CPU count, RAM, disk), the services-on-this-device join (each service wearing monitoring's own chip), and — for the *last-known* state — monitoring's silence verdict and the reference P5-S1x opens on. The load-bearing decision here is that **a telemetry fault is reported inside the payload, not as a failed read**: for an online device whose collector faults, the per-device read returns `state: unavailable` with the other facts populated, so the drill-in can render a partial state with the health chip, heartbeat and services still true. A transport-level failure of the read itself falls to the shared async guard's rendered error state. Two failures, two mechanisms, deliberately. Thin projection over the owners, re-deriving nothing; OpenAPI first, generated client, wire snake_case camelised at the boundary. ## Acceptance criteria - [ ] (stories 10–13) Given a per-device read for a reporting device, then it returns the readings, nullable temperature, heartbeat age and the pairing-time probed specs, with the sample timestamp and monitoring's named state. - [ ] (story 14) Given the same read, then it carries the services-on-this-device join, each service wearing monitoring's own chip — the seams' services truth, not container chips. - [ ] (story 21) Given a device in the *last-known* state, then the read carries monitoring's silence verdict verbatim and the reference P5-S1x opens on — this layer re-judges nothing. - [ ] (story 13) Given a device that reports no temperature sensor, then temperature is null and is reported as not-reported — never a fabricated value. - [ ] (story 27/28) Given an online device whose collector faults, then the read returns `state: unavailable` **with the other facts populated** — the fault is inside the payload, not a failed read. - [ ] (story 29) Given the read itself failing at transport, then it maps to the shared Problem body so the surface can render the shared error state — distinct from the in-payload `unavailable`. - [ ] Given the wire, then it stays snake_case and camelises at the client boundary, served by the generated client from the OpenAPI spec. ## Blocked by - #800 — `observability:monitor-node-readings` - `shell:transport-fleet-live` (#152 — done, satisfied) ## Task manifest ```yaml task: observability:transport-device-telemetry-detail interface: the Fleet seam gains a per-device read keyed by node id returning readings + nullable temperature, heartbeat age, pairing-time probed specs, the services-on-this-device join with monitoring's chips, and (for `last-known`) monitoring's silence verdict and its P5-S1x reference seam: 'the Fleet endpoint''s integration test grown for the per-device route (prior art `fleet_integration_test.go`, `fleetLive.test.ts`): each state''s payload, null temperature reported as not-reported, `state: unavailable` returned **with** the other facts populated, a transport fault mapping to the shared Problem body, and the generated client camelising the new fields' acceptance: - given: a reporting device when: the per-device read is served then: readings, temperature, heartbeat age, probed specs and the services join return with monitoring's named state - given: a device in `last-known` when: the read is served then: monitoring's silence verdict and its P5-S1x reference are carried verbatim - given: an online device whose collector faults when: the read is served then: '`state: unavailable` returns with the health, heartbeat and services facts still populated' - given: the read failing at transport when: the handler answers then: the shared Problem body is returned — a different mechanism from the in-payload fault - given: a device with no temperature sensor when: the read is served then: temperature is null and reported as not-reported, never fabricated depends_on: - monitor-node-readings - shell:transport-fleet-live out_of_scope: - a second aggregating read — this is the same seam, keyed by node - 'any classification: the state, the silence verdict and the chips are monitoring''s' - history / series for the drill-in - the surface itself (`shell-device-detail-drill-in`) 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=10069
(automated multi-host claim — lowest live claim id works this ticket)

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

close-report for #803 — status success

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

envelope
{
  "issue": 803,
  "status": "success",
  "commits": [
    "eff9cde5a2f203ed91840182117538cbeef6eb4c"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/lib/api/deviceTelemetryClient.ts",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/deviceTelemetry.ts",
    "dashboard/tests/unit/deviceTelemetryLive.test.ts",
    "internal/controlapi/device_telemetry.go",
    "internal/controlapi/device_telemetry_integration_test.go",
    "packages/openapi-spec/openapi.yaml",
    "packages/openapi-spec/tests/unit/spec.test.ts"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go test ./internal/controlapi/ ./internal/monitor/",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "vitest run packages/openapi-spec/tests/unit/spec.test.ts",
      "exit_code": 0
    },
    {
      "command": "vitest run (dashboard full suite, 1077 passed)",
      "exit_code": 0
    },
    {
      "command": "vue-tsc --noEmit -p dashboard/tsconfig.json",
      "exit_code": 0
    },
    {
      "command": "eslint + prettier --check (new TS files)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(stories 10-13) per-device read returns readings, nullable temperature, heartbeat age and pairing-time probed specs with the sample timestamp and monitoring's named state": "DeviceTelemetry carries Readings(+temperature), Heartbeat, Specs(threads/mem_bytes/disk_bytes), SampledAt, Age and State (internal/controlapi/device_telemetry.go); TestDeviceTelemetry_ReportingDeviceCarriesReadingsFactsAndSpecs asserts all; deviceTelemetryLive camelize test confirms the client shape",
    "(story 14) services-on-this-device join, each service wearing monitoring's own chip (not container chips)": "registerDeviceTelemetry joins each DeviceServiceRef with svc.ServiceChip into DeviceServiceChip{service,label,chip}; TestDeviceTelemetry_ServicesJoinedWithMonitoringsChip asserts monitoring's chips verbatim",
    "(story 21) last-known carries monitoring's silence verdict verbatim and the P5-S1x reference; re-judges nothing": "view.Silence carried verbatim into DeviceTelemetry.Silence (reusing existing SilenceView schema); SilenceRef set to the device id only when Silence != nil; TestDeviceTelemetry_LastKnownCarriesSilenceVerdictAndReference asserts both",
    "(story 13) no temperature sensor -> temperature null, reported as not-reported, never fabricated": "NodeReadings.Temperature is *float64 omitempty; TestDeviceTelemetry_ReportingDeviceWithNoSensorCarriesNilTemperature asserts the wire OMITS temperature and it decodes nil; deviceTelemetryLive asserts undefined",
    "(story 27/28) online device whose collector faults -> state: unavailable WITH the other facts populated": "monitoring's view returns state=unavailable (found=true) while Facts/ServiceChip succeed, so the handler answers 200 with heartbeat/specs/services populated; TestDeviceTelemetry_CollectorFaultIsUnavailableInsideThePayload asserts 200 + populated facts",
    "(story 29) the read failing at transport -> shared Problem body, distinct from in-payload unavailable": "an owner error -> writeReadErr 500 Problem; an unknown device (ok=false) -> 404 unknown_device Problem; TestDeviceTelemetry_TransportFaultMapsToSharedProblem + TestDeviceTelemetry_UnknownDeviceIs404Problem assert both; deviceTelemetryLive asserts ControlPlaneError thrown on 500 and 404",
    "wire stays snake_case and camelises at the client boundary, served by the generated client": "openapi.yaml declares snake_case fields; generated getFleetTelemetry regenerated (check:client green); HttpDeviceTelemetryClient.load camelizes via wire.ts; deviceTelemetryLive asserts mem_bytes->memBytes, status_token->statusToken, silence_ref->silenceRef"
  },
  "summary": "Grew the Fleet seam with a per-device telemetry drill-in read keyed by node id — a thin projection over monitoring's per-device view and the fleet store's record, carrying the facts + silence verdict, with a collector fault reported inside the payload (state: unavailable) distinct from a transport failure mapping to the shared Problem body.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #803 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 803, "status": "success", "commits": [ "eff9cde5a2f203ed91840182117538cbeef6eb4c" ], "changed_files": [ "STATUS.md", "dashboard/src/lib/api/deviceTelemetryClient.ts", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/deviceTelemetry.ts", "dashboard/tests/unit/deviceTelemetryLive.test.ts", "internal/controlapi/device_telemetry.go", "internal/controlapi/device_telemetry_integration_test.go", "packages/openapi-spec/openapi.yaml", "packages/openapi-spec/tests/unit/spec.test.ts" ], "tests": [ { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./internal/controlapi/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go test ./internal/controlapi/ ./internal/monitor/", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "vitest run packages/openapi-spec/tests/unit/spec.test.ts", "exit_code": 0 }, { "command": "vitest run (dashboard full suite, 1077 passed)", "exit_code": 0 }, { "command": "vue-tsc --noEmit -p dashboard/tsconfig.json", "exit_code": 0 }, { "command": "eslint + prettier --check (new TS files)", "exit_code": 0 } ], "criteria": { "(stories 10-13) per-device read returns readings, nullable temperature, heartbeat age and pairing-time probed specs with the sample timestamp and monitoring's named state": "DeviceTelemetry carries Readings(+temperature), Heartbeat, Specs(threads/mem_bytes/disk_bytes), SampledAt, Age and State (internal/controlapi/device_telemetry.go); TestDeviceTelemetry_ReportingDeviceCarriesReadingsFactsAndSpecs asserts all; deviceTelemetryLive camelize test confirms the client shape", "(story 14) services-on-this-device join, each service wearing monitoring's own chip (not container chips)": "registerDeviceTelemetry joins each DeviceServiceRef with svc.ServiceChip into DeviceServiceChip{service,label,chip}; TestDeviceTelemetry_ServicesJoinedWithMonitoringsChip asserts monitoring's chips verbatim", "(story 21) last-known carries monitoring's silence verdict verbatim and the P5-S1x reference; re-judges nothing": "view.Silence carried verbatim into DeviceTelemetry.Silence (reusing existing SilenceView schema); SilenceRef set to the device id only when Silence != nil; TestDeviceTelemetry_LastKnownCarriesSilenceVerdictAndReference asserts both", "(story 13) no temperature sensor -> temperature null, reported as not-reported, never fabricated": "NodeReadings.Temperature is *float64 omitempty; TestDeviceTelemetry_ReportingDeviceWithNoSensorCarriesNilTemperature asserts the wire OMITS temperature and it decodes nil; deviceTelemetryLive asserts undefined", "(story 27/28) online device whose collector faults -> state: unavailable WITH the other facts populated": "monitoring's view returns state=unavailable (found=true) while Facts/ServiceChip succeed, so the handler answers 200 with heartbeat/specs/services populated; TestDeviceTelemetry_CollectorFaultIsUnavailableInsideThePayload asserts 200 + populated facts", "(story 29) the read failing at transport -> shared Problem body, distinct from in-payload unavailable": "an owner error -> writeReadErr 500 Problem; an unknown device (ok=false) -> 404 unknown_device Problem; TestDeviceTelemetry_TransportFaultMapsToSharedProblem + TestDeviceTelemetry_UnknownDeviceIs404Problem assert both; deviceTelemetryLive asserts ControlPlaneError thrown on 500 and 404", "wire stays snake_case and camelises at the client boundary, served by the generated client": "openapi.yaml declares snake_case fields; generated getFleetTelemetry regenerated (check:client green); HttpDeviceTelemetryClient.load camelizes via wire.ts; deviceTelemetryLive asserts mem_bytes->memBytes, status_token->statusToken, silence_ref->silenceRef" }, "summary": "Grew the Fleet seam with a per-device telemetry drill-in read keyed by node id — a thin projection over monitoring's per-device view and the fleet store's record, carrying the facts + silence verdict, with a collector fault reported inside the payload (state: unavailable) distinct from a transport failure mapping to the shared Problem body.", "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#803
No description provided.