Skip to content

arm_thermal collector registers on non-ARM hosts and populates last_nonempty_at without real data #20

Description

@zzallirog

Surfaced by PR #17 (last_nonempty_at per-collector visibility, v0.5.18).

Symptom

On a Ryzen 9 7940HS laptop (no ARM thermal zones present), /api/adapters returns:

{"name":"arm_thermal","discovered":true,"sample_us":0,"last_nonempty_at":1779610759.5733576,...}

discovered=true + last_nonempty_at populated = tile renders as "fast / fresh", indistinguishable from a real working collector. But there is no ARM thermal hardware on this host — the collector should either:

  1. Discover false — return False from discover() on hosts without ARM thermal zones (matches discover() invariant in adapters/collectors/CLAUDE.md).
  2. Sample empty — return {} from sample() so last_nonempty_at stays None, signalling "no data" via the very mechanism PR Track last non-empty adapter samples #17 introduced.

Currently it does neither: discover=True + non-empty sample() output, yet the underlying hardware is absent.

Where to look

  • coolstep/adapters/collectors/arm_thermal.pydiscover() predicate
  • coolstep/adapters/collectors/arm_thermal.pysample() return shape
  • Symmetric analogue: rapl.py:113-133 (correct pattern — registers but yields no values when energy_uj unreadable, last_nonempty_at stays None)

Acceptance

coolstep adapters and /api/adapters should distinguish "arm_thermal absent" from "arm_thermal present and contributing". Either gate at discover() (cleaner) or return empty sample() (less invasive). Pick whichever matches the project preference encoded in the rapl false-positive precedent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions