Skip to content

Forged-job harness: CardDemo nightly's generated Spring Batch jobs vs the COBOL chain, per step (Part of #8886) - #9081

Merged
squid-shepherd[bot] merged 3 commits into
mainfrom
churn/8886-20261123T0112Z
Nov 23, 2026
Merged

squid-shepherd[bot] merged 3 commits into
mainfrom
churn/8886-20261123T0112Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8886 (slice 1 of N).

What changed

A harness that compares the job BatchForge GENERATES from CardDemo's real nightly JCL with the COBOL chain of #8885, step by step. tests/tools/equivalence_forged_job.py forges the six JCL jobs (TRANBKP's REPROC expanded from its member), reads the generated <Job>JobConfig and DDS_<STEP> constants back, replays the forged guard (the forge's own JclConditions Java, compiled with javac, in the decision JclSteps.guarded makes) over the chain's step return codes, and compares per case step: step order, run or bypass against ran / not reached, and each gdg_in / gdg_out / feeds against the forged Dd constants. tests/equivalence/jobs/carddemo-nightly.forged.json maps case steps to JCL steps. The test embeds the chain report, so it needs the corpus and a JDK but not Docker (2 s).

Result per step (evidence level: forged plan and guard compared; Spring NOT run)

Chain from equivalence.py run carddemo-nightly on this head: 7 steps equal COBOL vs Java, TRANIDX refused by the IDCAMS model, IBM ends the job at carddemo-sort-creastmt (ICE043A), 2 steps not reached.

case step forged guard vs chain DD wiring
carddemo-posttran run = run equal
carddemo-intcalc run = run equal (3 checks)
tranbkp-idcams STEP05R.PRC001, STEP05, STEP10 (COND=(4,LT), earlier RC 0) run = run DIFFERS: no forged FILEOUT Dd
carddemo-sort-combtran run = run equal (3 checks)
combtran-step10-idcams run = run DIFFERS: producer FILEIN not in the forged plan
carddemo-sort-creastmt run = run (RC 16 assumed for the ICE043A stop) equal
creastmt-step020 COND=(0,NE) bypass = not reached equal
carddemo-cbstm03a COND=(0,NE) bypass = not reached equal
carddemo-tranidx run = run; the model refuses the deck, so no chain RC equal; TRANKSDS feed unchecked (no forged DD)

7 of 9 steps equal, 2 differ. The two differ for one reason: //STEP05R.PRC001.FILEIN / FILEOUT are PROC override DDs, galaxy_ir.job_dds does not read them, so the forged TRANBKP has no FILEIN / FILEOUT. Reported as a difference, not worked around; the test pins it so the fix has to update the pin.

Assumptions relied on: RC 16 for the ICE043A step (only nonzero matters to COND=(0,NE)); RC 0 for CREASTMT DELDEF01 and STEP030, which the chain has no case for. Residual risk: the Spring guarded body is replayed, not executed.

Checklist: partial [c:1b7f6936] -- the step differences it names are measured (2 DD-wiring differences, one cause); not yet closed (the engine fix is a remaining slice). The 34 COND scenarios of #4891 slice 1 already agree.
Checklist: partial [c:101680f3] -- the harness compares the plan and guard per step; it does not run the Spring job or compare each step's output datasets and the job's final datasets.
Checklist: partial [c:0d1ebe5a] -- result per step for the 9 case steps above; the run is a replay, not the Spring run.

Class / Sibling gaps

Class: a generated job's step plan diverging from the chain it must equal (order, COND/IF decision, DD wiring, outputs, exit status), here proven on CardDemo's nightly. Siblings: (1) PROC override DDs //STEP.PROC.DD are dropped by job_dds, so any job that wires datasets through an override (TRANBKP's FILEIN / FILEOUT) has no forged Dd; (2) the Spring guarded body is replayed, not run; (3) the case has no step for CREASTMT DELDEF01 / STEP030; (4) TRANIDX's feed is unchecked and its deck is model-refused; (5) output datasets are not compared on the forged side.

Remaining slices

  • Execute the generated Spring Batch job (Spring jars are in ~/.m2) and compare each step's outputs and the final datasets with the chain.
  • Make galaxy_ir.job_dds read PROC override DDs (engine change, golden re-bless), then update the pin in test_forged_job_nightly_8886.py.
  • --forged in equivalence.py run.

Facts checked: #9072 merged 2026-11-23T01:39:19Z (60a66ad); carddemo-nightly.json is on main; chain run on this head as above; audit_check.py all clear; pr_gates --ratchets fails fact-crosscheck, completeness and ground-truth because the shared corpora checkout lacks example-health-apis at its pinned ref (this PR changes no engine file).

Lessons for agents

  • A step the chain never reached is absent from report.json's steps: derive "ran" from the case's steps minus ibm_stop.not_reached, not from the report's list.
  • //STEP.PROCSTEP.DD override DDs are outside galaxy_ir.job_dds and job_flow files them under the PROC step's name, not the job step's.

🤖 Generated with Claude Code

…ain, per step (Part of #8886)

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

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 23, 2026 02:31
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 23, 2026 02:33
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 23, 2026 02:39
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #9081 @ 12f5b83: 2 failed check(s)

== ground-truth (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/45100683201/job/137452709449
repro: python tests/tools/pr_gates.py --ratchets --only-ratchets ground-truth (when a ground-truth part failed too, run that part's repro)
errors:
##[error]Process completed with exit code 1.
log tail:
##[endgroup]
##[group]Operating System
Ubuntu
26.04.1
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-26.04
Version: 20261116.202.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu26/20261116.202/images/ubuntu/Ubuntu2604-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu26%2F20261116.202
##[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 warm: $WARM, parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE, layout: $LAYOUT, warm planned: $PLANNED_WARM)"
echo "ground-truth warm: $WARM, parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE, layout: $LAYOUT, warm planned: $PLANNED_WARM)"
# #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.
ok() { test "$1" = "success" || { test "$1" = "skipped" && { test "$SKIP" = "true" || test "$MODE" = "none"; }; }; }
# #5543: ... or when the layout needs no warm job (a cache hit on the scans, or the busy layout): the parts then warm for themselves
{ ok "$WARM" || { test "$WARM" = "skipped" && test "$PLANNED_WARM" = "false"; }; } && ok "$PARTS"
shell: /usr/bin/bash -e {0}
env:
WARM: skipped
PARTS: failure
SKIP:
MODE: full
PLANNED_WARM: false
LAYOUT: busy
##[endgroup]
ground-truth warm: skipped, parts: failure (tested-tree skip: , plan mode: full, layout: busy, warm planned: false)
##[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/45100683201/job/137450724553
repro: python -m pytest -q tests/cobol_mainframe/test_trials.py::test_every_equivalence_module_is_in_the_frozen_harness_or_named_outside_it
failing tests: tests/cobol_mainframe/test_trials.py::test_every_equivalence_module_is_in_the_frozen_harness_or_named_outside_it
errors:
fail-on-cache-miss: false
E AssertionError: ['tests/tools/equivalence_forged_job.py']
tests/cobol_mainframe/test_trials.py:491: AssertionError
FAILED tests/cobol_mainframe/test_trials.py::test_every_equivalence_module_is_in_the_frozen_harness_or_named_outside_it - AssertionError: ['tests/tools/equivalence_forged_job.py']
##[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: 92dc7f4a84c6038cebc17c4a5964810b8badaa2e6bf6e9db52da58161771f98b
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 191997
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 8853e6f3207c2fb583b81ec3720fa89931734b2111b066c63baffe14b6b71b56
Finalizing artifact upload
Artifact test-times-ground-truth-part-1 successfully finalized. Artifact ID 14785855946
Artifact test-times-ground-truth-part-1 has been successfully uploaded! Final size is 191997 bytes. Artifact ID is 14785855946
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/45100683201/artifacts/14785855946
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/39319cc2-9044-469f-8617-ca43774011bc' 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 23, 2026
@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 23, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (226b001) 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 23, 2026 02:55
@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 23, 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 23, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 23, 2026 02:58
@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 23, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 23, 2026 02:58
@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 23, 2026
@squid-shepherd
squid-shepherd Bot merged commit 05d1ef7 into main Nov 23, 2026
94 of 117 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8886-20261123T0112Z branch November 23, 2026 03:44
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