Skip to content

det layout reads past I-O-CONTROL RERUN, SAME AREA and MULTIPLE FILE clauses (Part of #8412) - #8577

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-rerun-io-control
Nov 17, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-rerun-io-control

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8412

What

BDLDCKP (Batch Badlands) was refused by the det translator on origin/main as of 2026-11-17: LayoutError: DATA DIVISION does not parse near expanded line(s) [11] (the I-O-CONTROL. paragraph's RERUN ON SYSCKPT EVERY 1000 RECORDS OF TRAN-FILE.). #7716 made the extractor keep RERUN, but the det layout still handed the clause to the DATA DIVISION grammar. It now parses (TRAN-REC, WS-TRAN-STATUS, WS-EOF-FLAG, WS-COUNT).

det/layout.py already skipped I-O-CONTROL APPLY clauses (#4486). The same skip now covers the other I-O-CONTROL clauses IBM documents as having no effect on a record's layout: RERUN, SAME [RECORD | SORT | SORT-MERGE] AREA, MULTIPLE FILE TAPE. Each is read to its terminating period, so multi-line clauses work. The behaviour is accepted-with-no-runtime-effect, not refused.

Files (2 hand-written): gitgalaxy/tools/cobol_to_java/det/layout.py, tests/cobol_mainframe/test_det_translate.py (authored fixture: 7 parametrized I-O-CONTROL shapes, one and several lines, two files, mixed clauses).

Checklist: partial [c:37025b61] -- BDLDCKP's DATA DIVISION now parses; I did not re-run the full BDLDCKP det port or its equivalence/Db2-free proof, nor refresh the estate-crucible levels.json BDLDCKP "refused" note (needs the corpus fetched; see Remaining slices).

Class / Sibling gaps

Class: COBOL I-O-CONTROL paragraph clauses the DATA DIVISION grammar does not read. Members: APPLY (handled, #4486), RERUN (handled here), SAME AREA / SAME RECORD AREA / SAME SORT AREA / SAME SORT-MERGE AREA (handled here, shares the mechanism), MULTIPLE FILE TAPE (handled here), COMMITMENT CONTROL (not handled; IBM extension, no burned estate program uses it, left alone). Extractor side: RERUN is kept in file_control (#7716); SAME / MULTIPLE FILE are not extracted, only skipped in the det layout (no runtime effect).

Remaining slices

  • Re-translate and prove BDLDCKP (det_port.py check, then the batch case) and update the estate-crucible levels.json BDLDCKP entry once the corpus is fetched.
  • Fetch the unfetched corpora and run the ground-truth ledger / completeness pins (see below).

Gates

  • pr_gates.py --fast: 9/9 pass.
  • pytest tests/cobol_mainframe/test_det_translate.py -k i_o_control: 8 passed.
  • pr_gates.py --ratchets: 5 pass (cics-spec, port-surface, estate, det-mutation, time); 4 FAIL for environment reasons, not verified green: ports (local cics-crucible is not on its v0.19.0 pin), completeness and ground-truth (example-health-apis not fetched at its pinned ref), fact-crosscheck (failed after a 114 s scan; cause not read from the log, no extractor/fact code changed). CI will measure them.
  • No golden bless: nothing in the detector, prism or language standards changed.

Lessons for agents

  • pr_gates --ratchets in a fresh worktree fails ports, completeness and ground-truth on unfetched / off-pin corpora: run sync-pins.sh and mainframe_corpus.py fetch first, or expect those to be environmental.
  • ruff format --check with the pinned binary still flags two old, untouched spots in test_det_translate.py when invoked on the file directly; pr_gates --fast lint passes.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 17, 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 17, 2026 16:13
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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