Skip to content

Comments

feat: add object ID options.proto#30

Merged
yordis merged 1 commit intomainfrom
add-object-id
Feb 11, 2026
Merged

feat: add object ID options.proto#30
yordis merged 1 commit intomainfrom
add-object-id

Conversation

@yordis
Copy link
Member

@yordis yordis commented Feb 11, 2026

Signed-off-by: Yordis Prieto yordis.prieto@gmail.com

@cursor
Copy link

cursor bot commented Feb 11, 2026

PR Summary

Low Risk
Adds a new proto file and documentation-only guidance; main risk is extension-number collisions or consumer breakage if downstream code assumes different numbering or option names.

Overview
Adds a new protobuf extension trogon.object_id.v1alpha1 that extends google.protobuf.EnumValueOptions with an enum_value wrapper containing object_type and optional separator (extension number 870010), enabling enum values to carry object-ID generation metadata.

Updates protobuf-extension-naming.md to be a more prescriptive template: defines a standard options.proto layout, documents how to pick extension numbers in the 870000+ range, introduces a shared field-number registry (now including 870010), and adds step-by-step instructions for creating and documenting new extensions.

Written by Cursor Bugbot for commit 4c22e2a. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

Adds detailed protobuf extension naming and creation guidelines in docs and introduces a new protobuf extension EnumValueOptions for object ID metadata (object_type and optional separator), extending google.protobuf.EnumValueOptions with field number 870010 and setting an Elixir module prefix.

Changes

Cohort / File(s) Summary
Documentation
docs/explanation/protobuf-extension-naming.md
Rewrote into explicit extension guidance: added "Structure Template", step-by-step "Creating a New Extension" workflow, a "Field Number Registry" table with ranges/examples, reorganized examples to use wrapper-based extension pattern.
Protobuf Extension
proto/trogon/object_id/v1alpha1/options.proto
New proto: defines EnumValueOptions (string object_type = 1, optional string separator = 2), extends google.protobuf.EnumValueOptions with optional EnumValueOptions enum_value = 870010, imports descriptors and sets (elixirpb.file).module_prefix.

Sequence Diagram(s)

(omitted — changes are documentation and protobuf extension additions without multi-component sequential flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • feat: add uuid proto #1 — Adds a similar pattern of extending google.protobuf.EnumValueOptions for per-enum metadata in another trogon subpackage; closely related extension approach.

Poem

🐇 I nibble lines of proto lore,

wrappers, numbers, and one field more,
object types with tiny seams,
separators guiding sleepy dreams,
docs and options snugly sown.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description only contains a sign-off line and lacks meaningful detail about the changeset, though it is technically related as it accompanies the PR. Add a substantive description explaining what object ID options are being added, why they are needed, and how they extend protobuf descriptors.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add object ID options.proto' directly matches the changes: a new proto file is added that defines object ID-related options.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-object-id

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
docs/explanation/protobuf-extension-naming.md (1)

83-89: Registry gap: numbers 870003–870009 are unaccounted for.

The registry jumps from 870002 to 870010, leaving 870003–870009 unlisted. Mark them as available to prevent confusion and accidental conflicts.

Proposed fix
 | 870002 | trogon.uuid.v1 | google.protobuf.EnumValueOptions |
+| 870003–870009 | *Available* | — |
 | 870010 | trogon.object_id.v1alpha1 | google.protobuf.EnumValueOptions |
 | 870011–870999 | *Available* | — |

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.

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 11, 2026, 5:28 PM

@yordis yordis marked this pull request as ready for review February 11, 2026 17:23
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 `@docs/explanation/protobuf-extension-naming.md`:
- Around line 57-65: Add the missing language identifier "text" to the fenced
code blocks that contain the tree-style diagrams to satisfy MD040; specifically
update the block that starts with "trogon/<feature>/<version>/options.proto" and
the block that shows "trogon/uuid/v1/options.proto" in
docs/explanation/protobuf-extension-naming.md so their opening fences read
```text (preserve the existing diagram content and spacing).
🧹 Nitpick comments (1)
docs/explanation/protobuf-extension-naming.md (1)

83-89: Registry gap from 870002 to 870010 — intentional grouping?

The jump from 870002 (trogon.uuid.v1) to 870010 (trogon.object_id.v1alpha1) leaves 870003–870009 unaccounted for. If this is intentional (reserving a block per feature), consider noting the convention (e.g., "each feature reserves a block of 10") so future contributors don't accidentally fill the gap.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis merged commit 2d4ee42 into main Feb 11, 2026
5 checks passed
@yordis yordis deleted the add-object-id branch February 11, 2026 17:32
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