Skip to content

equivalence: compile the COBOL oracle with EC-BOUND checks, refuse overrunning scenarios by name (Part of #4449) - #5311

Merged
squid-protocol merged 7 commits into
mainfrom
churn/4449-20261017T0524Z
Oct 17, 2026
Merged

squid-protocol merged 7 commits into
mainfrom
churn/4449-20261017T0524Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Part of #4449 (items 1 and 2 landed earlier in #4455 and #4529; this is the remaining comment).

What changed

  • The COBOL oracle is compiled with -fec=EC-BOUND-SUBSCRIPT and -fec=EC-BOUND-REF-MOD (BOUND_FLAGS, spliced in by compile_options, so every cobc call that uses it carries them). The pinned GnuCOBOL 3.1.2 rejects a comma-joined list, hence two flags.
  • bound_violation() recognises the libcob bounds error. Batch and CALL runs fail with a message naming the item and register X8. A CICS scenario that overruns is refused by name when it is derived or listed in the case's bounds_refused (scenario -> reason), reported as refused and never proven. An unlisted one fails the run with every overrun named at once.
  • The sweep of 94 burned-estate cases (COBOL side) found real overruns, so five cases now carry bounds_refused:
Case Scenarios Item
carddemo-cardlist 16 subscript 0 of VIEW-REQUESTED-ON (COCRDLIC line 518)
carddemo-cotrtlic 6 WS-STRING-OUT ref-mod length 0
carddemo-menu 2 (option-zero, option-blank) subscript 0 of CDEMO-MENU-OPT-USRTYPE
cbsa-bnk1cac 1 (rate-three-places) INTRTI ref-mod past 7 bytes
cbsa-bnk1uac 1 (rate-four-places) INTRTI ref-mod past 7 bytes

On main, cbsa-bnk1cac rate-three-places already diverged (0/3 events equal); it is now a named refusal instead.

  • docs/language_status/register/X8.md: status REFUSED, says how a case answers it and lists the findings.

Plan change

The plan assumed few or no burned-estate overruns. There were 26 scenarios, so bounds_refused was added instead of removing or loosening the check.

Gates

audit_check.py, pr_gates.py --fast (6/6) and --ratchets (8 pass), equivalence_env.py --check (10/10), test_equivalence_*.py (37 pass), register.py --check. Real proofs ran for carddemo-menu, carddemo-cardlist, carddemo-cotrtlic, cbsa-bnk1cac and cbsa-bnk1uac. The other differences in bnk1cac/bnk1uac (mapfail, count-fails, several-errors) also reproduce on main. Golden masters unaffected: only tests/tools, case files and docs changed.

Sibling gaps

  • tests/tools/cics_crucible.py (around line 2088) compiles with cobc without BOUND_FLAGS; it needs the flags, and a burned program needs it: any of the five above.
  • tests/tools/cobol_coverage.py:899 (the cobc -m -ftraceall coverage compile) takes no BOUND_FLAGS; it only measures coverage of runs the oracle already judged, so it needs nothing from a burned program. The batch, CALL and utility compiles in equivalence.py / equivalence_call.py all use compile_options and carry the flags.

Cross-repo

None.

Lessons for agents

  • The pinned cobc takes -fec=EC-BOUND-SUBSCRIPT and -fec=EC-BOUND-REF-MOD as separate flags; -fec=a,b is rejected.
  • A check that raises on the first bad scenario hides the rest; collect all and raise once.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 17, 2026 01:29
…UND-REF-MOD, refuse overrunning scenarios by name (WIP, Part of #4449)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…efused, report every overrun at once (Part of #4449)

The EC-BOUND checks found real overruns in carddemo-cardlist (16), carddemo-cotrtlic (6),
carddemo-menu (2), cbsa-bnk1cac and cbsa-bnk1uac (1 each). Each is now a named refusal, never proven.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 17, 2026 06:24
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 17, 2026 06:27
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5311 @ 6a40687: 2 failed check(s)

== ground-truth (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39009763985/job/117333287236
repro: python tests/tools/pr_gates.py --ratchets --only-ratchets ground-truth
errors:
##[error]Process completed with exit code 1.
log tail:
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {2344af7c-5eae-4b50-80ae-e543573fc867}
Region: centralus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: ground-truth
##[group]Run echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
# #5164: ... or when the plan found no ground-truth input in the PR (mode none). An empty mode is not none.
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && { test "$SKIP" = "true" || test "$MODE" = "none"; }; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
MODE: full
##[endgroup]
ground-truth parts: failure (tested-tree skip: , plan mode: full)
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39009763985/job/117330772237
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/cobol_mainframe/test_evidence.py::test_every_committed_record_is_current tests/cobol_mainframe/test_numproc.py::test_numproc_mig_compiles_as_the_default_under_enterprise_cobol_5_and_later tests/cobol_mainframe/test_numproc.py::test_numproc_pfd_compiles_and_needs_a_det_port tests/cobol_mainframe/test_regional_options.py::test_the_harness_default_is_ibms tests/cobol_mainframe/test_regional_options.py::test_the_harness_maps_what_gnucobol_can_honour tests/cobol_mainframe/test_trunc_opt.py::test_trunc_opt_runs_the_oracle_as_trunc_std
errors:
fail-on-cache-miss: false
E AssertionError: re-prove these in this PR (python tests/tools/evidence.py prove KEY):
tests/cobol_mainframe/test_evidence.py:49: AssertionError
E AssertionError: assert ('\n IDE...GRAM-ID. P.\n' == '\n IDE...GRAM-ID. P.\n'
tests/cobol_mainframe/test_numproc.py:40: AssertionError
E AssertionError: assert ('\n ID...UND-REF-MOD']) == ('\n ID...ry-truncate'])
tests/cobol_mainframe/test_numproc.py:58: AssertionError
E AssertionError: assert (' IDEN...UND-REF-MOD']) == (' IDEN...ry-truncate'])
tests/cobol_mainframe/test_regional_options.py:263: AssertionError
E AssertionError: assert (' IDENT...GRAM-ID. P.\n' == ' IDENT...GRAM-ID. P.\n'
tests/cobol_mainframe/test_regional_options.py:268: AssertionError
tests/cobol_mainframe/test_trunc_opt.py:42: AssertionError
FAILED tests/cobol_mainframe/test_evidence.py::test_every_committed_record_is_current - AssertionError: re-prove these in this PR (python tests/tools/evidence.py prove KEY):
FAILED tests/cobol_mainframe/test_numproc.py::test_numproc_mig_compiles_as_the_default_under_enterprise_cobol_5_and_later - AssertionError: assert ('\n IDE...GRAM-ID. P.\n' == '\n IDE...GRAM-ID. P.\n'
FAILED tests/cobol_mainframe/test_numproc.py::test_numproc_pfd_compiles_and_needs_a_det_port - AssertionError: assert ('\n ID...UND-REF-MOD']) == ('\n ID...ry-truncate'])
FAILED tests/cobol_mainframe/test_regional_options.py::test_the_harness_default_is_ibms - AssertionError: assert (' IDEN...UND-REF-MOD']) == (' IDEN...ry-truncate'])
FAILED tests/cobol_mainframe/test_regional_options.py::test_the_harness_maps_what_gnucobol_can_honour - AssertionError: assert (' IDENT...GRAM-ID. P.\n' == ' IDENT...GRAM-ID. P.\n'
FAILED tests/cobol_mainframe/test_trunc_opt.py::test_trunc_opt_runs_the_oracle_as_trunc_std - AssertionError: assert ('\n IDE...GRAM-ID. P.\n' == '\n IDE...GRAM-ID. P.\n'
##[error]Process completed with exit code 1.
log tail:
archive: true
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
GITGALAXY_MAINFRAME_CORPORA: /home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora
PYTHONUTF8: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/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 134909
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 7fd0d8db475c3262d9f7acc913cd837b2cf0b9415bfb2e057f6c9c7a7367ed45
Finalizing artifact upload
Artifact test-times-ground-truth-part-1 successfully finalized. Artifact ID 12092841528
Artifact test-times-ground-truth-part-1 has been successfully uploaded! Final size is 134909 bytes. Artifact ID is 12092841528
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39009763985/artifacts/12092841528
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/6cdcfd46-708c-4313-873a-4f0b6465e261' 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-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 17, 2026
squid-protocol and others added 2 commits October 17, 2026 02:45
…list and menu (Part of #4449)

The oracle now compiles with EC-BOUND-SUBSCRIPT / EC-BOUND-REF-MOD, so the
compile_options assertions list BOUND_FLAGS. The carddemo-cardlist and
carddemo-menu cases changed on this branch, so their evidence records are
re-proven.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol

Copy link
Copy Markdown
Owner Author

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

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

Copy link
Copy Markdown
Owner Author

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

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). 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:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 17, 2026 06:59
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5311 @ f696ab5: 1 failed check(s)

== det (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39011402929/job/117337640201
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --skip-db2 --cases cbsa-bnk1ccs,cbsa-bnk1tfn,cbsa-bnk1uac,cbsa-crecust,cbsa-delcus,mortgage-cmort,mortgage-csmrt,mortgage-mpmt,zecs-zecs003 --work /tmp/gitgalaxy-scratch/ci-digest/sweep
det cases not proven: cbsa-bnk1ccs,cbsa-bnk1tfn,cbsa-bnk1uac,cbsa-crecust,cbsa-delcus,mortgage-cmort,mortgage-csmrt,mortgage-mpmt,zecs-zecs003
errors:
det mortgage-csmrt NOT PROVEN proven on 5 scenarios, covering 1/1 paragraphs and 1/2 branches
det mortgage-mpmt NOT PROVEN
det zecs-zecs003 NOT PROVEN
det cbsa-bnk1ccs NOT PROVEN proven on 83 scenarios, covering 33/33 paragraphs and 109/143 branches
det cbsa-bnk1tfn NOT PROVEN proven on 45 scenarios, covering 28/28 paragraphs and 53/72 branches
det cbsa-bnk1uac NOT PROVEN proven on 71 scenarios, covering 31/31 paragraphs and 75/88 branches
det cbsa-crecust NOT PROVEN
det cbsa-delcus NOT PROVEN not proven; 16 scenarios cover 22/22 paragraphs and 13/16 branches
det mortgage-cmort NOT PROVEN proven on 16 scenarios, covering 6/6 paragraphs and 18/21 branches
##[error]Process completed with exit code 1.
log tail:
compression-level: 6
overwrite: false
include-hidden-files: false
archive: true
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
With the provided path, there will be 110 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: det-sweep-ledger.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 86728
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 19d0a419e978f881dd6af81552e0763fa535138638de5db17b0beae9774c6aa7
Finalizing artifact upload
Artifact det-sweep-ledger successfully finalized. Artifact ID 12093412119
Artifact det-sweep-ledger has been successfully uploaded! Final size is 86728 bytes. Artifact ID is 12093412119
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39011402929/artifacts/12093412119
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/90ff2d0b-bc31-48b5-959b-5e7ec9e910f0' 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
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-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 17, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (79abb83) 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).

@squid-protocol squid-protocol 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 Oct 17, 2026
…sed scenarios (Part of #4449)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@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 Oct 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 1cf842c into main Oct 17, 2026
50 of 52 checks passed
@squid-protocol
squid-protocol deleted the churn/4449-20261017T0524Z branch October 17, 2026 08:27
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

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