Skip to content

Fix #4039: generate CobolRecords / CobolEdit for every program to port - #4041

Merged
squid-protocol merged 1 commit into
mainfrom
fix/4039-runtimes-always
Sep 30, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/4039-runtimes-always

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Resolves #4039.

Problem

Every port ticket's rules send the porter through CobolRecords (numval, zoned / packed / binary, sortKey, width / fit) and CobolEdit.format. But the two runtimes were generated only in two cases: beside a VSAM entity, or (#3989) when some program had CICS evidence, meaning a transaction, an EXEC CICS resource, a COMMAREA, a container, or a LINK/XCTL into it.

Anything else got rules naming classes it didn't have. That includes:

  • a batch-only estate over sequential datasets;
  • a CICS program whose only command is SEND TEXT.

Reproduced with such a program on main:

RUNTIMES: ['CobolCompare.java']
ticket mentions CobolEdit.format: True | CobolRecords.numval: True

The porter then either calls a missing class (the port doesn't compile) or hand-writes the parser or formatter the rules forbid. The second path quietly brings back #3831 (Unicode digits), #3827 (decimal comma) and #3985 (SO/SI truncation).

Change

SkeletonForges.sources(): both runtimes are now generated whenever there is a program to port (bool(self.skeletons)), not only when there's a CICS program. #3989's needed flag carries it, so the change is one condition plus comments.

They stay in entity.vsam. The issue suggested moving them to util/, but six places in the repo import them from entity.vsam: three committed ports (CardDemo POSTTRAN and INTCALC, and the CICS crucible's CAXB), the cultural gauntlet and two tests. Any port an agent has already returned in someone's project would break too. The package name is slightly misleading, but not worth a breaking move.

Verification

  • test_runtimes_always.py runs a real scan → refractor → cobol-to-java on a batch-only estate (a sequential file, no VSAM, no CICS) plus a SEND-TEXT-only CICS program, and checks three things:

    • entity/vsam/ holds exactly CobolEdit and CobolRecords, with no entity or repository;
    • both tickets name them;
    • they compile on their own (skipped without javac; I ran it with JDK 21).

    Against main's forge, the first two fail.

  • tests/cobol_mainframe + tests/cics_crucible + tests/equivalence: 1173 passed, 22 skipped.

  • Ruff, mypy and dead-key audits: nothing new.

  • Refraction snapshots: I re-ran the snapshot update for the excerpts and all 6 full corpora, and it left no changes. The snapshot pipeline generates no skeletons, so this condition is never reached there.

  • No parsing logic is touched.

🤖 Generated with Claude Code

Every port ticket's rules send the porter through CobolRecords (numval,
zoned / packed / binary, sortKey, width / fit) and CobolEdit.format, but the
two runtimes were generated only beside a VSAM entity or (#3989) when some
program had CICS evidence. A batch-only estate over sequential datasets, or a
CICS program whose only command is SEND TEXT, got rules naming classes it did
not have: the port did not compile, or hand-wrote the parser the rules forbid
(#3831's Unicode digits, #3827's decimal comma, #3985's SO/SI truncation).

They are now generated whenever there is a program to port. They stay in
entity.vsam, where committed ports and agent-returned code already import them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 318d1eb into main Sep 30, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the fix/4039-runtimes-always branch September 30, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CobolRecords / CobolEdit are generated only with a VSAM store, but every port ticket requires them

1 participant