Skip to content

M2c follow-ups: tier-typo warning, uint128 test, NVMe fixtures, stale _total comment #3

Description

@KeiaiLab-PHIL

Non-blocking follow-ups triaged as acceptable by the M2c whole-branch review (2026-07-18):

  • slog.Warn on unrecognized tiercmd/nodevitals/main.go silently falls to core for any non-smart tier (e.g. a tier: smrt typo in a hand-written config → smart→core downgrade with no warning). The deployed path is safe (chart hardcodes the tier literal), but a slog.Warn("unrecognized tier, defaulting to core", "tier", cfg.Tier) guarded by Tier != "" && Tier != "core" is a cheap nicety (also future-proofs tier: gpu on a non-gpu build).
  • linux test for uint128ToFloat64internal/collector/smart_probe_linux.go's Uint128→float64 fold is pure but lives behind //go:build linux (it takes anatol's smart.Uint128, which can't compile on darwin), so it's untested on the macOS dev path. Add a //go:build linux _test.go covering the high-word fold.
  • distinct NVMe fixture values — the NVMe collector tests set MediaErrors: 0 and CriticalWarning: 0 identically, so a hypothetical swap between those two mappings wouldn't be caught (mapping verified correct by reading). Give them distinct nonzero values (e.g. 7, 4).
  • stale KindCounter commentinternal/model/model.go:21 says counter names "carry a `_total` suffix," but the sink emits nodevitals_hw_<metric> for both kinds (the _total lives in the collector's metric name per the Expose cumulative counters as Prometheus counters (_total naming) before first tagged release #1 native-naming contract). Fix the comment to match.

Also relevant: event-engine delta/"surge" rule type — the SMART design's ideal events (smart_reallocated_surge, delta-based) can't be expressed by the current threshold-on-value engine, so M2c ships nonzero-threshold rules instead (covers most pre-failure signals). A real delta/rate rule type is a separate engine-extension track.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions