Block coordinate traffic on configured event channels - #11045
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds configurable event-channel coordinate privacy enforcement across mesh routing, phone ingress, reliable delivery, precision handling, MQTT reporting, and next-hop forwarding. Native tests and a dedicated PlatformIO coverage workflow validate the policy. ChangesEvent channel policy
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant PhoneAPI
participant Router
participant Channels
participant NextHopRouter
participant MQTT
PhoneAPI->>Router: submit coordinate packet
Router->>Channels: resolve effective channel and event-channel identity
Channels-->>Router: policy result
Router->>NextHopRouter: allow or suppress routing
Router->>MQTT: allow or suppress reporting
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
CI follow-up: the branch-caused Native PlatformIO failure has been fixed in 6c941f3. The remaining check-label job requires an accepted PR label; I do not have permission to add labels. Could a maintainer please add the enhancement label? |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
Added behavioral unit coverage in 9d35291..470c40b: real Router TX/RX paths, NextHop/Flooding/Reliable relay-retry-ACK paths, StreamAPI/PhoneAPI retry-state handling, and MQTT publication/map reporting. The policy-enabled and gate-off five-suite matrices each pass 121/121 cases; native build and targeted Trunk checks pass. The new suites are registered in the policy CI environment and canonical native suite count. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/mesh/FloodingRouter.cpp (1)
95-104: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winRestrict policy-driven decoding to event-channel candidates.
Setting
shouldDecode = truedecrypts every private and PKI duplicate/upgraded packet when the policy is enabled. Resolve the effective channel first, while independently retaining traceroute decoding.Proposed change
bool shouldDecode = false; `#if` USERPREFS_BLOCK_POSITION_ON_EVENT_CHANNEL - shouldDecode = true; -#elif !MESHTASTIC_EXCLUDE_TRACEROUTE - shouldDecode = traceRouteModule != nullptr; + shouldDecode = !p->pki_encrypted && channels.isEventChannel(getEffectiveChannelIndex(p)); +#endif +#if !MESHTASTIC_EXCLUDE_TRACEROUTE + shouldDecode = shouldDecode || traceRouteModule != nullptr; `#endif`🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/mesh/FloodingRouter.cpp` around lines 95 - 104, Update the decoding decision around shouldDecode in the duplicate handling path to resolve the packet’s effective channel first and enable policy-driven decoding only for event-channel candidates, rather than every packet. Keep traceroute-driven decoding independently enabled when traceRouteModule is available, including builds where traceroute is not excluded, and preserve the existing perhapsDecode flow.test/test_position_precision/test_main.cpp (1)
274-276: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep changed comments within the two-line limit.
test/test_position_precision/test_main.cpp#L274-L276: condense the gate-behavior explanation.test/test_position_precision/test_main.cpp#L408-L410: reflow the private-key explanation.test/test_nexthop_routing/test_main.cpp#L610-L612: remove or shorten the decorative heading.As per coding guidelines, “Keep code comments minimal—one or two lines maximum.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/test_position_precision/test_main.cpp` around lines 274 - 276, Shorten the gate-behavior comment at test/test_position_precision/test_main.cpp lines 274-276 to no more than two lines while retaining its meaning; reflow the private-key explanation at lines 408-410 to the same limit; and remove or shorten the decorative heading at test/test_nexthop_routing/test_main.cpp lines 610-612. No code changes are required.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/mesh/FloodingRouter.cpp`:
- Around line 109-112: Update the LOG_WARN call in
FloodingRouter::reprocessPacket to format the getFrom(p) node ID with the
hexadecimal 0x%08x specifier instead of decimal %u, keeping the existing
arguments and message context unchanged.
---
Nitpick comments:
In `@src/mesh/FloodingRouter.cpp`:
- Around line 95-104: Update the decoding decision around shouldDecode in the
duplicate handling path to resolve the packet’s effective channel first and
enable policy-driven decoding only for event-channel candidates, rather than
every packet. Keep traceroute-driven decoding independently enabled when
traceRouteModule is available, including builds where traceroute is not
excluded, and preserve the existing perhapsDecode flow.
In `@test/test_position_precision/test_main.cpp`:
- Around line 274-276: Shorten the gate-behavior comment at
test/test_position_precision/test_main.cpp lines 274-276 to no more than two
lines while retaining its meaning; reflow the private-key explanation at lines
408-410 to the same limit; and remove or shorten the decorative heading at
test/test_nexthop_routing/test_main.cpp lines 610-612. No code changes are
required.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f43b6709-be09-429e-a95c-e81d2bdc9e8c
📒 Files selected for processing (20)
.github/workflows/test_native.ymlsrc/mesh/Channels.cppsrc/mesh/Channels.hsrc/mesh/FloodingRouter.cppsrc/mesh/FloodingRouter.hsrc/mesh/NextHopRouter.cppsrc/mesh/PhoneAPI.cppsrc/mesh/PositionPrecision.cppsrc/mesh/ReliableRouter.cppsrc/mesh/Router.cppsrc/mesh/Router.hsrc/mqtt/MQTT.cpptest/native-suite-counttest/test_event_channel_phone_api/test_main.cpptest/test_event_channel_router/test_main.cpptest/test_mqtt/MQTT.cpptest/test_nexthop_routing/test_main.cpptest/test_position_precision/test_main.cppuserPrefs.jsoncvariants/native/portduino/platformio.ini
|
@ayysasha can you rebase this |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/test_native.yml (1)
39-40: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReject count files containing multiple tokens.
tr -d '[:space:]'collapses values such as1 2or two numeric lines into12, allowing malformed files to pass the guard. Validate the raw content as exactly one integer with optional surrounding whitespace.Proposed fix
- canonical_count=$(tr -d '[:space:]' <"$count_file") - if ! [[ $canonical_count =~ ^[0-9]+$ ]]; then + raw_count=$(<"$count_file") + if ! [[ $raw_count =~ ^[[:space:]]*([0-9]+)[[:space:]]*$ ]]; then echo "::error title=Invalid native-suite-count::$count_file must contain a single integer, got '$canonical_count'." exit 1 fi + canonical_count="${BASH_REMATCH[1]}"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/test_native.yml around lines 39 - 40, Update the count-file validation around canonical_count to validate the raw file content as exactly one non-negative integer with optional surrounding whitespace, rather than removing all whitespace before matching. Ensure values containing multiple numeric tokens, such as “1 2” or separate numeric lines, are rejected while preserving acceptance of a single integer surrounded by whitespace.
🧹 Nitpick comments (2)
.github/workflows/test_native.yml (1)
270-270: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDisable credential persistence for the report job.
This checkout leaves
GITHUB_TOKENin.git/configwhile later steps execute repository tooling and process artifacts. Addpersist-credentials: falseto avoid unnecessary token exposure.Proposed fix
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/test_native.yml at line 270, Update the actions/checkout step in the report job to set persist-credentials to false, ensuring the checkout does not retain GITHUB_TOKEN in .git/config for subsequent tooling and artifact-processing steps.Source: Linters/SAST tools
src/mesh/Router.cpp (1)
579-633: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMultiple new comment blocks exceed the repo's comment-length convention.
Several newly added comments run 3-8 lines (e.g. the
canonicalSignableSizeheader at 579-583, the Balanced-mode rationale at 720-727, the admin-key persistence note at 932-936), restating rationale in multi-paragraph form. As per coding guidelines, "Keep code comments minimal—one or two lines maximum—and comment only when the reason is not obvious; do not restate straightforward code or add multi-paragraph explanatory blocks."Also applies to: 720-727, 932-937
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/mesh/Router.cpp` around lines 579 - 633, The newly added comments around canonicalSignableSize, the Balanced-mode logic, and admin-key persistence exceed the repository’s one- or two-line comment convention. Condense each comment block to at most two lines, retaining only non-obvious rationale and removing restatements of the surrounding code.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/test_native.yml:
- Around line 39-40: Update the count-file validation around canonical_count to
validate the raw file content as exactly one non-negative integer with optional
surrounding whitespace, rather than removing all whitespace before matching.
Ensure values containing multiple numeric tokens, such as “1 2” or separate
numeric lines, are rejected while preserving acceptance of a single integer
surrounded by whitespace.
---
Nitpick comments:
In @.github/workflows/test_native.yml:
- Line 270: Update the actions/checkout step in the report job to set
persist-credentials to false, ensuring the checkout does not retain GITHUB_TOKEN
in .git/config for subsequent tooling and artifact-processing steps.
In `@src/mesh/Router.cpp`:
- Around line 579-633: The newly added comments around canonicalSignableSize,
the Balanced-mode logic, and admin-key persistence exceed the repository’s one-
or two-line comment convention. Condense each comment block to at most two
lines, retaining only non-obvious rationale and removing restatements of the
surrounding code.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c1161fcd-0926-4393-9e1b-f2bb5aa7a5d2
📒 Files selected for processing (12)
.github/workflows/test_native.ymlsrc/mesh/NextHopRouter.cppsrc/mesh/PhoneAPI.cppsrc/mesh/Router.cppsrc/mesh/Router.hsrc/mqtt/MQTT.cpptest/native-suite-counttest/test_event_channel_router/test_main.cpptest/test_mqtt/MQTT.cpptest/test_nexthop_routing/test_main.cppuserPrefs.jsoncvariants/native/portduino/platformio.ini
🚧 Files skipped from review as they are similar to previous changes (10)
- test/native-suite-count
- userPrefs.jsonc
- src/mesh/Router.h
- src/mqtt/MQTT.cpp
- src/mesh/PhoneAPI.cpp
- variants/native/portduino/platformio.ini
- test/test_mqtt/MQTT.cpp
- test/test_event_channel_router/test_main.cpp
- src/mesh/NextHopRouter.cpp
- test/test_nexthop_routing/test_main.cpp
Why MAP_REPORT_APP is includedThe firmware-generated MapReport path is MQTT-only: MQTT::perhapsReportToMap() wraps the report in a ServiceEnvelope and publishes it directly to the map topic; it does not call the mesh Router or transmit over LoRa. The MeshPacket with a broadcast destination is part of the envelope's protobuf data shape, not evidence of RF transmission. We included port 73 for two separate reasons. First, the generic phone and MQTT packet-ingress APIs can still construct a decoded MAP_REPORT_APP packet and pass it to the Router, so classifying it as coordinate-bearing prevents a manually injected port-73 packet from reaching LoRa on the configured event channel. Second, we interpreted the event privacy policy as preventing location egress through MQTT as well as LoRa, so the internally generated direct map report is independently suppressed when the primary channel uses the event key. If maintainers want the scope to be strictly LoRa airtime, these layers can be separated: retain the Router-side defensive classification while removing the direct perhapsReportToMap() MQTT suppression. The current implementation intentionally takes the broader privacy-oriented interpretation. |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Conflicts were all additive - both sides added code at the same spot: - src/mesh/Router.h: kept the PR's isCoordinatePortnum/ isBlockedEventCoordinatePacket declarations alongside develop's new RxTimeStamp/computeRxTimeStamp/stampRxTime declarations. - src/mesh/ReliableRouter.cpp: kept the event-channel coordinate guard, ordered ahead of develop's GlobalPacketId key/retransmitting locals so the early return still releases p before any retransmission bookkeeping. - userPrefs.jsonc: kept both new USERPREFS comment lines. - test/native-suite-count: 46 - the PR's 2 new suites plus develop's 3 on top of the merge base's 41, matching the test/test_* directory count. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
test/test_position_precision/test_main.cpp (1)
274-276: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReduce these comments to two lines.
Each new comment has three lines. Keep each comment to one or two lines.
As per coding guidelines, “Keep code comments minimal—normally one or two lines.”
Also applies to: 408-410
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/test_position_precision/test_main.cpp` around lines 274 - 276, Shorten the comments near the event-channel precision checks, including the corresponding comment around the later referenced section, to no more than two lines each while preserving their essential intent.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/mesh/Router.cpp`:
- Around line 1498-1505: The blocked coordinate-packet check must run before
Router logging in dispatchReceived(), immediately after successful decoding and
before printPacket(). Move the isBlockedEventCoordinatePacket() handling there
while preserving the LOG_DEBUG, cancelSending(), and skipHandle behavior.
In `@test/test_event_channel_phone_api/test_main.cpp`:
- Around line 89-104: Extend GlobalState and the setup/teardown flow around
MockRouter to save both cryptLock and myNodeInfo, set cryptLock to nullptr
before constructing MockRouter, and restore the saved cryptLock and node info
during teardown alongside the existing global state restoration.
In `@test/test_nexthop_routing/test_main.cpp`:
- Around line 302-310: Replace the unbounded strcpy call in makeBehaviorChannel
with the bounded string-copy helper from src/meshUtils.h, ensuring
channel.settings.name is always null-terminated and overlong names are safely
truncated.
---
Nitpick comments:
In `@test/test_position_precision/test_main.cpp`:
- Around line 274-276: Shorten the comments near the event-channel precision
checks, including the corresponding comment around the later referenced section,
to no more than two lines each while preserving their essential intent.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f739c865-7056-444f-8caa-fb19f6e4c0e6
📒 Files selected for processing (18)
.github/workflows/test_native.ymlsrc/mesh/Channels.cppsrc/mesh/Channels.hsrc/mesh/NextHopRouter.cppsrc/mesh/PhoneAPI.cppsrc/mesh/PositionPrecision.cppsrc/mesh/ReliableRouter.cppsrc/mesh/Router.cppsrc/mesh/Router.hsrc/mqtt/MQTT.cpptest/native-suite-counttest/test_event_channel_phone_api/test_main.cpptest/test_event_channel_router/test_main.cpptest/test_mqtt/MQTT.cpptest/test_nexthop_routing/test_main.cpptest/test_position_precision/test_main.cppuserPrefs.jsoncvariants/native/portduino/platformio.ini
🚧 Files skipped from review as they are similar to previous changes (12)
- test/native-suite-count
- variants/native/portduino/platformio.ini
- userPrefs.jsonc
- src/mesh/PositionPrecision.cpp
- src/mesh/NextHopRouter.cpp
- src/mesh/Channels.cpp
- src/mesh/Channels.h
- src/mqtt/MQTT.cpp
- src/mesh/PhoneAPI.cpp
- src/mesh/ReliableRouter.cpp
- .github/workflows/test_native.yml
- src/mesh/Router.h
- test_event_channel_phone_api: complete the setUp/tearDown save-restore pair. GlobalState now carries cryptLock and myNodeInfo; setUp() nulls cryptLock before constructing MockRouter (Router's ctor asserts it is unset), and tearDown() restores both so the suite leaves no global mutated. Not reachable today - the globals start null in this binary - but the pair was asymmetric. - Replace the strcpy calls this branch added on Channel.settings.name (char[12]) with the bounded form the rest of the test tree already uses, strncpy(dst, src, sizeof(dst) - 1). Covers the flagged site in test_nexthop_routing plus the six equivalents in test_event_channel_phone_api, test_mqtt and test_position_precision, which trip the same ast-grep dangerous-buffer-functions-cpp rule. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jp-bennett
left a comment
There was a problem hiding this comment.
Have you thought through whether this could cause problems with emergency response? This is always my hesitation with blocking precise position: the case where somebody needs help, and location over the mesh would get help there faster.
546b9d9
…ite-count Lines already inside default-off #ifdef blocks (GPS_DEBUG, DEBUG_LOOP_TIMING) cost no flash and should stay visible at debug level when their gate is enabled, rather than also requiring MESHTASTIC_TRACE_LOGGING. test/native-suite-count lags the two test_event_channel_* suites added by #11045 (develop's Native Suite Count check has the same mismatch); bump 46 -> 47. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1
… drop redundant logs (meshtastic#11391) * logging: gate LOG_TRACE behind MESHTASTIC_TRACE_LOGGING, drop redundant reclock logs LOG_TRACE now compiles out by default so trace-level diagnostics cost no flash; enable with -DMESHTASTIC_TRACE_LOGGING. Portduino keeps it on for the traceFilename packet-trace feature. Remove the 66 caller-side I2C reclock/restore log lines in the telemetry sensors: ReClockI2C::setClock/restoreClock already log both frequencies internally (now at trace level, since they fire every sensor read). Also unify near-duplicate literals (colon/case/punctuation variants) so linker string dedup applies, and drop an information-free bare 'done'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 * logging: demote chatty per-packet/per-poll DEBUG lines to trace level With LOG_TRACE compiled out by default, per-iteration chatter (packet bookkeeping, sensor poll values, e-ink refresh reasons, GPS pin states, UI runState traces) now costs no flash on device builds while remaining one -DMESHTASTIC_TRACE_LOGGING away. 108 lines demoted, 4 information- free lines removed; failure paths, drop reasons, and one-time init logs all stay at debug level. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 * logging: address CodeRabbit review on trace-gate PR - GPS: pass serial-derived buffers as %s args, never as format strings (untrusted bytes could contain % directives) - 0x%08x for packet id / NodeNum per convention (Router, CannedMessage, NeighborInfo); unsigned casts for size_t args; %u for uint32_t delta - EInk: async full-refresh begin/complete back to DEBUG (rare state transitions); per-frame SKIPPED lines stay trace Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 * logging: gate trace on the flag's value, not its presence -DMESHTASTIC_TRACE_LOGGING=0 previously *enabled* trace logging because the gate tested definedness. The flag now defaults per-platform (portduino 1, else 0) and both backends test the value, so =0 disables, =1 or a bare -D enables. Also cast tx_after-millis() to uint32_t for %u (millis() is unsigned long on native). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 * logging: clang-format rewrap after specifier widening Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 * Even fewer bytes! * logging: keep compile-gated debug lines at debug level; fix native-suite-count Lines already inside default-off #ifdef blocks (GPS_DEBUG, DEBUG_LOOP_TIMING) cost no flash and should stay visible at debug level when their gate is enabled, rather than also requiring MESHTASTIC_TRACE_LOGGING. test/native-suite-count lags the two test_event_channel_* suites added by meshtastic#11045 (develop's Native Suite Count check has the same mismatch); bump 46 -> 47. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 * gps: route GPS_DEBUG diagnostics through a LOG_DEBUG_GPS() macro (meshtastic#11414) Replaces 27 log-only #ifdef GPS_DEBUG blocks across GPS.cpp, PositionModule, MeshService, and GPSStatus.h with a single-line LOG_DEBUG_GPS() call (src/gps/GPSLog.h, modeled on LOG_MIGRATION: value-gated, ((void)0) when off). Blocks containing declarations, control flow, hexDump, or nested conditionals keep an explicit '#if GPS_DEBUG' guard. RTC.cpp's per-reading raw time dumps and per-candidate rejection chatter fold under the same gate; quality transitions and boot-time seeding stay at debug. Also fixes the '// define GPS_DEBUG' missing-# typo in two variant headers and updates all seven commented examples to the value form ('#define GPS_DEBUG 1') required by the value-based gate. Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 Co-authored-by: Claude <noreply@anthropic.com> * gps: declare RTC gmtime result as pointer to const (cppcheck) With the setTime debug dump gated behind GPS_DEBUG, all remaining uses of t are reads; cppcheck (constVariablePointer) now flags it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBiZc9sfPrH1MZ2L3Fxgt1 --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
This PR adds an opt-in, compile-time event-channel privacy policy that prevents
POSITION_APP,WAYPOINT_APP, andMAP_REPORT_APPpackets from being transmitted, relayed, acknowledged, logged, or forwarded to MQTT on channels whose effective key matchesUSERPREFS_CHANNEL_0_PSK.Enable it explicitly in
userPrefs.jsonc:The policy defaults off, emits no replacement or empty position packet, and leaves private-channel and eligible PKI traffic unaffected.
USERPREFS_CHANNEL_0_PSK, independent of channel index or name.USERPREFS_BLOCK_POSITION_ON_EVENT_CHANNELis undefined or0.Testing
pio run -e native: passed.git diff --check: clean.Hardware validation
Equivalent policy behavior was exercised on two ThinkNode M2 devices using the earlier master-based implementation: event-channel position sends were suppressed, private-channel sends succeeded, inbound coordinate packets were not stored or relayed, retries produced no relay, and direct coordinate packets requesting acknowledgment received no ACK/NAK.
The exact
developforward port was validated through the native unit-test and build matrices rather than reflashed to hardware.Scope
The Burning Mesh event configuration does not use ATAK or lost-and-found position reporting. This policy covers
POSITION_APP,WAYPOINT_APP, andMAP_REPORT_APP; the generated MapReport path is MQTT-only, while classifying port 73 also prevents generic packet ingress from routing a manually constructed map report over LoRa.Attestations