Repository navigation
Resurface the 14 CardDemo equivalence ports' facades after #4427; keep Object for cross-program COMMAREAs (#4441) - #4445
Merged
Merged
Conversation
…#4441) port_surface.py equivalence: resurface tests/equivalence/<case>/port against the corpus's fresh generation (ports_compile_check.generate). Only the imports a written facade uses are added. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
evidence.py prove: all 14 proven, unapproved (runTask path; the equivalence harness has no facade side). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
Contributor
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
squid-protocol
marked this pull request as ready for review
October 5, 2026 13:38
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4441.
Decision: the cross-program side of
handleTransactionstaysObject. No sealed or common supertype.A sealed interface (or a generated common supertype) over the DTOs a flow can return is allowed by the #4342/#4349 rule. That rule forbids generated methods with no COBOL behaviour behind them, and an interface with no members adds no method for a proof to miss. It still does not fit the facts, for three reasons:
Objecthave at least one flow whose class the generator cannot name. One example is COSGN00C'sRETURN TRANSID(CC00) COMMAREA(CARDDEMO-COMMAREA)(COSGN00C.cbl:98), which every menu program reaches by XCTL. COSGN00C has no COMMAREA DTO of its own, and CARDDEMO-COMMAREA (COCOM01Y) has one DTO per program that copies it. The skeleton also leaves the callee of that flow unresolved, and of COPAUS1C'sCPVD. The façade Javadoc lists these as(no DTO besides X). So thepermitslist would either claim a closed set the facts do not close, or the generator would fall back toObjecton all 20 and the typed form would appear nowhere in CardDemo. Only the crucible's PC cases have closed sets (PCMENU:PcmenuWsCa,PcdetlWsCa).finalornon-sealed.CarddemoCommareasits in 20 flows. It would need one interface per façade side, or one shared interface whose list is wider than any one façade's real set. Either way, the DTO declarations depend on other programs' navigation facts. In the 4th-estate one-shot that is a new compile risk that adds no behaviour.task.returned(Class)converting the bytes the wayCicsTask.link(..., byte[])does for LINK (det port: LINK COMMAREA(ERROR-MSG) to LGSTSQ marshals past the 71-byte record (GenApp error paths) #4181), so a caller asks for the record it reads. That is a runtime behaviour change and is left as a follow-up.The generated Javadoc already says why the façade is
Objectand lists every crossing flow. No generator change in this PR.Tooling
tests/tools/port_surface.py equivalence --work DIR [--cases ...] [--check]resurfaces the equivalence ports (tests/equivalence/<case>/port). It generates each corpus once, the same way the harness does (ports_compile_check.generate, factored out ofestate()), and appliesresurfaceto each port file against the generated file at the same path. Ports with aprovenance.jsonget aresurfacedhistory event. carddemo-acctview is a Equivalence harness: CICS online programs (EXEC CICS stub runtime on the COBOL side) #3754 hand port with no provenance, so it is resurfaced but not recorded.resurfacenow adds only the imports a written façade uses. Before, it added every generated import the port lacked, which would have putList/Optional/BigDecimalinto 9 batch ports with no façade change. The import regex no longer matches the newline, so identical import lines compare equal.tests/cics_crucible/test_port_surface.pycover the import rule and theequivalencecommand (check, apply, provenance, idempotence).Ports regenerated: 14 equivalence, 0 crucible
CardDemo acctview, adminmenu, billpay, cardlist, cardview, menu, report, tranadd, tranlist, tranview, useradd, userdel, userlist, userupd. Each one got
handleTransactionreplaced, and nothing else changed. Their façades now returnObject/task.returned(Object.class), so thereturned()throw on a cross-program RETURN (the PCMENU bug) is gone.Unchanged, because the surface already matches the generator: signon (no COMMAREA), dateutil, trnrpt, the batch ports, cbsa-inqacc/updacc, genapp. The 17 crucible ports were not touched:
port_surface.py crucible --checkreports every surface as the generator's.Proof
evidence.py proveon the 14: all proven, unapproved. The run counts are unchanged; the port hash, generator hash and reach line numbers moved. The proof goes through runTask: the equivalence harness (equivalence_cics.py) has no façade side (only the CICS crucible hasjava-facade), andhandleTransactionstaysleft_as_generatedin each reach section.ports_compile_check.py --only equivalence: all 28 equivalence ports compile against HEAD (the Ports Compile job's check).crucible --checkrun): 44/44 pass. No generator change, so the java-facade cells were not re-run.test_port_surface,test_proof_reach,test_evidence: pass.pr_gates.py: lint, audits, secrets, xray and gauntlet pass. The golden gate was refused because the local language-crucible checkout is on v1.4.0 and the pin is v1.7.0; this PR changes no engine code. In the suite, 11test_security_auditortests failed because pandas and xgboost are missing from the local venv; nothing else failed (14628 passed).Stale after this PR (mutation not re-run)
mutation_scores.json: carddemo-acctview and carddemo-menu (seed 0, commit 9c21df6). Their port text changed: the façade body, plus a longer Javadoc that moves every later line, by 22 lines in menu. Survivor line numbers recorded for those two no longer point at the same Java lines, and any sampled mutant inside the oldhandleTransactionwas mutating code that is gone. runTask is unchanged, so the kill and survive verdicts on ported logic still hold. The other 12 have no mutation entry.🤖 Generated with Claude Code
https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz