Split the proto_ingestion schema spec into cohesive files - #1358
Open
jwils wants to merge 1 commit into
Open
Conversation
`schema_spec.rb` had grown to 39 examples across every proto schema generation concern, and "schema" is a broad enough label that it would keep growing. Move each cohesive group into its own file: - `scalar_proto_types_spec.rb` — how scalar types map to proto field types, including `import:` and `comment:` - `stable_numbers_spec.rb` — field and enum value numbers staying stable as the schema evolves - `external_proto_enums_spec.rb` — `external_proto_enum`, both sourcing values and referencing an external enum type - `abstract_types_spec.rb` — `oneof` wrappers for interface and union types - `proto_syntax_and_headers_spec.rb` — the `syntax:` and `headers:` options `schema_spec.rb` keeps the 6 examples that cover schema generation as a whole. Every example moved verbatim, so this changes no behavior and adds no coverage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jwils
requested review from
BrianSigafoos-SQ,
bsorbo,
ellisandrews-toast,
jwondrusch,
marcdaniels-toast,
myronmarston and
rossroberts-toast
as code owners
August 19, 2026 01:18
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.
Why
elasticgraph-proto_ingestion'sschema_spec.rbhad grown to 39 examples covering every proto schema generation concern, and "schema" is a broad enough label that it would keep growing. Per review feedback on #1306, the scalar-related examples belong inscalar_proto_types_spec.rb, and the other cohesive groups deserve their own files too.What
Move each cohesive group of examples out of
schema_spec.rb:scalar_proto_types_spec.rbimport:andcomment:stable_numbers_spec.rbexternal_proto_enums_spec.rbexternal_proto_enum, both sourcing values and referencing an external enum typeabstract_types_spec.rboneofwrappers for interface and union typesproto_syntax_and_headers_spec.rbsyntax:andheaders:optionsschema_spec.rbkeeps the 6 examples that cover schema generation as a whole, dropping from 1174 lines to 172.Every example moved verbatim — I verified that the 39 example bodies are byte-identical before and after the split.
schema_edge_cases_spec.rbis untouched.Risk Assessment
None — spec file organization only. No behavior change, no coverage change (
elasticgraph-proto_ingestionstays at 100% line and branch coverage).References
Note on the stack
#1286 and #1352 are currently based on an older copy of #1306's commit, so they need a restack. Rebase this branch after that restack. Expect a conflict in
scalar_proto_types_spec.rb: #1306 now creates that file with its own examples, and this PR creates it with the moved ones, so the resolution is to keep both sets.