Skip to content

Document validate.proto invariants in CONTRIBUTING#482

Merged
EaganVP merged 4 commits intomainfrom
aeagan/dvrl-652-need-protovalidate-documentation-for-maintainers-and
Mar 31, 2026
Merged

Document validate.proto invariants in CONTRIBUTING#482
EaganVP merged 4 commits intomainfrom
aeagan/dvrl-652-need-protovalidate-documentation-for-maintainers-and

Conversation

@EaganVP
Copy link
Copy Markdown
Contributor

@EaganVP EaganVP commented Mar 23, 2026

Add a new section to CONTRIBUTING.md explaining the structural invariants of validate.proto that contributors, maintainers, and implementers must uphold.
The contributing guide now documents what the checker verifies: field-to-rules type mapping, field name consistency, extension ranges, example fields, and CEL rule requirements.

@EaganVP EaganVP requested a review from timostamm March 23, 2026 18:23
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 31, 2026, 6:56 PM

Copy link
Copy Markdown
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

This is great, thank you.

Can you also add a section about the CEL environment? It's important that any CEL expression in validate.proto honors the environment provided by Protovalidate. On top of CEL's standard functions, we add:

  • The strings extension, most comprehensively documented here.
  • The variables now, this, rule, and rules.
  • The double, int, string, and list functions, and bytes overloads for contains, endsWith, and startsWith.

The variables and functions are documented on protovalidate.com.

Rules in validate.proto cannot use other functions and variables. The tool ensures that by defining the function and variable signatures in tools/internal/protovalidate-check/cel.go. A contribution that adds a new signature must add it to this definition.

@EaganVP EaganVP requested a review from timostamm March 31, 2026 18:22
@EaganVP EaganVP requested a review from timostamm March 31, 2026 18:58
@EaganVP EaganVP merged commit 87cd948 into main Mar 31, 2026
8 checks passed
@EaganVP EaganVP deleted the aeagan/dvrl-652-need-protovalidate-documentation-for-maintainers-and branch March 31, 2026 19:23
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.

2 participants