Skip to content

[codex] support proto3 custom option extensions#37

Merged
anthonyprintup merged 2 commits into
mainfrom
codex/proto3-custom-option-extensions
Jun 28, 2026
Merged

[codex] support proto3 custom option extensions#37
anthonyprintup merged 2 commits into
mainfrom
codex/proto3-custom-option-extensions

Conversation

@anthonyprintup

Copy link
Copy Markdown
Owner

Summary

  • Allow proto3 custom-option extension declarations for protobuf option messages, including ExtensionRangeOptions.
  • Reject ordinary proto3 extension declarations across the descriptor graph and keep extension declarations out of generated codec APIs.
  • Refine descriptor-set discovery so pure option-definition files remain import metadata while mixed files with public schema are generated.
  • Include the new generator helper module in both source-tree and installed CMake package configs.

Validation

  • uv run pytest -q --basetemp .pytest-tmp -> 203 passed
  • uv run ruff check src tests -> passed
  • git diff --check -> no whitespace errors; only Git LF-to-CRLF warnings
  • Installed-prefix smoke: configured and installed Protocyte into a temporary CMake prefix, confirmed share/protocyte/python/protocyte/extensions.py exists, and configured an installed find_package(protocyte CONFIG REQUIRED) descriptor-set DISCOVER consumer successfully.

Add shared classification for protobuf custom option extension declarations, including ExtensionRangeOptions.

Validate proto3 extension declarations across descriptor graphs and keep unsupported extension fields out of codec generation.

Refine descriptor-set discovery so pure option-definition files remain import metadata while mixed schema files are still generated.

Track the new generator module in both source-tree and installed CMake package configs.
@anthonyprintup anthonyprintup self-assigned this Jun 28, 2026
@anthonyprintup anthonyprintup added the enhancement New feature or request label Jun 28, 2026
@anthonyprintup

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b31546cd91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/protocyte/descriptor_set.py Outdated
Comment thread src/protocyte/descriptor_set.py Outdated
Comment thread src/protocyte/model.py Outdated
Scope proto3 extension validation to the selected import closure so unrelated descriptor-set files cannot block generation.

Teach descriptor-set discovery to skip transitive custom-option helper types and namespace-only nested extension containers while still selecting option files that expose public fields or nested messages.

Add regression coverage for transitive helper enums, nested scalar option namespaces, public namespace guards, and unrelated invalid proto3 extensions outside the selected graph.
@anthonyprintup

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: afc01cb5a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@anthonyprintup
anthonyprintup marked this pull request as ready for review June 28, 2026 20:39
@anthonyprintup
anthonyprintup merged commit 3889a44 into main Jun 28, 2026
8 checks passed
@anthonyprintup
anthonyprintup deleted the codex/proto3-custom-option-extensions branch June 28, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant