Skip to content

det: JSON GENERATE sets JSON-CODE 1 on a too-small receiver; JSON-CODE is S9(9) BINARY (Part of #7524, #7709) - #7930

Open
squid-protocol wants to merge 5 commits into
mainfrom
churn/7709-20261106T1518Z
Open

squid-protocol wants to merge 5 commits into
mainfrom
churn/7709-20261106T1518Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7524, #7709.

JSON GENERATE now sets JSON-CODE: 1 when the receiver is too small (the exception condition), 0 otherwise. A program that names JSON-CODE beside ON EXCEPTION used to be refused by name; it now translates, with or without the phrases, with or without COUNT. The hidden JSON-CODE register is IBM's declared S9(9) BINARY (was S9(4)). Modelled from IBM's text only: ASSUMED in register X76, oracle-unbacked, no L2+ claim.

Stacked on #7928 (JSON PARSE sets JSON-CODE; its branch is merged in here). Until it merges, this diff shows its commit too. cobolrt_api.json is regenerated because #7928's new tryParse overload is missing from the manifest (the full-suite manifest test fails on that branch alone).

What changed

  • det/gen.py: json_generate always uses tryGenerate when JSON-CODE is named or a phrase is present, stores 1 / 0, and runs the phrases on the condition. The json_code_store refusal is gone.
  • det/program.py: GG-JSON-CODE is S9(9) BINARY.
  • tests/cobol_mainframe/test_det_json_generate.py: four phrase / COUNT shapes translate and set the code; the width; the stale "refused by name" test is replaced.
  • X76.md, X77.md: register text (X77's "keeps S9(4)" sentence is now false).

Class / Sibling gaps

Class: special-register values a JSON statement sets after it runs (JSON-CODE, JSON-STATUS). Done: JSON-CODE for PARSE (#7928) and for GENERATE (this PR), at IBM's width. Siblings, none with a burned-estate program that uses JSON (no burned program does; fixture tests are the only coverage): (1) GG-JSON-STATUS register, so the status the runtime already computes for PARSE is stored; (2) JSON-STATUS bits 4 to 512 and its value after an exception; (3) GENERATE SUPPRESS WHEN / EVERY (#7905 in flight); (4) CONVERTING, NAME OMITTED, OCCURS DEPENDING ON, tables for PARSE, float items. The census re-survey needs census clones (rule 2): not done. The code 1 for GENERATE is taken from #7928's reading of Table 107; I could not re-read IBM's page (it renders client side) and no oracle backs it.

Remaining slices: the siblings above, in that order.

Checklist: partial [c:9bd1fd57] -- JSON-STATUS register, SUPPRESS WHEN / EVERY, CONVERTING, NAME OMITTED, PARSE tables, float items

Cross-repo: none. Overlaps #7928 (stacked) and #7905 (gen.py, X76.md, test_det_json_generate.py); whichever merges second merges main in.

Verification

  • test_det_json_generate.py, test_det_json_parse.py, test_det_source_4462.py, test_cobolrt_rules.py: 209 passed (JDK 17).
  • pr_gates --fast: only test_cobolrt_api failed, fixed by the regenerated manifest. --ratchets: 9 pass. audit_check.py: all clear. det_port.py check: 270/270 ports unchanged.
  • No census source read or copied.

Lessons for agents

  • A new public overload in a cobolrt file also needs cobolrt_api.py generate (test_cobolrt_api), not only the rules methods list.
  • Selfscan venv: /srv/storage_16tb/projects/gitgalaxy/venvs/selfscan/bin/python; the pinned ruff binary is under ~/.cache/gitgalaxy/ruff-<ver>/bin/ruff.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits November 6, 2026 10:10
, #7709)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…E register is S9(9) BINARY (Part of #7524, #7709)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). 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:48
@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 enabled auto-merge (squash) November 6, 2026 15:53
@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 16:19
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

PR #7930 @ d8b6b37: 1 failed check(s)

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/42246469630/job/127997106500
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-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 161435
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 295865652992cc5653e2cd7cfe5f667a4aa06808a742cfc3ff3ea8e018f8a354
Finalizing artifact upload
Artifact test-times-ground-truth-part-1 successfully finalized. Artifact ID 13519478705
Artifact test-times-ground-truth-part-1 has been successfully uploaded! Final size is 161435 bytes. Artifact ID is 13519478705
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/42246469630/artifacts/13519478705
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/4444dbd2-4fee-4020-b3c7-f04ec28751fd' 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-protocol and others added 2 commits November 6, 2026 11:22
…ment form, so it is public (Part of #7524, #7709)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (32bb478) 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 removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 6, 2026 16:23
@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 16:27
@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 16:28
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

…518Z

# Conflicts:
#	docs/language_status/cobolrt_api.json
#	docs/language_status/register/X76.md
@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

PR #7930 @ 32bb478: 1 failed check(s)

== shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/42251853770/job/128008989834
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)
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 shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 6, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (a17b7b4) 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:11
@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.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 6, 2026 17:13
@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:15
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). 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 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 18:12
@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

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 shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant