Skip to content

det: JSON PARSE sets JSON-CODE from IBM's exception table (Part of #7524, #7709) - #7928

Open
squid-protocol wants to merge 6 commits into
mainfrom
churn/7709-20261106T1439Z
Open

squid-protocol wants to merge 6 commits into
mainfrom
churn/7709-20261106T1439Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7524, #7709.

JSON PARSE now sets JSON-CODE from IBM's Enterprise COBOL 6.3 Programming Guide exception table (Table 109): 100 invalid text, 101 empty, 102 text after the closing brace, 104 incompatible value, 106 no name matched; 0 on success. ON EXCEPTION / NOT ON EXCEPTION test the code. A program naming JSON-CODE beside a JSON PARSE used to be refused; it now translates. Modelled from IBM's text only: ASSUMED in register X77, oracle-unbacked, no L2+ claim.

What changed

  • JsonParse.java: a six-argument tryParse returns the code and a JSON-STATUS value (bits 1 and 2, Table 108); the three-argument form keeps its meaning. Table 108 says a string too long (256) and a number that does not fit (128) are not exceptions and are stored anyway, in a form IBM does not state, so both are now a runtime Hole instead of the exception the old model raised. A bare non-object top level has no stated code: a Hole when JSON-CODE is named.
  • det/gen.py: json_parse stores the code and runs the phrases on it; a program's own JSON-CODE item is kept.
  • Tests: test_det_json_parse.py (code per class, status bits, Hole cases), test_det_json_generate.py (the stale refusal of a JSON PARSE beside JSON-CODE becomes a translation).
  • X77.md: the register text.

Class / Sibling gaps

Class: special-register values a JSON statement sets after it runs. Fixed here: JSON-CODE for PARSE. Sibling gaps, each needing a burned program that reads the register: (1) GENERATE exception code 1 (receiver too small, Table 107) plus the X76 text: the generate half is refused by name when JSON-CODE is named with ON EXCEPTION; (2) the hidden JSON-CODE register is S9(4), IBM's is S9(9) BINARY, and a GG-JSON-STATUS register so the translator stores the status the runtime already computes (program.py); (3) JSON-STATUS after an exception and bits 4 to 512. Needs a burned program that DISPLAYs or tests JSON-CODE after PARSE: not checked against the burned corpora in this slice.

Remaining slices: the three above (I stopped at 5 hand-written files).

Checklist: partial [c:9bd1fd57] -- GENERATE exception code, JSON-STATUS register and width, SUPPRESS WHEN / EVERY, CONVERTING, tables, float items

Cross-repo: none. Overlaps open PR #7905 (gen.py, test_det_json_generate.py): origin/main merged in before pushing; that PR will likely merge first.

Verification

  • test_det_json_parse.py, test_det_json_generate.py, test_det_source_4462.py, test_cobolrt_rules.py: 205 passed (JDK 17).
  • pr_gates --fast: 9/9 pass. audit_check.py: all clear. det_port.py check: 270/270 ports unchanged.
  • No census source read or copied; fixtures only.

Lessons for agents

  • IBM's PDF tables extract fine with pdftotext -layout from the harness-saved file; a fetch subagent twice reported the table missing when it was there.
  • A new public method in a cobolrt file fails test_cobolrt_rules unless its name is in the rule's methods; overloading an existing name (tryParse) avoids touching cobolrt_rules.json.
  • ruff in the selfscan venv is 0.16 and reports 99 baseline findings; audit_check.py is the real gate.

🤖 Generated with Claude Code

, #7709)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@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 15:17
@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

@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 6, 2026 15:40
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

PR #7928 @ 084c822: 1 failed check(s)

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/42241692971/job/127974201280
repro: python -m pytest -q tests/cobol_mainframe/test_cobolrt_api.py::test_the_manifest_is_the_sources_surface
failing tests: tests/cobol_mainframe/test_cobolrt_api.py::test_the_manifest_is_the_sources_surface
errors:
fail-on-cache-miss: false
E AssertionError: assert ['member cobo....py generate'] == []
tests/cobol_mainframe/test_cobolrt_api.py:109: AssertionError
FAILED tests/cobol_mainframe/test_cobolrt_api.py::test_the_manifest_is_the_sources_surface - AssertionError: assert ['member cobo....py generate'] == []
##[error]Process completed with exit code 1.
log tail:
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
GITGALAXY_MAINFRAME_CORPORA: /home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora
MAINFRAME_ENGINE_KEY: a935b70bdc7c1ae70809869353f08342d13d8d6014cc9e7c42f9d180ef5a33bc
PYTHONUTF8: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-ground-truth-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 161991
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 5c174730fd93f211a6f7dfc64b7bc27662db98cd3b8bb8f860a895c1f164a161
Finalizing artifact upload
Artifact test-times-ground-truth-part-1 successfully finalized. Artifact ID 13516219674
Artifact test-times-ground-truth-part-1 has been successfully uploaded! Final size is 161991 bytes. Artifact ID is 13516219674
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/42241692971/artifacts/13516219674
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/22e59af5-c10c-41f8-9a5c-de6fdd6779b1' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd squid-shepherd Bot removed 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

CI shepherd: the head of this PR (1cdad5f) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 6, 2026 15:48
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 6, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels 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 15:55
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 6, 2026 16:01
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 6, 2026 17:03
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push.

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 6, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels 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 17:28
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. 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 enabled auto-merge (squash) November 6, 2026 17:33
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 6, 2026 17:46
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

PR #7928 @ efdb5c2: 12 failed check(s)

== db2 ${{ matrix.shard }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259031031/job/128035226282
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== equivalence-e2e (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259031038/job/128035201953
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== full-suite (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259030989/job/128035176116
repro: python -m pytest -q tests
log tail:
(log unavailable: gh: HTTP 404)

== full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259030989/job/128035176749
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== ground-truth part ${{ matrix.shard }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259030987/job/128035193904
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== ground-truth part 2/4 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/42261943347/job/128045683151
repro: python -m pytest -q tests/cobol_mainframe/test_cobolrt_api.py::test_no_committed_port_or_generator_string_uses_an_internal_member
failing tests: tests/cobol_mainframe/test_cobolrt_api.py::test_no_committed_port_or_generator_string_uses_an_internal_member
errors:
fail-on-cache-miss: false
E AssertionError: assert ['cobolrt.Jso...code uses it'] == []
tests/cobol_mainframe/test_cobolrt_api.py:118: AssertionError
FAILED tests/cobol_mainframe/test_cobolrt_api.py::test_no_committed_port_or_generator_string_uses_an_internal_member - AssertionError: assert ['cobolrt.Jso...code uses it'] == []
##[error]Process completed with exit code 1.
log tail:
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
GITGALAXY_MAINFRAME_CORPORA: /home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora
MAINFRAME_ENGINE_KEY: a935b70bdc7c1ae70809869353f08342d13d8d6014cc9e7c42f9d180ef5a33bc
PYTHONUTF8: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-ground-truth-part-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 92484
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is e02b6b57563cbecc8ba9218e129531ebe6ee603c242bcc1484e666e4293eb5fc
Finalizing artifact upload
Artifact test-times-ground-truth-part-2 successfully finalized. Artifact ID 13525344578
Artifact test-times-ground-truth-part-2 has been successfully uploaded! Final size is 92484 bytes. Artifact ID is 13525344578
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/42261943347/artifacts/13525344578
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/c7890d4c-5fe9-429f-980d-e39d24485f8f' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== ground-truth-warm (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259030987/job/128035192983
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== publish-history (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259030987/job/128035196399
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259031038/job/128035201883
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== shard ${{ matrix.shard }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259031031/job/128035226353
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== store the suite's durations (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259030989/job/128035176133
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== suite time budget (#5166) (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42259030989/job/128035176673
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 6, 2026
squid-protocol and others added 2 commits November 6, 2026 12:51
@squid-shepherd squid-shepherd Bot removed 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

CI shepherd: the head of this PR (6214b19) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 6, 2026 17:59
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md labels Nov 6, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 6, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@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 18:02
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 6, 2026 18:03
@squid-shepherd squid-shepherd Bot removed the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 6, 2026

This branch has not been deployed

No deployments
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