test(output-prompt-conformance): deep nested request-VO + depth-guard fallback cross-port#35
Merged
Merged
Conversation
… fallback cross-port
Phase-4 conformance: gate the FR-010 output-format prompt fragment for LARGE,
deeply-nested request payloads — the existing corpus only had a 3-level
pure-singular case (json-deep-nest) and shallow arrays. Two new cases:
- json-deep-mixed (roundTrip:true): a realistic 4-level request VO mixing
every nesting shape in one spec — singular objects 4 deep
(payload.author.contact.{email,verified}), an array-of-objects
(payload.sections[]), a nested enum + boolean, and an optional-with-example.
Gates guide dotted-path recursion at depth, four-level indentation, unquoted
boolean / enum rendering, and (roundTrip) that extract reads the whole graph
back with no MALFORMED/LOST_*.
- json-depth-guard-fallback (roundTrip:false): a 9-level chain that drives the
renderer past MAX_NEST_DEPTH (8). At depth 8 the guard emits the flat {n9}
placeholder instead of recursing into n9's child — pinning that the renderer
never recurses unboundedly, byte-identically across ports (all share
MAX_NEST_DEPTH = 8).
Goldens snapshot-generated by the renderer, reviewed for correctness, then gated.
Verified byte-identical in all five ports: TS 14 / Python 15 / C# 15 / Java 14 /
Kotlin (BUILD SUCCESS). The EXPECTED_CASE_COUNT guard bumps 12 → 14 in all five.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dmealing
enabled auto-merge (squash)
June 15, 2026 03:03
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.
Summary
Phase 4 (deep nested prompt VO conformance): gate the FR-010 output-format prompt fragment for large, deeply-nested request payloads. The existing corpus only had a 3-level pure-singular case (
json-deep-nest) and shallow arrays — nothing exercised a realistic deep VO that mixes nested objects + arrays + singular, and nothing pinned the renderer's depth guard.New cases
json-deep-mixed(roundTrip: true) — a realistic 4-level request VO mixing every nesting shape in one spec:payload.author.contact.{email, verified}payload.sections[](heading+priority)LOW | HIGH) and a boolean (verified)payload.summary)Gates guide dotted-path recursion at depth (
payload.author.contact.email,payload.sections[].priority), four-level indentation, unquoted-boolean / enum rendering, and — viaroundTrip— thatextract(exampleOnly)reads the whole graph back with noMALFORMED/LOST_*.json-depth-guard-fallback(roundTrip: false) — a 9-level chain that drives the renderer pastMAX_NEST_DEPTH(8). At depth 8 the guard emits the flat{n9}placeholder instead of recursing inton9's child — pinning that the renderer never recurses unboundedly, byte-identically across ports (all shareMAX_NEST_DEPTH = 8).Verification
Goldens were snapshot-generated by the renderer, reviewed for correctness, then gated. Byte-identical across all five ports:
The
EXPECTED_CASE_COUNTguard bumps12 → 14in all five runners.🤖 Generated with Claude Code