Skip to content

det: a LINKed program's COMMAREA writes survive its abend (#4534) - #4541

Merged
squid-protocol merged 3 commits into
mainfrom
fix/4534-det-link-abend-commarea
Oct 6, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
fix/4534-det-link-abend-commarea

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #4534

Problem

A local LINK passes the caller's own storage, so whatever the LINKed program wrote to its COMMAREA before an abend ended it stays visible to the caller (for example in the caller's HANDLE ABEND exit). The det port copied the COMMAREA back (caBack) only on RETURN or GOBACK, so those writes were lost. This was cics-crucible hc-abend-link sub-unhandled: mXAEYHc came out where mXAEYHcs was expected.

Fix (det/cics.py, det/program.py)

Every abend that ends the program now ends it through a new member abended(), which runs caBack first when the program runs at a LINK level (task.level() > 1). That covers three cases:

  • EXEC CICS ABEND with no exit at this level
  • an unhandled condition's default abend (condition())
  • a LINK that an abend below unwound past this level

Level 1 (a transaction, or a DPL mirror task) is unchanged, because no local caller shares its COMMAREA. Remote DPL semantics stay out of scope. The generator's handleLink façade is the DPL mirror path at level 1, so it doesn't share this path and is unchanged.

Evidence

  • cics-crucible PR ci: implement CodeQL static application security testing #4 head (7bd1e51), det port per case: hc-abend-link is 5/5 java-ported (was 4/5). Every other case and every fail reason is unchanged.
  • cics_crucible --ci on pinned v0.2.0: 152 pass / 44 fail, the same as main (rc 0).
  • Det sweep (proof_sweep.py --det-only --skip-db2): "sweep: as expected".
  • pr_gates.py --ratchets: 6/6 pass, including port-surface. pr_gates.py: 7/7 pass, including golden and the full suite. After the last merge of main, --fast passes 5/5 and the ratchets pass 6/6.
  • New tests in test_det_translate.py fail without the fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR

squid-protocol and others added 3 commits October 6, 2026 01:51
A local LINK passes the caller's own storage, so what the linked program
wrote before an abend ended it stays visible to the caller (e.g. in the
caller's HANDLE ABEND exit). The det port copied the COMMAREA back
(caBack) only on RETURN / GOBACK. Every abend that ends the program --
ABEND, an unhandled condition's default abend, an abend below unwound
past a LINK -- now ends it through abended(), which runs caBack first at
a LINK level (level > 1). Level 1 (a transaction, a DPL mirror task) is
unchanged: no local caller shares its COMMAREA.

cics-crucible hc-abend-link sub-unhandled now passes on the det port.

Closes #4534

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR
@squid-protocol squid-protocol added bug Unintended behavior or logic failure in the engine data-integrity Issues relating to RAM state or SQLite database fidelity legacy-modernization COBOL refractor, dead-code extraction, and JCL forging priority: high Core feature broken, but workarounds exist labels Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 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 6, 2026 06:57
@squid-protocol
squid-protocol merged commit ec59ee0 into main Oct 6, 2026
37 of 39 checks passed
@squid-protocol
squid-protocol deleted the fix/4534-det-link-abend-commarea branch October 6, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unintended behavior or logic failure in the engine data-integrity Issues relating to RAM state or SQLite database fidelity legacy-modernization COBOL refractor, dead-code extraction, and JCL forging priority: high Core feature broken, but workarounds exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

det ports: a LINKed program's COMMAREA writes are lost when it abends (caBack runs only on normal return)

1 participant