Skip to content

Execute CardDemo's forged Spring jobs under Spring Batch and compare with the COBOL chain (Part of #8886) - #9121

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

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8886-20261123T1338Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8886 (slice 2 of 3). Stacked on #9117 (slice 1): this branch carries its commits, so the diff shrinks to the three files below once #9117 merges.

What changed

tests/tools/equivalence_forged_spring.py executes the Spring Batch jobs BatchForge generates for CardDemo's nightly and compares every case step with the COBOL chain. It forges with the real forge (skeletons only for the estate's own COBOL programs; job_steps / job_dds / job_sysin from a scan of the JCL), compiles the generated <Job>JobConfig classes and the forge's runtime (JclSteps, JclConditions, DatasetResolver) with javac against the Spring Batch 5.1 jars in ~/.m2, and runs them on an in-memory H2 JobRepository. Each job runs twice: as shipped (strict) and with gitgalaxy.batch.skip-unimplemented.

Program steps call a stub service whose runBatch returns the chain's COBOL return code. The proven ports are NOT linked (a later slice).

Result (evidence level: executed under Spring Batch, program bodies stubbed)

2 of 9 case steps equal, in both modes (POSTTRAN, INTCALC).

  • TRANBKP, COMBTRAN, TRANIDX (5 case steps): utility-only jobs, the forge lists them and generates no job. Slice 1's "9 of 9" held only because it gave every program name, IDCAMS and SORT included, a skeleton.
  • CREASTMT (3 case steps): generated, but DELDEF01 (IDCAMS with more than one command) is refused by the IDCAMS model, so the job FAILS as shipped and STEP010 / STEP020 / STEP040 never start. With skip-unimplemented STEP010 returns RC=0 against the chain's 16, STEP020's SORT finds no dataset (NoSuchFileException), and STEP040 is not started.

Checklist: partial [c:1b7f6936] -- the step differences are now named from an executed job (the 7 non-equal steps above); none closed yet, they are forge or model gaps listed under Remaining slices
Checklist: partial [c:101680f3] -- generated jobs run under Spring Batch and every step's exit is compared, but program steps use stub services returning the chain's RC, not the proven ports; the IDCAMS / SORT runtime ran only where the model lowers the step
Checklist: done [c:0d1ebe5a] -- the run on CardDemo's nightly with a result per step (test_forged_spring_nightly_8886.py pins it)

Class / Sibling gaps

Class: a forged job step that does not do what the chain's step did. Members, with status: POSTTRAN STEP15 and INTCALC STEP15 (equal); TRANBKP (3 steps), COMBTRAN (2), TRANIDX (3 JCL steps): no job generated, utility-only; CREASTMT DELDEF01 (multi-command IDCAMS refused, job fails as shipped); CREASTMT STEP010 / STEP020 (SORT / copy steps need input datasets the harness does not seed); CREASTMT STEP040 (program step, never reached); every program step above runs a stub, not the port. Sibling gaps: forging utility-only jobs or stating them refused by design; IDCAMS multi-command lowering; seeding datasets from the chain; linking the ports; --forged in equivalence.py run.

Remaining slices

  • Link the proven det ports for program steps (then c:101680f3 is done).
  • Forge or explicitly refuse the utility-only jobs; lower DELDEF01's IDCAMS.
  • Seed the input datasets from the chain so utility steps have data; hook --forged into equivalence.py run.

Gates

audit_check.py all clear (ruff, mypy, dead-key, doc-refs, format); pr_gates --fast 9/9 pass; forged-job tests 16 passed locally (the Spring test ~11 s, marked slow). pr_gates --ratchets: 6 pass, 3 fail (fact-crosscheck, completeness, ground-truth), the known environment failure when the shared corpora checkout lacks example-health-apis at its pinned ref; this PR touches no engine, fact or ledger file, so CI is the check for those.

Lessons for agents

  • A stand-in that names every program a skeleton makes the forge treat IDCAMS/SORT jobs as application jobs: forge with only the estate's own program names or the "equal" count is meaningless.
  • Spring Batch 5.1 needs jackson-databind/core/annotations on the classpath for the default ExecutionContext serializer, even with H2.
  • python is not on PATH in a worktree shell; export the selfscan venv bin every call.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits November 23, 2026 08:35
…mo's JCL, not hand-built facts (Part of #8886)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…with the COBOL chain: 2 of 9 steps equal (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 14:27
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 23, 2026 14:27
@squid-shepherd
squid-shepherd Bot merged commit a766aaa into main Nov 23, 2026
70 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8886-20261123T1338Z branch November 23, 2026 14:45
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