Skip to content

WIP: Generator: no entry points or handlers with no COBOL behaviour behind them (#4342) - #4349

Merged
squid-protocol merged 12 commits into
mainfrom
fix/4342-generator-no-unbacked-methods
Oct 5, 2026
Merged

squid-protocol merged 12 commits into
mainfrom
fix/4342-generator-no-unbacked-methods

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Draft. Fixes #4342.

Generator

  • executeX only for a program with no forge entry (CICS / CALLed / batch get none; generic controller only then). A batch executeX runBatch(List.of(), null) was tried and dropped: dailyval's entry run showed it is not the step the COBOL runs.
  • No handler method for HANDLE ABEND CANCEL / RESET or a label-less HANDLE CONDITION.
  • Data-driven LINK / XCTL of a CICS program generated as the command through the task (no candidate switch, no case mapping); ports route each COBOL site through its dispatcher.
  • render / submit only when a screen controller calls them (ui.flavour != none).
  • handleTransaction / handleLink are facades running the program through a CicsTask region hook (CicsTask.region()/join/deploy, LocalRegion, generated CicsRegion bean), with a javac runtime test.
  • CicsRegion: a program name with two sources (dsf: src/R0010101.pli, src/GML/R0010101.pli) gets one arm that refuses it -- the CSD installs one and the estate does not say which (was: duplicate case labels, compile (dsf) red). Its clock is the mainframe's zone (gitgalaxy.clock / gitgalaxy.zone / culture.zone, like MainframeClock), never LocalDateTime.now() (was: cultural gauntlet red in full-suite).

Merges

Proof

proof_reach survivor floor: 15, not 29 -- needs owner eyes

The floor counts survivors that sit in code no proof runs. The 14 it lost were in the dispatchers runTask now XCTLs through (COMEN01C 9, COACTVWC 1) and in executeCsutldtc (CSUTLDTC 4, deleted). After the re-run none of those three ports has a survivor in unreached code, so 15 is every flagged survivor there is; the test now also asserts the three contribute none. Getting back to 29 would need unreached code back.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo

squid-protocol and others added 4 commits October 4, 2026 13:54
… them (#4342)

The COBOL-to-Java generator wrote methods that correspond to nothing the COBOL program does, so a port
shipped Java no proof could ever run:

- executeX is written only for a program with a batch entry (runBatch), where it runs the step (no DD
  overrides, no PARM) and returns its RETURN-CODE -- comparable with the COBOL through an entry run. A
  CICS program (runTask) or a CALLed one (handleCall) gets none, and no generic controller calling one.
  The det generator follows the same rule.
- HANDLE ABEND CANCEL / RESET, and a HANDLE CONDITION naming a condition with no label, get no handler
  method: CICS never transfers control to them (the port writes them inline through its task).
- A data-driven LINK / XCTL of a CICS program is generated as the command itself through the program's
  task (task.xctl / task.link on the PROGRAM field, trailing blanks stripped): the path the proof drives.
  No switch over the candidates and no case mapping -- CICS resolves the name, and program names are
  case-sensitive -- so the old toUpperCase (Locale.ROOT or not) is gone. A candidate that receives a
  different record than the site passes is still named in the Javadoc.
- render / submit are written only when a screen controller calls them (ui.flavour thymeleaf /
  openapi-only); with ui.flavour none they were entry points no deployment reaches.

The committed ports are regenerated to match, keeping their hand-ported logic: the executeX of every CICS
and CALLed port (CALINK, CASUB, GTWORK, HCMAIN with seed / bridgeHcsub, HCQREAD, dateutil's
executeCsutldtc, ...) and the uncalled render / submit are removed; cardview's onAbendL871 and acctview's
onAbendL930 (HANDLE ABEND CANCEL) are removed; every CardDemo dispatcher is the generated one and runTask's
XCTL goes through it, one per COBOL site; the batch ports' executeX is the generated delegate.

Harness: an entry run of an int entry compares the RETURN-CODE it returns (a void one still counts as 0),
and dailyval / posttran / trnrpt gain an entry run of their executeX.

Regression tests for each shape: test_uow_transactional (CANCEL / RESET / DEFAULT), test_service_calls
(no executeX for CICS / CALLed programs, the task dispatcher), test_bms_screens (render / submit only with
a controller), test_port_tickets (the batch executeX), test_commarea_unpack, test_proof_reach (REMOVED,
NOW_REACHED).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
#4342, #4343)

handleTransaction and handleLink were log-only stubs: REST endpoints that ran nothing. They are now
generated to run the program -- one task of it in the region (CicsTask.region()) -- so their output is
comparable with the COBOL:

- CicsTask gains the region hook: a Region gives a facade its task (transaction(transid, commarea):
  from a cleared screen the input is the transid typed, with a COMMAREA the whole record; linked(program,
  commarea): the LINK / XCTL level) and runs it. A harness joins one on its thread (CicsTask.join), so a
  facade's task is the scenario's; a deployment installs one (CicsTask.deploy); with neither, a region of
  the program alone. returned(type) is the COMMAREA the level-1 RETURN passed on.
- The generated CicsRegion bean deploys the estate's region: one temporary storage, and a LINK / XCTL
  reaching every CICS program through its service's runTask.
- A channel program (no task runtime for containers) keeps the old handlers.

The CardDemo and GenApp ports' handleTransaction / handleLink are regenerated to the new facades. The
crucible ports' are regenerated with their facade proofs (#4343).

Tests: test_cics_runtimes (the region: local, deployed, joined), test_service_calls (the facades and
CicsRegion).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
A batch program's entry is its JCL step: runBatch with that step's DDs and PARM. The generated
executeX ran it with no DD statements -- runBatch(List.of(), null) -- which is not the step the
COBOL runs: dailyval's entry run showed it (OPEN fails, status 35, ABEND U0999, where the COBOL
step reads its daily transactions). It passed for readcard / readcust / readxref only because those
ports read their files through repositories and ignore the DDs. So executeX (and the generic
controller calling it) is written only for a program no skeleton forge gives an entry to; the batch
ports' executeX and the readcard / readcust / readxref entry runs (#4326) are removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
…regenerated ports

evidence.py refresh --stale --skip-db2 re-proved every non-Db2 record at ec33bb3 (JDK 17, pinned
oracle strict, cics-crucible v0.2.0). test_proof_reach's survivor floor is lowered to 15 with the
reason (14 survivors left with the code #4342 removed or now runs; acctview/menu/dateutil are skipped
until their mutation re-run) -- needs owner review. WIP: EQUIVALENCE_E2E intcalc/posttran end-to-end
tests fail locally, not yet investigated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

squid-protocol and others added 8 commits October 5, 2026 00:56
…ame; its clock is the mainframe's zone (#4342)

dsf has src/R0010101.pli and src/GML/R0010101.pli: the region switch got two
case labels for one name (javac: duplicate case label, compile (dsf)) and
Set.of a duplicate. The CSD installs one of them and the estate does not say
which, so the region refuses that name rather than pick one.

LocalRegion stamped tasks with LocalDateTime.now() -- the JVM's zone (the
cultural gauntlet's rule, #3824). It now takes a clock: the generated
CicsRegion bean honours gitgalaxy.clock / gitgalaxy.zone /
gitgalaxy.culture.zone like MainframeClock; the fallback region uses the
target's culture.zone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
#4079 strengthened (#4342)

Both runs are equivalent (every record equal, every injected fault proven);
the EQUIVALENCE_E2E tests (skipped in CI) still pinned the record counts from
before #4079 appended the #4049 loop's records (INTCALC 50 -> 52 accounts / 53
transactions; POSTTRAN TRANFILE 262 -> 264, DALYREJS 38 -> 41). Not caused by
the generator change; stale on main too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rts (#4342)

mutation.py run (seed 0; acctview / menu sampled 150 as before, dateutil
all 211) at 9c21df6; mutation_scores.py build with every survivor
triaged (92 carried from the earlier run where the mutated line is the
same, 32 judged anew), spliced over the three ports' entries; table and
evidence mutation sections refreshed by the tools.

  COACTVWC  killed 105 / survived 24 (case gap 8, equivalent 16)
  COMEN01C  killed 86 / survived 50 (case gap 7, equivalent 36, unreachable 7)
  CSUTLDTC  killed 145 / survived 50 (equivalent 10, unreachable 40)

None of the three ports' survivors sits in code no proof runs any more:
the 14 the proof_reach floor lost were in the dispatchers runTask now
XCTLs through (10) and in executeCsutldtc (4, gone). The floor stays 15
-- every flagged survivor there is -- and the test now also asserts the
three ports contribute none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
genapp-lgapvs01's record and page: main's taken whole; re-proven and
re-rendered by the tools below, never hand-merged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cbsa-inqacc, cbsa-updacc, genapp-lgicdb01, genapp-lgupdb01 arrived on main
with the old generated surface. Brought to what the generator now writes
(methods transplanted from a fresh generation, the hand-ported logic kept):
no log-only executeX; handleTransaction / handleLink run the program in the
region (UPDACC's handleLink no longer bypasses runTask); each data-driven
LINK is the command through its dispatcher, and runTask goes through it --
LGUPDB01's LINK PROGRAM(LGUPVS01) at line 209, and INQACC's six LINK
PROGRAM(WS-ABEND-PGM) sites (321, 401, 516, 738, 810, 924) each through
its own dispatcher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
evidence.py refresh --stale (Db2 included: the four #4416 ports changed
here) at d03da8b, JDK 17, strict pinned oracle, cics-crucible v0.2.0.
All 28 equivalence records proven, unapproved. The 12 crucible records
stay not-proven on their facade methods, which #4343 proves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol
squid-protocol marked this pull request as ready for review October 5, 2026 09:57
@squid-protocol
squid-protocol merged commit 1aff977 into main Oct 5, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the fix/4342-generator-no-unbacked-methods branch October 5, 2026 09:57
squid-protocol added a commit that referenced this pull request Oct 5, 2026
…des) (#4343) (#4425)

* Crucible ports: facades brought to the generator's by tests/tools/port_surface.py (#4343)

The 17 committed CICS crucible ports kept the entry points the generator wrote before
#4342/#4349: log-only or throwing executeX, handleTransaction / handleLink that ran
runTask on a task of their own (or nothing: HXEXT), render / submit rebuilding screens
outside runTask. port_surface.py takes each facade verbatim from a fresh generation,
drops the ones the generator no longer writes (unless runTask itself calls them) and the
private helpers only they used, and records a 'resurfaced' event in provenance.json.
runTask and the logic it runs are untouched; all 44 java-ported cells still pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Crucible: prove every port through its deployed entry points, the java-facade side (#4343)

The CICS crucible runner gains a java-facade side: the ported project again, each
task entered through its program's Spring facade -- handleTransaction, and
handleLink for a program a LINK / XCTL reaches -- with the scenario's region joined
(CicsTask.join), so the facade's task is the scenario's own (same events, TS,
COMMAREA, screens, abend plumbing) and is compared with the expected log exactly. A
facade that builds a task of its own, or does not run its task in the region, fails.

A port proof (--report-dir) now needs both sides and lists the facades its passing
scenarios entered by (entries); evidence.py prove and crucible_port_provenance.py
reprove run both, so the evidence records' entry_points include the facades.

Results (cics-crucible v0.2.0): 13 ports proven, unapproved through runTask and their
facades. 6 java-facade cells fail on a generator defect, filed as #4427: the
generated handleTransaction types the COMMAREA per program, but the pseudo-
conversations of pc-wizard (PCWIZ -> PC03 -> PCCONF) and pc-aid-menu (PCMENU ->
PC12) carry it across programs. PCCONF, PCWIZ, PCMENU, PCDETL are not proven; their
provenance carries a stale mark citing #4427, and the cells are ledgered in
baseline.json.

Baseline, coverage and cics_crucible.md regenerated by --update-baseline; evidence
records and pages by evidence.py prove / render; provenance by reprove.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

Generator: emit no entry points or handlers that have no COBOL behaviour behind them

1 participant