Skip to content

det: model EXEC CICS READ ... INTO LENGTH (#4436) - #4453

Merged
squid-protocol merged 2 commits into
mainfrom
feat/4436-read-length
Oct 5, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
feat/4436-read-length

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

What

EXEC CICS READ ... INTO LENGTH(x) was refused after #4411 (PR #4432) unless x was INTO's own length. GenApp LGUCVS01 and LGUPVS01 lost their proofs to that refusal. This PR models a keyed READ's LENGTH the way IBM's EXEC CICS READ describes it:

  • LENGTH in: the most the program takes.
  • The record: goes INTO. When it is longer than LENGTH it is truncated to LENGTH and the READ raises LENGERR, RESP2 11.
  • LENGTH out: set to the record's actual length, on NORMAL and LENGERR.

The harness ignored LENGTH too. Its stub (GGCREAD) was given LENGTH OF INTO, so both sides ignored LENGTH and still agreed. That is why the earlier GenApp proofs held. The stub now gets LENGTH through GG-LEN and sets it back.

Changes

  • det/cics.py: Cics.read_length emits DetCics.readInto plus the set-back. A literal or LENGTH OF equal to INTO's length translates exactly as before.
  • Still refused by name (det translator: accepted-but-ignored CICS options and swallowed parse errors must REFUSE, not translate silently #4411 audit kept): LENGTH on READNEXT / READPREV and on RBA browses, unless it is INTO's own length.
  • DetCics.readInto / ggcics.c GGCREAD refuse at run time (98 / UnsupportedOperationException):
    • a negative LENGTH;
    • a record moved past INTO (the storage layout, as X6);
    • LENGERR on READ UPDATE, because IBM does not say whether the record stays held.
  • oracle_assumptions.md gets X14. Also a finding in det_port_design.md, and updated notes in the GenApp case files.

Proof

  • det_port.py run, all PROVED:

    case translated
    genapp-lgucvs01 32/32
    genapp-lgupvs01 55/55
    genapp-lgucdb01 71/71
    genapp-lgupdb01 171/171

    In every scenario, LENGTH (EIBCALEN-derived, or 225 from LGUPDB01's LINK) differs from INTO (1024) and from the record (225 / 64).

  • The committed LGUPDB01 model port was re-proven: evidence.py prove genapp-lgupdb01 gives proven, unapproved. The evidence record is refreshed.

  • Tests: test_det_translate.py, test_equivalence_cics.py, test_evidence.py, test_proof_reach.py and test_equivalence_faults.py ran with tree-sitter-language-pack installed: 207 passed. The 2 skips are the opt-in Docker e2e tests.

Not covered

No proven scenario reaches LENGERR. Every non-NORMAL READ in GenApp LINKs LGSTSQ (X6), and both READs are UPDATE. The truncation path is pinned by unit tests only.

Closes #4436

🤖 Generated with Claude Code

https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz

squid-protocol and others added 2 commits October 5, 2026 09:38
A keyed READ's LENGTH is now in-out on both sides, per IBM's EXEC CICS READ:
the record goes INTO, truncated to LENGTH with LENGERR (RESP2 11) when longer,
and LENGTH is set to the record's length on NORMAL / LENGERR.

- det translator: Cics.read_length emits DetCics.readInto and the set-back;
  a literal / LENGTH OF equal to INTO's length translates as before.
  READNEXT / READPREV and RBA browses still refuse any other LENGTH (#4411).
- harness: GGCREAD gets LENGTH through GG-LEN (it was handed LENGTH OF INTO,
  so both sides ignored LENGTH and agreed) and sets it back.
- refused by name on both sides: negative LENGTH, a record moved past INTO
  (X6 storage layout), LENGERR on READ UPDATE (IBM silent on the hold).
- oracle_assumptions.md X14; design-doc finding; case notes.

Re-proven: genapp-lgucvs01, genapp-lgupvs01, genapp-lgucdb01, genapp-lgupdb01
(det), and the committed LGUPDB01 model port (evidence record refreshed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
@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 14:22
@squid-protocol
squid-protocol merged commit 0440595 into main Oct 5, 2026
39 checks passed
@squid-protocol
squid-protocol deleted the feat/4436-read-length branch October 5, 2026 14:22
squid-protocol added a commit that referenced this pull request Oct 5, 2026
…ncluded (#4449)

After #4436 (#4453) merged, genapp-lgupdb01's runTask side passes, so it is proven with
the java-facade side too. java-facade passes 1/5: the det port LGUPVS01's handleLink is
a throwing stub (#4465, the same root cause as cbsa-inqacc / ABNDPROC). Ledgered in
facade_baseline.json and its provenance marked stale. The other 19 were re-proven on the
merged harness. Results are unchanged: 17 proven; signon (#4464) and inqacc (#4465) fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
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.

det translator: model EXEC CICS READ LENGTH (refused since #4411; GenApp LGUCVS01/LGUPVS01 lost their proofs)

1 participant