Skip to content

fix(firmware): isolate fresh MR60 radar delivery from raw CSI - #2528

Draft
proffesor-for-testing wants to merge 5 commits into
integration/ruv-main-reconcile-20261110from
fix/mr60-carrier-freshness-20261111
Draft

proffesor-for-testing wants to merge 5 commits into
integration/ruv-main-reconcile-20261110from
fix/mr60-carrier-freshness-20261111

Conversation

@proffesor-for-testing

@proffesor-for-testing proffesor-for-testing commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

The MR60BHA2 carrier reused one UDP destination for raw CSI and fused radar, and its cached UART fields could remain current indefinitely. This change makes the custom controller usable as a separate radar source without inserting its raw CSI into an existing RF learner.

  • Expire accepted presence/range/vital fields independently; unknown, malformed or nonfinite frames cannot renew freshness. Withhold snapshots whose missing presence/range cannot be represented honestly by the existing wire format. Keep upstream presence-byte semantics and recover on fresh UART data.
  • Add an explicit NVS-only csi_cfg U16 radar_port opt-in, inheriting target_ip. Absent/zero preserves legacy single-destination behavior. Invalid nonzero, wrong-type/unreadable keys and namespace-read failures block radar routing instead of silently falling back. No new HTTP/serial configuration authority is introduced.
  • Only the fresh MR60 fused branch may use the split destination. Validate exact 48-byte 0xC5110004, configured node ID/MR60 type, finite bounds and presence/count consistency; cap it at two datagrams/second. Invalid packets and send failures never fall back to bulk. Raw CSI, ordinary edge, sync and feature traffic retain the original destination. Server selection/privacy gates remain unchanged.

Stacked dependency: targets integration/ruv-main-reconcile-20261110 (#2513), containing the dedicated carrier profile from #2514. Main merge/release are outside this PR; it remains draft pending dependency and hosted review/CI.

Validation:

  • Production parser/clock, sender/socket-capture and NVS-loader tests cover expiry, malformed/nonfinite data, range withholding, absence/recovery, zero/reversed clocks, default routing, opt-in routing, unchanged packet bytes, identity/type, rate, invalid configuration and no fallback on send failures. ASan/UBSan executions pass; firmware host tests, configuration recovery, pin/antenna/onboarding checks and diff checks pass.
  • Dedicated XIAO ESP32-C6/MR60BHA2 4MB profile builds under ESP-IDF 6.0.2 with external antenna and mock disabled. The installed application is 1170784 bytes, SHA-256 b8a397360d36399e9fbf10bee96881f390156a1c023ea65b91a7b883f6ace6ba.
  • Explicitly authorized hardware test: preserve fresh full-flash/NVS backups, append only the new U16 entry with official ESP-IDF generator/parser integrity validation, verify all five written regions and independently read back the application byte-for-byte. The existing NVS entries remain unchanged.
  • Real boot/native USB identify MR60BHA2, node identity and split route. Direct LAN delivery reached the actual Mac app with NODE LIVE/current receive age while its four RF sources remained unchanged. A separate passive receiver observed raw CSI but zero fused packets on the private raw destination after readback. No Python relay or daemon is required or left running. No app/helper binary, room, selected model or RF source configuration was replaced.

Limits: the five-second UART expiry is an engineering fail-closed bound, not a manufacturer cadence guarantee or sensing qualification. A prior occupied-area-only control did not establish positive detection; empty/in-beam contrast, UART-disconnection recovery and clinical reference checks remain unexecuted. Transport/current source visibility is verified; detection and vital accuracy are not claimed. Private network settings, NVS images, device backups and biometric values are excluded from this PR.

CI bootstrap follow-up at 3cd433213fb2f14f33d0faee87645e6be53588c2:

  • QEMU and fuzz failed before tests during Ubuntu APT DNS resolution. Prepare QEMU from the digest-pinned official ESP-IDF v5.4 image, using the SDK's checksum-verified tool package instead of a floating upstream source build. Both consumers use that same pinned runtime image.
  • Use Ubuntu24.04's preinstalled Clang18/libFuzzer rather than installing a redundant APT meta-package. Execute the three production radar parser/sender/NVS regressions in the fuzz job.
  • Consumer steps, seven-case QEMU matrix, NVS assertions, 60-second fuzz budgets, sanitizers, crash checks and Swarm assertions are preserved. Action SHA pins are unchanged.
  • Executed the pinned container without network: SDK environment, QEMU9.0.0, ESP32-S3 machine and relocated artifact work. YAML parses; structural comparison confirms consumers/matrix/triggers remain intact. The three host radar probes pass. All current hosted checks now pass: 30 successful checks and two expected release-only skips, including both fuzz jobs, all seven QEMU configurations in both runs, both swarm tests, NVS matrix generation and firmware builds.
  • Local Mac fuzzing was not counted as passing: Xcode lacks libFuzzer, and Homebrew LLVM's ASan initialization deadlocked before main on macOS27. The owned attempt was stopped; stack evidence retained. Linux sanitizer settings/budgets remain unchanged.

This follow-up changes CI only; installed firmware/controller/app configuration is unchanged.

Parent CI synchronization at 5302592e6695bc1ae0a164c9ea6f19a8ef5a7a4c: merged parent repair dc6149f into this development branch, retaining the child radar regression step. The CI workflow conflict is resolved. firmware/ is byte-identical to the previously tested/flashed production tree; no reflash/app/helper change occurred. Fresh child CI on5302592e is now fully green; the earlier30-pass receipt remains a historical result at3cd43321. Draft status and the parent dependency remain.

@proffesor-for-testing proffesor-for-testing changed the title fix(firmware): expire stale radar fields before fused output fix(firmware): isolate fresh MR60 radar delivery from raw CSI Nov 11, 2026
@proffesor-for-testing

Copy link
Copy Markdown
Collaborator Author

Independent parent review at 372d68e89f07899d994ddec7b94f45859ee91d21: the scoped experimental transport/code path has no remaining evidence-backed blocker from this review. This remains a draft stacked on #2513; physical sensing qualification and hosted CI are separate.

Two fail-closed findings were fixed before the final flash: rejected nonzero split configuration previously could fall back to bulk; an unreadable NVS namespace previously could be treated as absent. Production sender/loader probes now cover both, preserving legacy behavior only for absent configuration or explicit zero. I independently executed run_mmwave_freshness, run_radar_fused_route and run_radar_nvs; all passed. Full host tests, sanitizers and the dedicated C6 build were also executed by the firmware worker.

Actual hardware/app outcome: final custom image SHA256 b8a397360d36399e9fbf10bee96881f390156a1c023ea65b91a7b883f6ace6ba passed five-region verification and independent app readback. Existing Mac1101/helper515a showed NODE LIVE from node60 with receive age0s, while the four RF nodes remained unchanged. Direct routing persists in the controller; no relay remains. The private raw receiver observed no fused packets on the raw port after the split.

This is transport and diagnostic evidence, not validated human detection or numeric vital accuracy. An earlier occupied-area window reported no positive presence; alignment/beam membership and empty contrast remain uncontrolled/unexecuted. No room/model selection or server privacy/selected-output policy was changed. No main merge/release occurred.

@proffesor-for-testing

Copy link
Copy Markdown
Collaborator Author

CI repaired at 3cd433213fb2f14f33d0faee87645e6be53588c2: 30 successful checks, two expected release-only skips, no failing or pending checks.

The original QEMU/fuzz failures were Ubuntu APT DNS errors before test execution. The workflow now uses the digest-pinned official ESP-IDF v5.4 image's QEMU package/runtime and the Ubuntu24.04 runner's preinstalled Clang18. This removes both failing APT setup steps and the floating QEMU source build. The QEMU matrix, consumer commands, NVS assertions, fuzz budgets, sanitizers, crash checks and swarm assertions are preserved. The three production radar regression probes also execute in the fuzz job.

Executed: offline pinned-container setup, ESP32-S3 machine and artifact relocation; YAML/structural comparison; hosted Linux fuzz and regression jobs; all QEMU cases and both swarm runs; firmware builds. Local Mac fuzzing was not counted as passing because its sanitizer runtime hung before main; the owned process was stopped and diagnostic evidence preserved.

This commit changes only .github/workflows/firmware-qemu.yml; firmware/ is byte-identical to the installed-image source at372d68e8. No device flash, app/helper change or merge occurred. Draft status and the #2513 dependency remain unchanged.

@proffesor-for-testing proffesor-for-testing left a comment •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NO BLOCK in the bounded MR60 freshness/split-delivery code at 5302592. This is a Codex source/test COMMENT, not independent human approval or physical sensing qualification.

EXECUTED today: make run_mmwave_freshness run_radar_fused_route run_radar_nvs passes against production parser/sender/NVS code. Probes cover UART silence, independent field expiry, malformed/range-invalid frames, absence/recovery and clock boundaries; exact fused packet identity, source/port/rate bounds, no raw fallback on split-route failure; and default/explicit/invalid/wrong-type NVS intent.

STATIC: field timestamps advance only on accepted data; absence clears prior rate/distance authority. Split routing requires an explicit distinct nonprivileged port and a validated48-byte MR60 packet; raw CSI keeps its configured destination. No valid-looking fallback is fabricated on failure. Default route behavior remains compatible.

Current hosted checks:19 pass, two expected release-only skips. Parent#2513 remains a separate CI/review dependency; no merge is performed by this review. Mobile#252 explanations/quality arithmetic are being repaired separately and do not change firmware or sensing thresholds.

Limits: prior controller flash/readback and live delivery establish transport only. The earlier occupied0/43 window remains counterevidence; later positive traffic does not replace controlled occupied/empty comparison. No flash, Wi-Fi/NVS change, app/helper replacement, room capture or clinical/accuracy validation performed today. Exact next gate: parent/human review and controlled physical conditions before a sensing-validation claim.

November12 follow-up: the operator confirmed power-only radar data delivery in BOTH Mac and phone apps. Passive mDNS independently shows the C6/controller on Wi-Fi and the configured receiver address matches this Mac. This supersedes today's earlier transport-silent observation. No agent-side reset/flash/configuration write; exact binary was not re-read today. It does not close the controlled occupied/empty sensing check.

This branch has not been deployed

No deployments
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.

1 participant