Skip to content

det: JSON GENERATE ON EXCEPTION / NOT ON EXCEPTION for a too-small receiver (Part of #7524) - #7879

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7524-20261106T0800Z
Nov 6, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7524-20261106T0800Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7524

Checklist: partial [c:bb8e1760] -- JSON-CODE, SUPPRESS WHEN, COMP, OCCURS

What

JSON GENERATE ... [NOT] ON EXCEPTION ... END-JSON now 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-JSON becomes END-CALL, so the existing phrase machinery binds the phrases. _phrase_owner lets a nested DISPLAY not swallow NOT ON EXCEPTION. An unmodelled head keeps the old all-in-one hole, so a phrase never dangles.
  • gen.py / JsonGenerate.java: new tryGenerate returns -1 and leaves the receiver and COUNT untouched; EXCEPTION runs under v < 0, NOT EXCEPTION under v >= 0. Without phrases generate still 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, like GG-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

  1. JSON-CODE register (GENERATE and PARSE JSON-STATUS)
  2. JSON PARSE ON EXCEPTION
  3. SUPPRESS WHEN/EVERY, then COMP/COMP-3, OCCURS, CONVERTING

Gates

pr_gates --fast 9/9; audit_check.py all clear; json generate/parse/translate tests pass; det_port.py check 270/270 ports unchanged (so no golden or ledger move; golden not run). merge-tree against origin/main is clean.

Cross-repo: none.

Lessons for agents

  • A nested DISPLAY takes a following NOT ON EXCEPTION in _phrase_owner; skip it while a JSONGEN is open.
  • A new cobolrt method must be added to its rule's methods in cobolrt_rules.json, and cobolrt_api.py generate rerun.
  • Test COBOL lines past column 72 are truncated, giving "undeclared item" errors.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 6, 2026 08:24
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 6, 2026 08:25
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant