Skip to content

Split the proto_ingestion schema spec into cohesive files - #1379

Merged
jwils merged 1 commit into
mainfrom
joshuaw/proto-spec-organization
Sep 13, 2026
Merged

jwils merged 1 commit into
mainfrom
joshuaw/proto-spec-organization

Conversation

@jwils

@jwils jwils commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Why

elasticgraph-proto_ingestion's schema_spec.rb still held 24 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 remaining scalar examples belong in scalar_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:

File Covers Examples
scalar_proto_types_spec.rb (added by #1306) how scalar types map to proto field types, including import: and field_comment: 9 existing + 4 moved here
proto_field_number_mappings_spec.rb how schema generation uses field and enum value number mappings 8
abstract_types_spec.rb oneof wrappers for interface and union types 3
proto_syntax_and_headers_spec.rb the syntax: and header_lines: options 3

schema_spec.rb keeps the 6 examples that cover schema generation as a whole, dropping from 727 lines to 172.

Every moved example body remains byte-identical. schema_edge_cases_spec.rb is untouched.

Risk Assessment

None — spec file organization only. No behavior change, no coverage change (elasticgraph-proto_ingestion stays at 100% line and branch coverage).

References

@jwils
jwils added this pull request to stack #1381 September 11, 2026 20:58
@jwils jwils changed the title joshuaw/proto spec organization Split the proto_ingestion schema spec into cohesive files Sep 11, 2026
@jwils
jwils marked this pull request as ready for review September 11, 2026 20:59
@jwils
jwils removed this pull request from stack #1381 September 13, 2026 15:10
@jwils
jwils force-pushed the joshuaw/proto-spec-organization branch from 78dedef to 6dd2a4c Compare September 13, 2026 15:13
@jwils
jwils changed the base branch from joshuaw/buf-breaking-validation to main September 13, 2026 15:13
@jwils
jwils force-pushed the joshuaw/proto-spec-organization branch from 6dd2a4c to 59a8cff Compare September 13, 2026 15:24

@myronmarston myronmarston left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! I did notice that your commit message mentioned external_proto_enums_spec.rb which does not exist--does that point to something that wasn't included in this PR that was intended to be?

`schema_spec.rb` still held 34 examples covering every proto schema
generation concern, and "schema" is a broad enough label that it would
keep growing. Move each cohesive group out of it:

- `scalar_proto_types_spec.rb` (added by #1306) gains the 4 remaining
  scalar examples, so every scalar proto type example now lives together
- `proto_field_number_mappings_spec.rb` covers field and enum value
  numbers staying stable as the schema evolves
- `abstract_types_spec.rb` covers `oneof` wrappers for interface and union
  types
- `proto_syntax_and_headers_spec.rb` covers the `syntax:` and
  `header_lines:` 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
jwils force-pushed the joshuaw/proto-spec-organization branch from 59a8cff to 589beee Compare September 13, 2026 17:12
@jwils
jwils enabled auto-merge (squash) September 13, 2026 17:15
@jwils
jwils merged commit 2932af6 into main Sep 13, 2026
24 checks passed
@jwils
jwils deleted the joshuaw/proto-spec-organization branch September 13, 2026 17:38
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