Skip to content

fix(position): halve the stationary/fixed-position broadcast floor to 6h - #11606

Merged
thebentern merged 1 commit into
developfrom
fix/stationary-position-floor-6h
Aug 25, 2026
Merged

fix(position): halve the stationary/fixed-position broadcast floor to 6h#11606
thebentern merged 1 commit into
developfrom
fix/stationary-position-floor-6h

Conversation

@thebentern

@thebentern thebentern commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

12 hours was too aggressive.

The stationary/fixed-position broadcast floor added in #10706 means a fixed_position node (or any node that hasn't moved beyond the broadcast precision) sends once at boot and then goes silent for half a day. Anything that missed that one packet — a node that joined the mesh later, or one that rebooted — shows it with no position until the next refresh. Two reports of exactly that shape: #11198 and #11547.

Changes

Constant Before After
default_position_stationary_broadcast_secs 12 h 6 h
default_traffic_mgmt_position_min_interval_secs 11 h 5 h

The two move together on purpose. The dedup window was sized just under the broadcast floor so a stationary node's periodic refresh clears its neighbours' window instead of being dropped as a duplicate. Halving only the floor would have left every second broadcast landing inside an 11 h dedup window — aired on the channel, then dropped by every receiver in shouldDropPosition() before it reached NodeDB or the phone. Same effective refresh rate as today, double the airtime. So the dedup window comes down with it and keeps the same 1 h margin.

Role caps are untouched and still bind, since both are shorter than the new 5 h default:

  • TRACKER / TAK_TRACKER — 1 h
  • LOST_AND_FOUND — 15 min

Cache sizing stays comfortably inside its bounds at the new value: the dedup window is 50 pos-ticks (6 min/tick, uint8 period 25.6 h) and the entry TTL is 200 ticks ≈ 20 h.

Not changed

  • Configured position_broadcast_secs — the floor still only raises intervals shorter than itself, and a configured interval already longer than 6 h still wins.
  • Smart broadcast — a real move still goes out early, unchanged.
  • The 12 hr / 6 hr presets in the on-device menus. Those are user-selectable values for the configured interval, not this floor.

Testing

test_traffic_management and test_position_module both green — 101 test cases. The dedup tests reference the default symbolically, so they follow the new value; comments citing "11 h" updated to match.

Refs #11198, #11547

Summary by CodeRabbit

  • Improvements
    • Reduced the default stationary position broadcast interval from 12 hours to 6 hours.
    • Reduced the default position deduplication interval from 11 hours to 5 hours.
    • Updated tracker and lost-device handling to reflect the revised timing defaults while preserving their shorter interval caps.
  • Tests
    • Updated traffic-management tests to verify the new 5-hour baseline and existing role-specific limits.

The 12h floor introduced with traffic management was too aggressive: a
fixed_position or stationary node goes quiet for half a day after its
boot broadcast, so anything that missed that one packet - a node that
joined later, or one that restarted - shows it with no position until
the next refresh.

Drop the floor to 6h, and drop the traffic-management identical-position
dedup window from 11h to 5h with it. The two are a pair: the dedup window
was deliberately sized just under the broadcast floor so a stationary
node's periodic refresh clears its neighbours' window instead of being
dropped as a duplicate. Leaving it at 11h would have made the extra
broadcast pure airtime - aired, then discarded by every receiver - so the
mesh would still have seen a 12h refresh.

Role caps are unchanged and still bind: tracker 1h, lost-and-found 15m.
Both remain shorter than the new 5h default, so those exceptions apply
exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Note

Building this pull request… the flash button, badges and supported-board
list will appear here automatically once CI finishes.

@thebentern thebentern added the enhancement New feature or request label Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fd628311-e230-43b9-9ff7-3c45c88256ff

📥 Commits

Reviewing files that changed from the base of the PR and between 7b00048 and 5b5b29c.

📒 Files selected for processing (5)
  • src/mesh/Default.h
  • src/mesh/NodeDB.cpp
  • src/modules/PositionModule.cpp
  • src/modules/TrafficManagementModule.cpp
  • test/test_traffic_management/test_main.cpp

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The default stationary broadcast interval changes from 12 hours to 6 hours. The traffic-management position interval changes from 11 hours to 5 hours. Related comments and test descriptions are updated to match these values.

Changes

Position and traffic-management interval updates

Layer / File(s) Summary
Update position interval defaults
src/mesh/Default.h
The stationary broadcast default is set to 6 hours. The traffic-management position interval default is set to 5 hours.
Align comments and test scenarios
src/mesh/NodeDB.cpp, src/modules/PositionModule.cpp, src/modules/TrafficManagementModule.cpp, test/test_traffic_management/test_main.cpp
Comments and test descriptions now reference the 6-hour stationary broadcast interval, the 5-hour position interval, and the existing role caps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 5b5b2

The change shortens stationary-position refresh timing from 12 hours to 6 hours and aligns deduplication timing accordingly; the reported tests pass, and no actionable merge-blocking risk remains.

Suggested reviewers: nomdetom, caveman99

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: reducing the stationary/fixed-position broadcast floor from 12 hours to 6 hours. It is concise and directly related to the changeset.
Description check ✅ Passed The description explains the motivation, changed constants, preserved behavior, role caps, cache sizing, tests, and issue references. It is substantially complete, although it does not include the tem…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the motivation, changed constants, preserved behavior, role caps, cache sizing, tests, and issue references. It is substantially complete, although it does not include the template's device-specific attestation checkboxes.

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stationary-position-floor-6h

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thebentern
thebentern added this pull request to the merge queue Aug 25, 2026
Merged via the queue into develop with commit 98c88d7 Aug 25, 2026
63 of 64 checks passed
@caveman99
caveman99 deleted the fix/stationary-position-floor-6h branch August 26, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant