Skip to content

equivalence: a multi-step job case (kind job): batch steps chained through datasets, each proven (Part of #4268) - #7256

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/4268-20261031T0518Z
Oct 31, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/4268-20261031T0518Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4268

Checklist: partial [c:5944f8ad] -- the harness runs a multi-step job case (batch steps); no committed job case yet (TRANREPT STEP05R -> STEP10R waits on #7251 merging), and Db2/IMS/CICS steps are refused
Checklist: partial [c:9e003ccd] -- F4 states the job case; the IDCAMS DEFINE / utility-step items of F4 remain

What changed

  • tests/tools/equivalence_job.py (new): "kind": "job" case = ordered steps (existing batch case names); a step's feeds ({DD: {step, dd}}) read an earlier step's COBOL output. Each step is proven like a batch case (GnuCOBOL, then the port, via the existing run_cobol / run_java_environments / compare_run); the Java side is given the same bytes the COBOL step read, so equal steps compose to an equal chain. Report: report.json with one entry per step.
  • tests/tools/equivalence.py: 7-line dispatch in main (before corpus resolution; each step resolves its own corpus). --record/--port/--reuse/--case-file refused for a job.
  • tests/cobol_mainframe/test_equivalence_job_4268.py: the feed rules (every refusal by name: <2 steps, repeated step, unknown case, feed from a later step / unknown DD / uncompared DD, db2/ims/cics/call step, record-length mismatch, indexed feed, unknown key), records-to-lines staging round-trip through _fixed (latin-1, utf-8, cp037, cp500; trailing/all-space records), and the run loop with the COBOL/Java sides stubbed (next step reads the earlier COBOL output, differing Java leaves it unproven, abend stops the job, --cobol-only).
  • docs/language_status/register/F4.md: the job case stated; "one program step" no longer the whole story.

Oracle and assumptions

Oracle is GnuCOBOL plus our stub, not z/OS. The wiring between steps is the case's feeds, not a parsed JCL job. A step that abends has no defined datasets, so the job stops and is not proven. The real Docker + JDK run is not exercised by this PR (no committed job case); the loop is pinned with stubs.

Class / Sibling gaps

Class: a multi-step job as an equivalence case (steps chained through datasets). Handled here: sequential batch steps with sequential feeds. Siblings, not here:

Cross-repo

None. No corpus pin change.

Overlap

#7251 also edits tests/tools/equivalence.py (different hunk, program_source sites); merge main after it lands.

Lessons for agents

  • equivalence.py run as __main__ and import equivalence are two modules: a helper module that needs its functions takes sys.modules[__name__] as a parameter (equivalence_call imports only equivalence_common for this reason).
  • A {} db2/ims spec is falsy: test "db2" in case, not case.get("db2"), when classifying a case's kind.

🤖 Generated with Claude Code

…rough datasets, each proven (Part of #4268)

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 05:33
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 31, 2026 05:35
@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