Skip to content

Fix accidental mesh.proto truncation; add LockdownAuth.disable and LockdownStatus.State.DISABLED#929

Merged
thebentern merged 4 commits into
developfrom
copilot/featurelockdown-disable-again
Jun 2, 2026
Merged

Fix accidental mesh.proto truncation; add LockdownAuth.disable and LockdownStatus.State.DISABLED#929
thebentern merged 4 commits into
developfrom
copilot/featurelockdown-disable-again

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Restores meshtastic/mesh.proto after an accidental truncation and adds lockdown disable semantics needed by clients/firmware.

Changes

meshtastic/admin.proto

  • Adds bool disable = 6 to LockdownAuth to disable lockdown with a valid passphrase.
  • Disabling lockdown decrypts stored config/channel/nodedb data back to plaintext, removes wrapped DEK/unlock token/counter/backoff files, and reboots to normal mode.
  • APPROTECT is explicitly not reversed.

meshtastic/mesh.proto

  • Restores the full file (1030 → 2818 lines), resolving missing symbol failures in buf build.
  • Adds DISABLED = 5 to LockdownStatus.State for the “lockdown-capable but not currently locked” state (clients render toggle OFF).
  • Fixes STATION_G3 comment indentation for Buf formatting.
  • Reverts an unrelated MESHLINK description text edit so this PR stays scoped to the intended fix.

Checklist before merging

  • All top level messages commented
  • All enum members have unique descriptions

New Hardware Model Acceptance Policy

Due to limited availability and ongoing support, new Hardware Models will only be accepted from Meshtastic Backers and Partners. The Meshtastic team reserves the right to make exceptions to this policy.

Alternative for Community Contributors

You are welcome to use one of the existing DIY hardware models in your PlatformIO environment and create a pull request in the firmware project. Please note the following conditions:

  • The device will not be officially supported by the core Meshtastic team.
  • The device will not appear in the Web Flasher or Github release assets.
  • You will be responsible for ongoing maintenance and support.
  • Community-contributed / DIY hardware models are considered experimental and will likely have limited or no testing.

Getting Official Support

To have your hardware model officially supported and included in the Meshtastic ecosystem, consider becoming a Meshtastic Backer or Partner. Visit meshtastic.com for more information about partnership opportunities.

Original prompt

Update the existing pull request at #927 by committing the fix to that PR branch.

Repository: meshtastic/protobufs
PR: #927
Base branch: develop
Current PR branch: feature/lockdown-disable

Goal:
Fix the failing CI job 78378405719 in this PR by correcting the accidental truncation/removal in meshtastic/mesh.proto.

Known failure:
Buf build fails with unresolved symbols including:

  • DeviceMetadata
  • NodeRemoteHardwarePin
  • MyNodeInfo
  • MeshPacket
  • StatusMessage

Root cause to address:
A very large tail section of meshtastic/mesh.proto appears to have been unintentionally removed after RouteDiscovery, replaced by a placeholder comment. Restore that removed content while preserving the intended PR changes.

Required final state:

  1. meshtastic/admin.proto keeps the intended addition of LockdownAuth.disable = 6 with its docs.
  2. meshtastic/mesh.proto restores all missing message/enum definitions that were accidentally deleted.
  3. meshtastic/mesh.proto includes the intended addition FromRadio.LockdownStatus.State.DISABLED = 5.
  4. Keep only relevant comment/text touch-ups already present if they are valid; avoid unrelated edits.
  5. Commit the fix to the existing PR branch so PR Add lockdown disable + DISABLED status for runtime lockdown toggle #927 is updated.

Please make the minimal change necessary and update the existing PR branch rather than creating a separate unrelated branch.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for failing job 78378405719. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure is a Buf build/type-resolution error, not a workflow bug.

What’s failing

In the PR workflow, the only relevant step is the Buf validation step in .github/workflows/pull_request.yml:

The failing job log shows unresolved protobuf type references during buf build:

  • cannot find DeviceMetadata in this scope
  • cannot find NodeRemoteHardwarePin in this scope
  • cannot find MyNodeInfo in this scope
  • cannot find MeshPacket in this scope
  • cannot find StatusMessage in this scope

Root cause

One or more .proto files in this PR are referring to message types that are no longer in scope from Buf’s point of view. That almost always means one of these happened:

  1. An import was removed or is missing
  2. A type name was changed but references were not updated
  3. A package changed, so the type now needs its fully qualified name
  4. A file was moved and Buf no longer sees the symbol through the previous import path

Because the missing symbols are all Meshtastic message types, the most likely issue is a missing import or wrong package qualification in the modified .proto file(s).

Fix

Update the changed .proto file(s) so every referenced message type is either:

  • imported from the file where it is defined, and/or
  • referenced with the correct package-qualified name

What to change

For any file that uses these symbols:

  • DeviceMetadata
  • NodeRemoteHardwarePin
  • MyNodeInfo
  • MeshPacket
  • StatusMessage

make sure it imports the defining proto file, for example:

import "meshtastic/mesh.proto";

or whatever the current canonical path is in this repo for those message definitions.

If the file is in a different package, use fully qualified names instead of bare names, for example:

meshtastic.MeshPacket packet = 1;
meshtastic.MyNodeInfo node_info = 2;
meshtastic.DeviceMetadata metadata = 3;
meshtastic.StatusMessage status = 4;
meshtastic.NodeRemoteHardwarePin pin = 5;

Concrete code suggestion

If the PR introduced a new proto file or split an existing one, the fix will look like this pattern:

syntax = "proto3";

package meshtastic.somepackage;

import "meshtastic/mesh.proto"; // adjust to actual defining file

message Example {
  meshtastic.MeshPacket packet = 1;
  meshtastic.MyNodeInfo node_info = 2;
  meshtastic.DeviceMetadata metadata = 3;
  meshtastic.StatusMessage status = 4;
  meshtastic.NodeRemoteHardwarePin pin = 5;
}

If those types are intended to be in the same package, then restore the missing import and keep the short names:

import "meshtastic/mesh.proto";

message Example {
  MeshPacket packet = 1;
  MyNodeInfo node_info = 2;
}

Best solution for this PR

Revert or correct the proto change that removed visibility of these shared message types. Specifically:

  • restore the required import(s) for the Meshtastic core message definitions
  • update any renamed references to the current symbol names
  • if package boundaries changed, qualify references with the pac...

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Fix CI job failure by restoring mesh.proto contents Fix accidental mesh.proto truncation; add LockdownAuth.disable and LockdownStatus.State.DISABLED May 29, 2026
Copilot AI requested a review from niccellular May 29, 2026 16:59

@jamesarich jamesarich 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.

Seems to be working in the client implementation.

@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow pull-request / build (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 30, 2026, 8:57 PM

Copilot AI requested a review from jamesarich May 30, 2026 20:19
Comment thread meshtastic/mesh.proto Outdated
Copilot AI requested a review from jamesarich May 30, 2026 20:40

@niccellular niccellular left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@jamesarich jamesarich marked this pull request as ready for review June 1, 2026 18:46
@thebentern thebentern merged commit f68c82d into develop Jun 2, 2026
2 checks passed
@thebentern thebentern deleted the copilot/featurelockdown-disable-again branch June 2, 2026 01:33
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.

4 participants