Skip to content

feat: add remote telemetry request policies - #1023

Open
RCGV1 wants to merge 3 commits into
meshtastic:masterfrom
RCGV1:codex/localstats-remote-admin
Open

feat: add remote telemetry request policies#1023
RCGV1 wants to merge 3 commits into
meshtastic:masterfrom
RCGV1:codex/localstats-remote-admin

Conversation

@RCGV1

@RCGV1 RCGV1 commented Jul 27, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Adds two device-owned SecurityConfig request policies for detailed radio telemetry:

  • local_stats_request_policy controls detailed LocalStats.
  • device_telemetry_request_policy controls requested DeviceMetrics only while TelemetryConfig.device_telemetry_enabled is false. It is ignored while DeviceMetrics broadcasting is enabled.

Each policy is an enum with a compatible default, CHANNEL, and an opt-in ADMIN_PKI mode. CHANNEL keeps normal shared-channel encryption. ADMIN_PKI allows firmware to require a PKI-authenticated request from a configured remote-admin key. Direct attached-client requests remain trusted.

This does not add NodeInfo/capability broadcasting or publish remote-admin membership. Remote clients choose the transport only at a user-initiated request; firmware returns the existing correlated NOT_AUTHORIZED routing NAK when that method or identity is rejected.

Related firmware issue

Validation

  • buf format --diff --exit-code
  • buf lint
  • buf breaking --against https://github.com/meshtastic/protobufs.git#format=git,commit=bfd718fa1dcb019ed11b7b7185f37318abebdafc
  • buf generate; verified TypeScript emits both policy enums and fields. Generated TypeScript is intentionally ignored and regenerated by the publish workflow.

Checklist before merging

  • All top level messages commented
  • All enum members have unique descriptions
  • Hardware model policy is not applicable (no hardware changes)

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

SecurityConfig adds a LocalStats request authorization enum and field. TelemetryConfig receives a formatting-only blank line.

Changes

Security policy schema

Layer / File(s) Summary
LocalStats authorization contract
meshtastic/config.proto
Adds channel-encrypted and admin-PKI-only LocalStats request policies and stores the selected policy in field 10.
TelemetryConfig formatting
meshtastic/module_config.proto
Adds a blank line without changing the protobuf structure.

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

Possibly related PRs

Suggested reviewers: thebentern, jp-bennett

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title is concise and broadly matches the main change to add request policy enums for remote telemetry.
Description check ✅ Passed The description follows the template well, with a clear summary, related issue, validation steps, and checklist items.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@meshtastic/config.proto`:
- Around line 1296-1310: Regenerate the committed protobuf bindings from the
updated schema so packages/ts/lib/meshtastic/config_pb.ts and any other
generated artifacts include LocalStatsRequestPolicy and localStatsRequestPolicy.
Verify the generated TypeScript supports reading, setting, and exposing the new
field, then commit the refreshed artifacts rather than relying only on buf lint.
🪄 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: 2a795c6a-5aa9-44ae-b01f-c4206168d36b

📥 Commits

Reviewing files that changed from the base of the PR and between bfd718f and 53acdf9.

📒 Files selected for processing (2)
  • meshtastic/config.proto
  • meshtastic/module_config.proto

Comment thread meshtastic/config.proto
@RCGV1 RCGV1 changed the title feat: add LocalStats request policy feat: add remote telemetry request policies Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant