Repository navigation
fix(pause): PAUSE takes the decoys off the air instead of freezing them on it - #19
Merged
Merged
Conversation
…em on it churn_tick returned before the lifecycle while paused, so the four BLE advertising slots kept transmitting the same addresses for as long as the fleet stayed paused: an indefinitely long-lived identifier, the exact thing ADDR_MAX_ONAIR_MS exists to prevent. The console meanwhile said DARK. Now PAUSE is silent: - churn: the first paused tick stops every advertising instance (new churn_stop_fn, churn_adv_stop in production) and forgets each slot's occupant, so resume re-applies all of them. The stop runs inside churn_tick, on the task that owns the slots, not in the setter. - The lifecycle keeps running underneath, so identities still die on schedule and the crowd that returns is a current one, never an address carried across the pause. - coexist: probe bursts (2.4 GHz and the 5 GHz excursion) are skipped while paused; agents, personas and MAC rotation keep their schedule. The standalone probe_task honours it too. - The ESP-NOW control link stays up on purpose: it is how the Vigil sees a paused node and sends RESUME. Self-test rewritten for the new contract (stop all, once per pause; no applies while paused; no address survives a >15 min pause; resume re-applies every slot). Ran the same checks on the host against the real churn.c/ble_devices.c: all pass. C6 self-test and C5 production images build. Not yet run on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
As requested: PAUSE now stops all decoy signals instead of holding the crowd as it was.
The bug
churn_tickreturned before the lifecycle while paused, so the four BLE advertising slots kept transmitting the same addresses for as long as the fleet stayed paused. That's an indefinitely long-lived identifier, exactly whatADDR_MAX_ONAIR_MSexists to prevent. Meanwhile the Vigil showedDARK.The fix
churn_set_stop/churn_adv_stop) and forgets each slot's occupant, so resume re-applies all four. The stop runs insidechurn_tick, on the task that owns the slots.probe_taskhonours it too.DARK) and sends RESUME. Silencing it too would make a paused fleet unrecoverable without a power cycle. Easy to change if you want it fully dark.README and CHANGELOG updated to match.
Verification
test_churn_pause) rewritten for the new contract. C6CHURN_SELFTEST=1image builds (IDF 5.4).churn.c+ble_devices.c+phantom.c: stop all 4 once per pause, zero applies while paused, 0 of 8 addresses survive a >15 min pause, resume re-applies all 4 slots.🤖 Generated with Claude Code