Repository navigation
det: JSON GENERATE ON EXCEPTION / NOT ON EXCEPTION for a too-small receiver (Part of #7524) - #7879
Merged
Merged
Conversation
…ceiver (Part of #7524) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
Contributor
This was referenced Nov 6, 2026
Merged
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.
Part of #7524
Checklist: partial [c:bb8e1760] -- JSON-CODE, SUPPRESS WHEN, COMP, OCCURS
What
JSON GENERATE ... [NOT] ON EXCEPTION ... END-JSONnow translates for the one exception condition the model has: the generated JSON is longer than the receiver. Before, that was a runtime Hole, and any phrase made the whole statement a translator hole.stmt.py: for a JSON GENERATE whose head models, the placeholder covers only the head;END-JSONbecomesEND-CALL, so the existing phrase machinery binds the phrases._phrase_ownerlets a nested DISPLAY not swallowNOT ON EXCEPTION. An unmodelled head keeps the old all-in-one hole, so a phrase never dangles.gen.py/JsonGenerate.java: newtryGeneratereturns -1 and leaves the receiver and COUNT untouched; EXCEPTION runs underv < 0, NOT EXCEPTION underv >= 0. Without phrasesgeneratestill throws the Hole.X76.md: records the new assumptions (receiver and COUNT untouched on exception; DISPLAY binding). Still oracle-unbacked, no L2+ claim.Class / Sibling gaps
Class: phrases and special registers on JSON/XML statements in the det translator. Siblings, all still holes: JSON PARSE ON EXCEPTION (needs a parse-failure model and JSON-STATUS), XML GENERATE/PARSE phrases (kept inside their hole, pinned by test), the JSON-CODE register (
program.py, likeGG-SORT-RETURN; shared with PARSE), SUPPRESS WHEN/EVERY, COMP/COMP-3, OCCURS, CONVERTING. No burned program uses JSON, so the fixture is the only evidence.Remaining slices
Gates
pr_gates --fast9/9;audit_check.pyall clear; json generate/parse/translate tests pass;det_port.py check270/270 ports unchanged (so no golden or ledger move; golden not run).merge-treeagainst origin/main is clean.Cross-repo: none.
Lessons for agents
NOT ON EXCEPTIONin_phrase_owner; skip it while a JSONGEN is open.methodsincobolrt_rules.json, andcobolrt_api.py generatererun.🤖 Generated with Claude Code