Repository navigation
Conversation
clonea1
pushed a commit
to clonea1/RuView
that referenced
this pull request
Sep 24, 2026
Cherry-pick 47731d0: edge_processing.c:1226 still gated calibration_update() on `!s_calibrated`, which made the leaky-minimum floor tracker dead code the moment warm-up finished (EDGE_CALIB_FRAMES, ~60s). The floor stayed frozen at whatever the seeding window averaged -- exactly the boot-only behaviour the tracker was written to replace. This is the same bug already fixed and fleet-deployed on fix/port-node-log-to-fleet; ruvnet#1821 was a stale copy that predates the fix (docs/DESIGN-G3-calibration-free.md §3, BACKLOG row 127). Adds a host test (tests/host/test_edge_calibration_floor.c) mirroring the guard and calibration_update() against edge_processing.h's real EDGE_CALIB_FRAMES/EDGE_FLOOR_LEAK/EDGE_FLOOR_MULT constants, since edge_processing.c itself isn't host-linkable (FreeRTOS/esp_log/ esp_timer/nvs_config/csi_collector/mmwave_sensor/wasm_runtime/ stream_sender). Positive case proves the floor descends after warm-up once motion drops; negative control replays the same scenario with the pre-fix guard and asserts the floor stays bit-identical to its warm-up-seeded value, reproducing the dead-code symptom. Manually verified the negative-control assertions fail if the fixed guard is swapped for the buggy one in the positive test, confirming the harness is actually sensitive to this bug. make check: 5/5 binaries, 65 assertions, 0 failed. Co-Authored-By: claude-flow <ruv@ruv.net>
clonea1
force-pushed
the
contrib/adaptive-floor
branch
from
September 24, 2026 13:51
1909d97 to
cb08575
Compare
clonea1
pushed a commit
to clonea1/RuView
that referenced
this pull request
Oct 10, 2026
Cherry-pick 47731d0: edge_processing.c:1226 still gated calibration_update() on `!s_calibrated`, which made the leaky-minimum floor tracker dead code the moment warm-up finished (EDGE_CALIB_FRAMES, ~60s). The floor stayed frozen at whatever the seeding window averaged -- exactly the boot-only behaviour the tracker was written to replace. This is the same bug already fixed and fleet-deployed on fix/port-node-log-to-fleet; ruvnet#1821 was a stale copy that predates the fix (docs/DESIGN-G3-calibration-free.md §3, BACKLOG row 127). Adds a host test (tests/host/test_edge_calibration_floor.c) mirroring the guard and calibration_update() against edge_processing.h's real EDGE_CALIB_FRAMES/EDGE_FLOOR_LEAK/EDGE_FLOOR_MULT constants, since edge_processing.c itself isn't host-linkable (FreeRTOS/esp_log/ esp_timer/nvs_config/csi_collector/mmwave_sensor/wasm_runtime/ stream_sender). Positive case proves the floor descends after warm-up once motion drops; negative control replays the same scenario with the pre-fix guard and asserts the floor stays bit-identical to its warm-up-seeded value, reproducing the dead-code symptom. Manually verified the negative-control assertions fail if the fixed guard is swapped for the buggy one in the positive test, confirming the harness is actually sensitive to this bug. make check: 5/5 binaries, 65 assertions, 0 failed. Co-Authored-By: claude-flow <ruv@ruv.net>
clonea1
force-pushed
the
contrib/adaptive-floor
branch
from
October 10, 2026 05:16
cb08575 to
58d892c
Compare
… at boot
calibration_update() averages the first EDGE_CALIB_FRAMES frames and latches
the result for the lifetime of the boot. That cannot be made to work: the node
is calibrating in the seconds right after a human walked over and plugged it
in, so the window is contaminated by construction, and nobody can leave a room
fast enough to fix it. Whatever the room looked like during that one minute
becomes "normal" permanently, and a node commissioned during a busy afternoon
stays desensitised for weeks.
A leaky minimum needs no clean room and no cooperation. It drops instantly to
any new low, so it finds the quiet by itself whenever quiet next happens --
minutes after a bad start rather than never. It climbs only slowly, so a
genuine change in the room is eventually adopted while a person standing still
for a while is not mistaken for the new floor.
if (motion < s_floor) s_floor = motion; /* descend at once */
else s_floor *= EDGE_FLOOR_LEAK;
The warm-up is kept, but only to seed a plausible starting value rather than to
latch one.
Measured support for the shape, on a nine-node ESP32-C6 fleet: the room's true
floor sits about 14x below where household animals register, and the settling
period after human activity runs a couple of hours. A tracker that descends to
real quiet and climbs at well under a percent a minute resolves that; an
average over one arbitrary minute cannot.
Separated by hand from a larger local change rather than cherry-picked -- the
same file also carries 256-bin HE20 subcarrier support and a vitals-slots
packet, which are unrelated and are not included here.
Co-Authored-By: claude-flow <ruv@ruv.net>
Cherry-pick 47731d0: edge_processing.c:1226 still gated calibration_update() on `!s_calibrated`, which made the leaky-minimum floor tracker dead code the moment warm-up finished (EDGE_CALIB_FRAMES, ~60s). The floor stayed frozen at whatever the seeding window averaged -- exactly the boot-only behaviour the tracker was written to replace. This is the same bug already fixed and fleet-deployed on fix/port-node-log-to-fleet; ruvnet#1821 was a stale copy that predates the fix (docs/DESIGN-G3-calibration-free.md §3, BACKLOG row 127). Adds a host test (tests/host/test_edge_calibration_floor.c) mirroring the guard and calibration_update() against edge_processing.h's real EDGE_CALIB_FRAMES/EDGE_FLOOR_LEAK/EDGE_FLOOR_MULT constants, since edge_processing.c itself isn't host-linkable (FreeRTOS/esp_log/ esp_timer/nvs_config/csi_collector/mmwave_sensor/wasm_runtime/ stream_sender). Positive case proves the floor descends after warm-up once motion drops; negative control replays the same scenario with the pre-fix guard and asserts the floor stays bit-identical to its warm-up-seeded value, reproducing the dead-code symptom. Manually verified the negative-control assertions fail if the fixed guard is swapped for the buggy one in the positive test, confirming the harness is actually sensitive to this bug. make check: 5/5 binaries, 65 assertions, 0 failed. Co-Authored-By: claude-flow <ruv@ruv.net>
clonea1
force-pushed
the
contrib/adaptive-floor
branch
from
October 10, 2026 21:15
58d892c to
b9c59fc
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
calibration_update() averages the first EDGE_CALIB_FRAMES frames and latches
the result for the lifetime of the boot. That cannot be made to work: the node
is calibrating in the seconds right after a human walked over and plugged it
in, so the window is contaminated by construction, and nobody can leave a room
fast enough to fix it. Whatever the room looked like during that one minute
becomes "normal" permanently, and a node commissioned during a busy afternoon
stays desensitised for weeks.
A leaky minimum needs no clean room and no cooperation. It drops instantly to
any new low, so it finds the quiet by itself whenever quiet next happens --
minutes after a bad start rather than never. It climbs only slowly, so a
genuine change in the room is eventually adopted while a person standing still
for a while is not mistaken for the new floor.
The warm-up is kept, but only to seed a plausible starting value rather than to
latch one.
Measured support for the shape, on a nine-node ESP32-C6 fleet: the room's true
floor sits about 14x below where household animals register, and the settling
period after human activity runs a couple of hours. A tracker that descends to
real quiet and climbs at well under a percent a minute resolves that; an
average over one arbitrary minute cannot.
Separated by hand from a larger local change rather than cherry-picked -- the
same file also carries 256-bin HE20 subcarrier support and a vitals-slots
packet, which are unrelated and are not included here.
Rebased onto current
mainbefore opening: staged before today's seven merges, so it needed replaying to avoid reading as a revert of them. Clean rebase, no files deleted.