spec: pin recursion-depth limit for nested validation (RFC-001 §6.4) - #97
Merged
Conversation
This was referenced Jul 16, 2026
trendvidia
force-pushed
the
spec/061-wkt-semantics
branch
from
July 16, 2026 06:19
e5728e0 to
ebcaac6
Compare
trendvidia
force-pushed
the
spec/062-recursion-depth
branch
2 times, most recently
from
July 16, 2026 06:24
b262c2c to
d2e0655
Compare
trendvidia
force-pushed
the
spec/061-wkt-semantics
branch
from
July 16, 2026 06:24
ebcaac6 to
6efd650
Compare
Resolves spec issue #13 (GH #62). - Normative: root at depth 0, each message-typed value +1 (scalars and scalar-collection elements do not count), default 64, configurable via EngineConfig.max_recursion_depth (field 6, previously earmarked; 0 = default). - At the limit: fail-closed synthetic violation (protowire.depth_exceeded, params {limit}, RULE_KIND_VALIDATE), sets Report.truncated, continues with siblings — never a silent accept (fail-open), never a report-destroying hard error. - Depth definition, default, and at-limit behavior are normative for cross-port report equivalence; enforcement mechanism is implementation-defined; per-call SPI overrides allowed. - §7: 'protowire.' violation-code namespace reserved for spec-defined violations (protowire.required, protowire.depth_exceeded). - §13 row 4 resolved; CHANGELOG updated; 08_engine_config.textproto gains max_recursion_depth: 64 (protoc round-trip re-verified).
trendvidia
force-pushed
the
spec/062-recursion-depth
branch
from
July 16, 2026 06:30
d2e0655 to
0c5d978
Compare
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.
Closes #62 (spec item #13). Stacked on #96 (train: #94 → #95 → #96 → this); merge in order.
What
EngineConfig.max_recursion_depth(field 6 — earmarked for this in spec: pin project-level engine-config format (RFC-001 §9.4) #95, now real;0⇒ default).protowire.depth_exceeded(params: {limit},pathat the stopping field,RULE_KIND_VALIDATE), setsReport.truncated = true, and continues with siblings in collect-all mode.protowire.violation-code namespace reserved for spec-defined violations (§7):protowire.required,protowire.depth_exceeded— formalizing what the spec: pin validation report wire shape in report.proto (RFC-001 §7) #94 golden report fixture already assumed.08_engine_config.textprotoupdated and protoc round-trip re-verified.Design decisions
Report.truncated(spec: pin validation report wire shape in report.proto (RFC-001 §7) #94) exists precisely to flag non-exhaustive traversal.