Skip to content

Ensure infrastructure role-based minimums are coerced since they don't have scaling#9937

Merged
thebentern merged 3 commits into
masterfrom
fix-role-minimums
Mar 18, 2026
Merged

Ensure infrastructure role-based minimums are coerced since they don't have scaling#9937
thebentern merged 3 commits into
masterfrom
fix-role-minimums

Conversation

@thebentern

Copy link
Copy Markdown
Contributor

As was pointed out in a discussion, the infrastructure roles don't enforce scaling, so instead we must ensure that the interval floors are coerced in line with those courser-grained default broadcasts minimums.

@thebentern thebentern requested a review from Copilot March 18, 2026 12:17
@thebentern thebentern added the bugfix Pull request that fixes bugs label Mar 18, 2026
@github-actions github-actions Bot added the needs-review Needs human review label Mar 18, 2026

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

This PR updates the role-based minimum interval “floors” used when coercing telemetry and position broadcast intervals on default channels, so router roles (which don’t use congestion scaling) still get appropriately coarse minimums.

Changes:

  • Make min_default_telemetry_interval_secs and min_default_broadcast_interval_secs role-aware via IF_ROUTER(...) (router/router_late get ONE_DAY/2 minimums).
  • Update NodeDB log/comment text to reflect role-aware coercion behavior.
  • Add unit tests validating the role-aware minimum coercion values for ROUTER, ROUTER_LATE, and CLIENT roles.

Reviewed changes

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

File Description
src/mesh/Default.h Makes default-channel minimum interval macros role-aware for router roles.
src/mesh/NodeDB.cpp Adjusts log/comment text to match the new role-aware minimum semantics.
test/test_default/test_main.cpp Adds tests asserting router vs client minimum interval behavior.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread test/test_default/test_main.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@thebentern thebentern merged commit 4fbd5c9 into master Mar 18, 2026
77 checks passed
@caveman99 caveman99 deleted the fix-role-minimums branch April 12, 2026 15:16
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
…t have scaling (meshtastic#9937)

* Ensure infrastructure role-based minimums are coerced since they don't have scaling

* Add test

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants