Skip to content

Conversation

@koudis
Copy link
Member

@koudis koudis commented Jan 19, 2026

Summary by CodeRabbit

  • New Features

    • Added example device module with blinker and lights support.
  • Chores

    • Updated Protobuf runtime dependency to version 5.27.2.
    • Bumped protocol version to 2.1.0.
    • Updated protocol definitions to latest Protobuf edition.
    • Updated documentation with new compilation paths and installation requirements.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

Walkthrough

This PR updates the project to support Protobuf 5.27.2 (from 3.21.12/4.21.12), migrates proto definitions from proto3 syntax to edition 2023 with implicit field presence annotations, and regenerates C++, C#, and Python compiled code. The fleet protocol version is bumped to 2.1.0.

Changes

Cohort / File(s) Summary
Configuration and Build Updates
.gitignore, CMakeLists.txt, examples/protobuf_parsing_example/CMakeLists.txt, examples/protobuf_parsing_example/cmake/Dependencies.cmake
Version updates (protocol 2.0.0→2.1.0, protobuf 3.21.12→5.27.2, 4.21.12→5.27.2); switched to CONFIG mode for protobuf discovery; added __pycache__/ ignore pattern
Protobuf Definition Files
protobuf/definition/ExternalProtocol.proto, protobuf/definition/InternalProtocol.proto, examples/protobuf_parsing_example/lib/protobuf/ExampleModule.proto
Migrated proto syntax from proto3 to edition 2023; added field_presence = IMPLICIT annotations to multiple fields; ExternalProtocol Status.errorMessage changed from optional to required field
Generated C++ Code
examples/protobuf_parsing_example/lib/protobuf/ProtobufModule.pb.cc, examples/protobuf_parsing_example/lib/protobuf/ProtobufModule.pb.h
Major regeneration for protobuf 5.27.2 API: updated constructors (Arena-based), namespace qualifications (PROTOBUF_NAMESPACE_ID→google::protobuf), descriptor table initialization, and metadata handling; type renames and field accessor updates
Generated C# Code
protobuf/compiled/cs/ExternalProtocol.cs, protobuf/compiled/cs/InternalProtocol.cs
Added DebuggerDisplay attributes; implemented early abort on end-group tags in MergeFrom paths; adjusted ErrorMessage default value handling; updated reflection metadata for Status message
Generated Python Code
protobuf/compiled/python/ExternalProtocol_pb2.py, protobuf/compiled/python/InternalProtocol_pb2.py
Refactored descriptor initialization to globals-based approach; added runtime version validation; replaced direct DESCRIPTOR mutations with _globals dictionary population
Documentation
protobuf/README.md
Updated protobuf version references, compilation paths (./protobuf/definition and ./protobuf/compiled/*), and added requirements section for protoc tools

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Protobuf update' is vague and generic, failing to convey specific details about the substantial changes made to the codebase. Consider using a more descriptive title that specifies the key changes, such as 'Upgrade Protobuf from 3.21.12/4.21.12 to 5.27.2 and adopt proto3 edition 2023' to better communicate the scope and nature of updates.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch protobuf_update

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@protobuf/README.md`:
- Around line 21-29: Change the incorrect heading level and remove the stray
orphan heading: rename the "#### Requirements" heading to "### Requirements" so
it follows the top-level "##" section, remove the extraneous "##" line after the
code block, and tidy surrounding blank lines to keep consistent Markdown
hierarchy in the README (look for the "#### Requirements" and the orphaned "##"
tokens to locate the edits).
🧹 Nitpick comments (3)
.gitignore (1)

4-5: Prefer directory-specific ignore for IDE cache

If the intent is to ignore the .idea directory only, consider .idea/ for clarity and to avoid accidental matches.

protobuf/README.md (1)

33-35: Consider adding language specifiers to code blocks.

Adding bash or shell language identifiers to the fenced code blocks would improve syntax highlighting for readers.

📝 Example fix
-```
+```bash
 find protobuf/definition -name "*.proto" -exec protoc -I=./protobuf/definition --cpp_out=./protobuf/compiled/cpp --csharp_out=./protobuf/compiled/cs --python_out=./protobuf/compiled/python --go_out=./protobuf/compiled/go/ --go_opt=paths=source_relative {} +

Apply the same pattern to the other code blocks at lines 43, 49, 55, and 61.
</details>

</blockquote></details>
<details>
<summary>examples/protobuf_parsing_example/lib/protobuf/ProtobufModule.pb.h (1)</summary><blockquote>

`2-4`: **Add CI check to verify protobuf generated code stays in sync with source `.proto` file.**

Generated protobuf files (ProtobufModule.pb.h/.pb.cc) are checked into the repository but there is no automatic regeneration during build. Consider adding a CI step that regenerates the files from ExampleModule.proto and fails if any differences are detected. Additionally, document the regeneration command in the example's README (similar to the instructions in `protobuf/README.md` for C++, targeted at `examples/protobuf_parsing_example/lib/protobuf/`).

</blockquote></details>

</blockquote></details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment on lines +21 to +29
#### Requirements

- desired version of `protoc` installed ([prebuilt binaries](https://github.com/protocolbuffers/protobuf/releases))
- `protoc-gen-go` needs to be installed to generate go files (set env value GOBIN to the path where protoc is installed first)
```bash
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
```

##
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix heading hierarchy and remove empty heading.

The #### Requirements heading skips heading levels (should be ### after ##), and line 29 has an orphaned ## that appears unintentional.

📝 Suggested fix
-#### Requirements
+### Requirements
 
 - desired version of `protoc` installed ([prebuilt binaries](https://github.com/protocolbuffers/protobuf/releases))
 - `protoc-gen-go` needs to be installed to generate go files (set env value GOBIN to the path where protoc is installed first)
 ```bash
 go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

-##

Compile to all languages:

</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>

21-21: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @protobuf/README.md around lines 21 - 29, Change the incorrect heading level
and remove the stray orphan heading: rename the "#### Requirements" heading to
"### Requirements" so it follows the top-level "##" section, remove the
extraneous "##" line after the code block, and tidy surrounding blank lines to
keep consistent Markdown hierarchy in the README (look for the "####
Requirements" and the orphaned "##" tokens to locate the edits).


</details>

<!-- fingerprinting:phantom:medusa:ocelot -->

<!-- This is an auto-generated comment by CodeRabbit -->

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.

3 participants