Skip to content

equivalence: a SORT case, CardDemo TRANREPT STEP05R lowered and proven against the oracle (Part of #4268) - #7251

Merged
squid-shepherd[bot] merged 4 commits into
mainfrom
churn/4268-20261031T0359Z
Oct 31, 2026
Merged

squid-shepherd[bot] merged 4 commits into
mainfrom
churn/4268-20261031T0359Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4268

Checklist: partial [c:2148d504] -- the case is proven against the oracle for a ZD key and a CH date INCLUDE; the CH-key collation case (waits on #7247), the concatenated-SORTIN COMBTRAN case and the L5 mutation run are left

What changed

No burned-estate COBOL source uses the SORT / MERGE verbs (CardDemo, CBSA, GenApp, zECS, DBB, async credit-card all grepped), so the burned SORT programs are the COBOL that det/dfsort.py lowers from CardDemo's JCL cards. They were proven only in test_dfsort_4268.py, never as an equivalence case.

  • program_source may now be @case/<file>, a program the case carries (same convention as dataset inputs). One helper, equivalence_common.program_file, adopted at the five equivalence.py sites and in det_port.py (translate and the parity check).
  • New case carddemo-sort-tranrept: CardDemo job TRANREPT step STEP05R (SORT FIELDS=(TRAN-CARD-NUM,A) + INCLUDE on the date). DFSORTST.cbl is the lowered step, sortin.txt is 50 unsorted records (one per card of carddemo-trnrpt's POSTTRAN output, dates cycled so the INCLUDE keeps and drops, both boundaries taken), SORTOUT compared under CVTRA05Y. GnuCOBOL runs the program, the det port is its translation: PROVED on 1 run, 1/1 paragraphs, 0/0 branches (the lowered program has no branch in its own paragraphs). Evidence level: translated whole (19/19, no holes); executed-equivalent 1 scenario, no diffs; mutation pending, no approval.
  • test_sort_case_4268.py pins the committed .cbl to the dfsort output, the input's properties (distinct keys, unsorted, keeps and drops) and that every @case/ program resolves.
  • Ledgers: det_sweep_coverage entry, MUTATION_PENDING / MUTATION_UNREVIEWED ratchet entries (no mutation run yet), fact_crosscheck.case_programs skips a case-local program (it checked the clone).

File-cap exception: the case directory is the case (program, input, LICENSE/NOTICE of the source, generated det port and its provenance); the hand-written code is the helper, its 2 adopters, the test, and three one-line edits (fact_crosscheck skip, two mutation-pending ratchet entries) without which main's own tests go red on a new record.

Oracle and assumptions

The oracle is GnuCOBOL plus our stub, not z/OS. The lowering of the DFSORT step to a COBOL SORT is the assumption (register F4, IBM SC23-6878). No EQUALS on the step, so equal keys with differing bytes stop the port by name; the input has distinct keys. The key is ZD and the date compare is CH over digits and hyphens, where EBCDIC and byte order agree (#4035): the case does not claim CH collation over letters.

Class / Sibling gaps

Class: a lowered JCL utility step as an equivalence case (the program is in no corpus). This slice is the SORT with a ZD key and a CH INCLUDE. Siblings, each with the burned-estate program that needs it:

  • COMBTRAN (CardDemo app/jcl/COMBTRAN.jcl): concatenated SORTIN, CH key; its own case.
  • SORTTEST (CardDemo samples/jcl/SORTTEST.jcl): EQ INCLUDE on one date.
  • EBCDIC CH collation over letters: after det dfsort: a CH key or condition is lowered under the EBCDIC collating sequence (Part of #4268) #7247 merges, regenerate DFSORTST.cbl (it gains the collating sequence) and add a letter-keyed case. Nothing burned sorts a CH key over letters yet.
  • MERGE: no burned MERGE step seen.
  • Cross-case readers that join program_source to a corpus clone and would miss a @case/ path: construct_map.scan, port_invariance.sweep_pairs, ladder_gaps, strengthen, estate_evidence, publish_examples. No test covers them with this case; they are not run by CI today. fact_crosscheck is fixed here.
  • L5 mutation run and survivor review (det_mutation.py run carddemo-sort-tranrept).
  • Checklist item 3 (utility steps in the oracle), CH + BI key mixes, VB / U record formats.

Cross-repo

None. The corpus pin is unchanged; the case input is derived from CardDemo's own data (LICENSE and NOTICE copied).

Overlap

Builds on, and does not touch, #7247 (det/dfsort.py, F4.md, test_dfsort_collation_4268.py). When it merges, test_the_committed_program_is_the_dfsort_lowering fails until DFSORTST.cbl is regenerated and the case re-proven.

Lessons for agents

  • A case-local program (no corpus file) needs a port/provenance.json with "translator": "det", or port-surface looks for a generated class that does not exist.
  • A new committed evidence record with mutation: null needs entries in both MUTATION_PENDING (test_evidence.py) and MUTATION_UNREVIEWED (test_estate_evidence.py).

🤖 Generated with Claude Code

…n against the oracle (Part of #4268)

program_source may be @case/<file>: a program the case itself carries, as a JCL SORT step lowered to COBOL
(det/dfsort.py) is, since no corpus holds it. One helper, equivalence_common.program_file, adopted by equivalence.py
and det_port.py. The case carddemo-sort-tranrept is GnuCOBOL against the det port over 50 unsorted records (distinct
keys, the INCLUDE keeping and dropping); evidence recorded, mutation pending.

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 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 31, 2026 04:30
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 31, 2026 04:37
@squid-shepherd
squid-shepherd Bot disabled auto-merge October 31, 2026 04:52
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #7251 @ 99d8c55: 1 failed check(s)

== shard 2/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/41168865024/job/124443289201
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --skip-db2 --cases --work /tmp/gitgalaxy-scratch/ci-digest/sweep
failing tests: tests/cobol_mainframe/test_det_layout.py::test_the_initial_image_is_gnucobols[carddemo-sort-tranrept]
errors:
fail-on-cache-miss: false
E FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora/aws-mainframe-modernization-carddemo/@case/DFSORTST.cbl'
FAILED tests/cobol_mainframe/test_det_layout.py::test_the_initial_image_is_gnucobols[carddemo-sort-tranrept] - FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora/aws-mainframe-m
##[error]Process completed with exit code 1.
log tail:
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
JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.21-9/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.21-9/x64
MAVEN_ARGS: -ntp
GITGALAXY_ORACLE_PREBUILT: 1
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-equivalence-e2e-shard-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 62018
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 1a277aa7082ebafd7c2d706faf1e72e44ec9fc2f8db09c66c60cfbf87a11d458
Finalizing artifact upload
Artifact test-times-equivalence-e2e-shard-2 successfully finalized. Artifact ID 13030402849
Artifact test-times-equivalence-e2e-shard-2 has been successfully uploaded! Final size is 62018 bytes. Artifact ID is 13030402849
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/41168865024/artifacts/13030402849
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/dfae35ae-e05a-4bc8-ae52-56283f775d2d' 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-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 Oct 31, 2026
squid-protocol and others added 2 commits October 31, 2026 00:53
…ollating sequence, test_det_layout reads a case-local program (Part of #4268)

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

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (d68ec11) 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 October 31, 2026 05:02
@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 Oct 31, 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 Oct 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 31, 2026 05:07
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 31, 2026 05:08
@squid-shepherd

Copy link
Copy Markdown
Contributor

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