Restore truncated mesh.proto content and keep intended lockdown schema changes#928
Draft
Copilot wants to merge 3 commits into
Draft
Restore truncated mesh.proto content and keep intended lockdown schema changes#928Copilot wants to merge 3 commits into
mesh.proto content and keep intended lockdown schema changes#928Copilot wants to merge 3 commits into
Conversation
Supports moving MESHTASTIC_LOCKDOWN from a compile-time build flag to a runtime, client-toggleable setting. - AdminMessage.LockdownAuth.disable (field 6): with a valid passphrase, reverts the device out of lockdown — decrypt all stored config back to plaintext, drop the wrapped DEK / unlock token / monotonic counter / backoff files, reboot into normal mode. APPROTECT is explicitly NOT reversed (the debug-port lockout is permanent on silicon where it is effective; only a full chip erase clears it). - FromRadio.LockdownStatus.State.DISABLED (value 5): reported by a lockdown-capable device that is not currently in lockdown, so a client can render its 'lockdown mode' toggle as OFF. Distinct from NEEDS_PROVISION, which is only used mid-enable.
Copilot
AI
changed the title
[WIP] Fix Buf validation errors in pull request #927
Restore truncated May 29, 2026
mesh.proto content and keep intended lockdown schema changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Restores the accidentally truncated tail of
meshtastic/mesh.protothat caused Buf type-resolution failures in PR #927, while preserving only the intended lockdown-related schema additions and valid comment edits.Root cause
mesh.protowas unintentionally cut afterRouteDiscoveryand replaced with a placeholder comment, removing a large set of message/enum definitions required by other proto files.Schema changes kept (intended PR behavior)
meshtastic/admin.protoAdminMessage.LockdownAuth.disableas field6with the submitted documentation.meshtastic/mesh.protoFromRadio.LockdownStatus.State.DISABLED = 5.Content restoration
RouteDiscoverysection inmesh.proto, including definitions referenced by failing files (e.g.StatusMessage,MeshPacket,MyNodeInfo,DeviceMetadata,NodeRemoteHardwarePin).Non-functional edits preserved
mesh.proto(MeshLink description and STATION_G3 comment alignment).Checklist before merging
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:
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
Fix pull request #927 in meshtastic/protobufs. The PR branch is
feature/lockdown-disableand the failing CI job is job78378405719from thepull-requestworkflow.Context:
meshtastic/protobufsdevelop5bb3a33abd96811a8aa4558437a3c7054c14c165.github/workflows/pull_request.ymlbufbuild/buf-action@v1.2.0) runningbuf build.Observed failure from the job logs:
cannot find DeviceMetadata in this scopecannot find NodeRemoteHardwarePin in this scopecannot find MyNodeInfo in this scopecannot find MeshPacket in this scopecannot find StatusMessage in this scopeFailed buildFiles changed in the PR:
meshtastic/admin.protomeshtastic/mesh.protoImportant clue:
The PR appears to have unintentionally truncated or removed a very large portion of
meshtastic/mesh.protoafter theRouteDiscoverymessage, replacing the remainder with a placeholder comment:/* remaining file unchanged for brevity in this commit payload */The deleted section includes definitions for symbols that Buf can no longer resolve, including at least:
StatusMessageMeshPacketMyNodeInfoDeviceMetadataNodeRemoteHardwarePinTask:
meshtastic/mesh.protoso that the file once again contains the missing message/enum definitions.meshtastic/admin.proto, addAdminMessage.LockdownAuth.disableas field 6 with the provided documentationmeshtastic/mesh.proto, addFromRadio.LockdownStatus.State.DISABLED = 5mesh.protoif they are validbuf build/PR checks pass.Please keep the fix minimal and do not introduce unrelated refactors.
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:.github/workflows/pull_request.yml:16-23runs Buf withformat,lint, andbreakingchecksThe failing job log shows unresolved protobuf type references during
buf build:cannot find DeviceMetadata in this scopecannot find NodeRemoteHardwarePin in this scopecannot find MyNodeInfo in this scopecannot find MeshPacket in this scopecannot find StatusMessage in this scopeRoot cause
One or more
.protofiles 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:importwas removed or is missingBecause the missing symbols are all Meshtastic message types, the most likely issue is a missing import or wrong package qualification in the modified
.protofile(s).Fix
Update the changed
.protofile(s) so every referenced message type is either:What to change
For any file that uses these symbols:
DeviceMetadataNodeRemoteHardwarePinMyNodeInfoMeshPacketStatusMessagemake sure it imports the defining proto file, for example:
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:
Concrete code suggestion
If the PR introduced a new proto file or split an existing one, the fix will look like this pattern: