Skip to content

Desk instruments: healthy-frame RF window (RS-11.6) + tile-age telemetry closes RS-6.1 - #95

Merged
dorkmo merged 2 commits into
mainfrom
desk-instruments-rs116-rs61
Aug 2, 2026
Merged

Desk instruments: healthy-frame RF window (RS-11.6) + tile-age telemetry closes RS-6.1#95
dorkmo merged 2 commits into
mainfrom
desk-instruments-rs116-rs61

Conversation

@dorkmo

@dorkmo dorkmo commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Two host-side items done at the desk ahead of tomorrow's antenna swap — no bench time used, and the first one directly instruments the swap session.

Healthy-frame RSSI/SNR window (the RS-11.5 closure's missing instrument)

image_rx_daemon now accumulates per-fragment RSSI/SNR from every good RX_FRAME and logs a windowed summary in the 10 s stats block:

rx_rf: n=196 rssi[min/med/max]=-71/-63/-52 snr[min/med/max]=3.2/8.1/9.8

Until now only corrupt packets carried visible RF numbers (via crc_dump), so the healthy population's SNR margin was unmeasurable — exactly the gap flagged in the RS-11.5 close-out. Tomorrow's antenna re-baseline (RS-11.6) gets both distributions from the same run.

RS-6.1 closed: per-tile staleness visible end to end

The audit found most of RS-6.1 had already landed with F10: per-tile age_ms rides /ws/state to the operator browser (server-authoritative, per IMAGE_PIPELINE §6.1), and the diag-gated staleness_overlay.js renders the age veil. The genuinely missing piece was the archivable aggregate for K-phase exit scoring, now published every stale-scan tick on lifetrac/v25/status/tile_age:

{"ts_ms":…,"n_tiles":96,"missing":0,"p50_ms":4900,"p95_ms":9200,"max_ms":9600,"stale":0,"stale_after_ms":30000}

Published even when nothing is stale — a healthy link's p95 age is the sweep-rotation measurement the K1/K2 exit tests need. Residual noted in the TODO: the overlay's 1 s/5 s thresholds predate the sweep-rotation insight; tune when K1 sets a real staleness SLA.

Tests

9 new (RF-window accumulation/None-handling via the established stub-binding pattern; age-summary percentiles, missing-tile accounting, pre-keyframe None). Full suite: 1109 passed / 2446 subtests.

🤖 Generated with Claude Code

…telemetry (RS-6.1)

Two desk-work items ahead of the antenna swap:

- image_rx_daemon: windowed HEALTHY-population RSSI/SNR, summarized in
  the 10 s stats block as "rx_rf: n rssi[min/med/max] snr[min/med/max]"
  and reset per window. Until now only corrupt packets carried visible
  RF numbers (crc_dump) — the good-frame SNR margin was unmeasurable,
  flagged as the missing instrument in the RS-11.5 closure. Tomorrow's
  antenna legs get both distributions.

- web_ui: RS-6.1 aggregate tile-age telemetry on
  lifetrac/v25/status/tile_age every stale-scan tick: {n_tiles, missing,
  p50/p95/max age, stale count}. Audit found the rest of RS-6.1 had
  landed with F10 (per-tile age_ms on /ws/state; diag-gated
  staleness_overlay.js renders it) — this adds the archivable aggregate
  the K-phase exit tests score against; published even when quiet since
  a healthy link's p95 age IS the sweep-rotation measurement.

9 new tests (RF window semantics; age summary percentiles, missing-tile
accounting, pre-keyframe None). Suite 1109/2446.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 2, 2026 23:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds host-side instrumentation to better quantify RF link quality during healthy frame reception and to make per-tile staleness telemetry archivable for K-phase exit scoring.

Changes:

  • Accumulate per-fragment RSSI/SNR for healthy RX frames and log min/median/max each 10s stats window.
  • Publish an aggregate per-tile age summary (lifetrac/v25/status/tile_age) every stale-scan tick, including percentiles and missing-tile accounting.
  • Add unit tests covering RF window accumulation/None-handling and tile-age summary behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
LifeTrac-v25/DESIGN-CONTROLLER/TODO.md Marks RS-6.1 as completed and documents the end-to-end staleness visibility + new aggregate metric.
LifeTrac-v25/DESIGN-CONTROLLER/base_station/web_ui.py Adds MQTT-published aggregate tile-age telemetry and a pure summarizer helper.
LifeTrac-v25/DESIGN-CONTROLLER/base_station/tests/test_tile_stale.py Adds tests validating tile-age summary percentiles, missing-tile handling, and pre-keyframe behavior.
LifeTrac-v25/DESIGN-CONTROLLER/base_station/tests/test_rx_rf_stats.py Adds tests for healthy-frame RF window accumulation and None-handling.
LifeTrac-v25/DESIGN-CONTROLLER/base_station/image_rx_daemon.py Records healthy-frame RF samples and emits windowed RF distribution logs in the stats worker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1609 to +1620
rf_rssi = getattr(self, "_rf_rssi", None)
if rf_rssi:
rf_snr = self._rf_snr
r = sorted(rf_rssi)
s = sorted(rf_snr) if rf_snr else [0.0]
LOG.info(
"rx_rf: n=%d rssi[min/med/max]=%d/%d/%d "
"snr[min/med/max]=%.1f/%.1f/%.1f",
len(r), r[0], r[len(r) // 2], r[-1],
s[0], s[len(s) // 2], s[-1])
self._rf_rssi = []
self._rf_snr = []
…samples

Copilot's catch, valid on both points: an SNR-only window (pre-F8
frames can yield None on either axis independently) never triggered the
summary — so _rf_snr grew unbounded across windows — and an RSSI-only
window logged a fabricated 0.0 SNR from the placeholder. The stats
block now gates on EITHER list, reports per-axis counts, formats a
missing axis as "None", and always resets both. New test pins the
single-axis accumulation. Suite 1110/2446.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dorkmo
dorkmo merged commit 835bfbc into main Aug 2, 2026
10 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants