Skip to content

test: evidence records for the four Db2 equivalence cases (#4048) - #4416

Merged
squid-protocol merged 2 commits into
mainfrom
test/db2-evidence-records
Oct 5, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
test/db2-evidence-records

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes the Db2 gap in the #4048 evidence records (the four cases on the MISSING ratchet).

What was done

  • Rebuilt gitgalaxy-gnucobol-db2:3 from tests/equivalence/gnucobol-db2.Dockerfile on the pinned gitgalaxy-gnucobol:3 (the local Db2 image predated the Equivalence oracle: the GnuCOBOL version every proof compares against is neither pinned nor recorded #4309 pin). gitgalaxy-gnucobol:3 was already the pinned build and was not rebuilt.
  • Proved each case with equivalence.py run CASE --record, GITGALAXY_ORACLE_STRICT=1, JDK 17, against the harness's own gitgalaxy-db2 container (IBM Db2 Community, reused, not restarted).
  • Records are tool-written; evidence.json was not hand-edited. Dropped the four cases from MISSING; rendered pages regenerated.
  • Three ports needed a mechanical edit, because fix(forge): name a LINKed program's COMMAREA DTO after its own DFHCOMMAREA #4390 (generator: a LINKed program's COMMAREA DTO is named after its own DFHCOMMAREA) made them stop compiling: AbndprocAbndinfoRec -> AbndprocDfhcommarea (inqacc), and the LGSTSQ link record Lgacdb01CaErrorMsg -> LgstsqDfhcommarea (lgicdb01, lgupdb01). Pure type renames, no logic change.

Oracle fingerprint

cobc (GnuCOBOL) 3.1.2.0, package 3.1.2-5+b1, base debian:bookworm-slim@sha256:3783cc01...a906251, image sha256:d7e387df360c..., matches_pin: true (also true for the db2 image).

Cases

case status scenarios coverage
cbsa-inqacc proven, unapproved 14 22/25 paragraphs, 13/25 branches
cbsa-updacc not-proven: 1 ported_unproven method (handleLink) under the block policy; the proof itself passed 10 7/7, 5/6
genapp-lgicdb01 proven, unapproved 12 3/4, 4/12
genapp-lgupdb01 proven, unapproved 5 8/9, 17/38

All compared records byte-identical; no faults runs.

Checks

test_evidence.py 25 passed; evidence.py render --check clean; mypy/ruff/dead_key audits --ci clean.

Note

genapp-lgapvs01 (non-Db2) still uses the old Lgacdb01CaErrorMsg name and will fail to compile on its next re-proof (it only shows stale on the generator today). Not touched here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo

Proven with the real harness against the pinned oracle (GITGALAXY_ORACLE_STRICT=1) and a rebuilt gitgalaxy-gnucobol-db2:3.
Three ports followed #4390's DTO rename (callee's own DFHCOMMAREA): AbndprocDfhcommarea, LgstsqDfhcommarea.
Drops the four cases from the MISSING ratchet.

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

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 5, 2026 05:36
@squid-protocol
squid-protocol merged commit 3473c23 into main Oct 5, 2026
29 checks passed
@squid-protocol
squid-protocol deleted the test/db2-evidence-records branch October 5, 2026 05:37
squid-protocol added a commit that referenced this pull request Oct 5, 2026
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]>
squid-protocol added a commit that referenced this pull request Oct 5, 2026
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]>
squid-protocol added a commit that referenced this pull request Oct 5, 2026
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 added a commit that referenced this pull request Oct 5, 2026
…ehind them (#4342) (#4349)

* Generator: no entry points or handlers with no COBOL behaviour behind 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

* Generator: CICS entry points run the program through the region's task (#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

* Generator: no executeX for a batch program either (#4342)

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

* WIP #4342: evidence records re-proven by the tools; tests follow the 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

* Generator: CicsRegion runs neither of two sources under one program name; 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]>

* Tests: the CardDemo INTCALC / POSTTRAN end-to-end pins follow the cases #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]>

* ruff format (#4342)

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

* Mutation: acctview, menu, dateutil judged again on the regenerated ports (#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]>

* Db2 ports from #4416 follow the generator's #4342 rules

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: every record re-proven by the tools after the merges (#4342)

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]>

---------

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.

1 participant