Skip to content

cics-crucible: Java-leg READ / REWRITE / UNLOCK file events (Part of #4443) - #6261

Merged
squid-protocol merged 7 commits into
mainfrom
churn/4443-20261023T1559Z
Oct 23, 2026
Merged

squid-protocol merged 7 commits into
mainfrom
churn/4443-20261023T1559Z

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #4443 (slice A0: the harness half of the HCUNLK work; the port itself is slice A).

What changed

The cics-crucible case condition-handling/hc-file-unlock (HCUNLK) expects SPEC 6.2 READ / REWRITE / UNLOCK events. The
Java leg could not record any of them, and the compare layer checked only READ's file / ridfld / resp. So no port of HCUNLK
could be proven, and the stub's read-short pass compared nothing of the LENGERR truncation.

  • gitgalaxy/tools/cobol_to_java/cics_task_filecontrol.py: three new forge CicsTask methods that record events.
    • readInto(file, ridfld, update, intoLength, lookup) records READ: file, ridfld, update (only when true), resp, resp2
      (when not NORMAL), length (the record's, after any read), and data (on NORMAL, otherwise null).
      • A record longer than INTO's LENGTH gives LENGERR with RESP2 11 (IBM).
      • LENGERR on READ UPDATE is refused with UnsupportedOperationException: whether the record stays held is not modelled.
      • A negative LENGTH is refused the same way.
    • rewriteFrom(file, from, store) records REWRITE: file, data, resp, resp2. It gives INVREQ 30 when nothing is held.
    • unlock(file) records UNLOCK: file, resp, resp2.
    • The existing read / readForUpdate / rewrite / unlockHeld are untouched and record nothing.
      • Every existing port calls those, and the equivalence side compares files as final state, not as events.
      • So every existing event log is byte-identical. The new test pins that the old methods add no events.
  • tests/tools/cics_crucible_compare.py: EVENT_KEYS now compares READ's full SPEC 6.2 key set (file, ridfld, update,
    resp, resp2, set, length, data), and adds REWRITE and UNLOCK. These key sets match crucible_events.EVENTS.
  • tests/tools/cics_crucible.py:
    • JAVA_CAPS gains READ (without set: READ SET stays unsupported on Java), REWRITE and UNLOCK.
    • java_actual maps them via _java_file_event: base64 ridfld/data become EBCDIC bytes / RawArea.
    • A LENGERR READ's RESP2 is left out of the comparison: SPEC section 2 (Files) asserts the RESP only.
    • COBOL_CAPS is unchanged.
  • tests/cics_crucible/test_file_events_4443.py (new, 6 tests, about 3 s):
    • One javac run of every outcome: READ NORMAL / NOTFND / LENGERR / UPDATE / second UPDATE INVREQ 28, both refusals,
      REWRITE NORMAL / INVREQ 30 (before and after UNLOCK), UNLOCK, and the old methods recording nothing.
    • Those events compared against a hand-written SPEC log.
    • Every key's mismatch fails.
    • What each side does not record stays unsupported.

Baseline moves (tests/cics_crucible/baseline.json, regenerated with --update-baseline)

  • hc-file-unlock/read-short/cobol-stub: pass -> unsupported (stub: READ length). The full run is now 318 pass / 423 fail / 39 unsupported of 780 (was 319 / 423 / 38).
  • hc-file-unlock/unlock-rewrite/cobol-stub and update-rewrite/cobol-stub stay unsupported. Their first missing key is now stub: READ update (was stub: UNLOCK event / stub: REWRITE event).
  • coverage.json / docs/language_status/cics_crucible.md follow: HCUNLK has no proven stub scenario now, so its read-short coverage is dropped (0/9 paragraphs). This is regenerated output.

These are a tightening, not a loosened proof. hc-file-unlock/read-short/cobol-stub passed only because length / data
were never compared. The stub (ggcics.c) records READ's file, key and RESP only, so the cell is now honestly unsupported
(stub: READ length; stub: READ data) until slice A0b. The other stub cells keep their status; their reasons now also name
the READ keys the stub does not record. The Java cells stay failing until slice A ports HCUNLK.

Existing file-using ports

det_port.py check marks 154 of 180 ports changed. In each one, the only change is the shared CicsTask.java (38 lines). The new methods are additive, and no *Service.java moved.
proof_sweep.py --det-only --skip-db2 --jobs 4: sweep: as expected, exit 0. 96 of the 98 non-Db2 det cases proved. The 2 not proven (mortgage-csmrt, mortgage-mpmt) are both listed in det_sweep_baseline.json already.
The Db2 cases were not swept here: they call none of the new methods, and their CicsTask.java change is the same additive 38 lines.

Gates

  • pytest tests/cics_crucible/ (plain pytest from /tmp): 847 passed, 3 skipped.
  • tests/tools/audit_check.py: all clear. pr_gates.py --fast: 7/7 pass. pr_gates.py --ratchets --only-ratchets time: PASS.
  • cics_crucible.py --update-baseline (full run): exit 0. main has not touched the crucible inputs since that run, so it was not re-run after the merge.

Facts checked

  • git diff between the WIP's merge base and origin/main over the crucible inputs (tests/cics_crucible, cics_crucible*.py, cobol_to_java) is empty, so the regenerated baseline still stands.
  • Every changed port's diff is CicsTask.java 38 lines (det check.json); none names a *Service.java.

Sibling gaps (not in this PR)

  • Stub READ update / length / data / resp2, and stub REWRITE / UNLOCK events (ggcics.c, slice A0b). Burned program:
    the crucible's HCUNLK (hc-file-unlock).
  • READ SET and browse events (STARTBR / READNEXT / READPREV / ENDBR) on both Java and stub. Case hc-file-read-set
    (HCRSET); its cobol-stub cells are also blocked by the translator (translator: READ; READNEXT; READPREV).
  • WRITE / DELETE file events: no crucible case expects them yet.
  • The HCUNLK port (slice A). It must call readInto / rewriteFrom / unlock, or its Java cells cannot pass.
  • Mutation floor (slice B); the READ-family LENGTH survey across the burned estates (slice D).

Lessons for agents

  • The crucible_events.EVENTS table (the hand-derived expected-log builder) is the reference for what an event may carry.
    Keep cics_crucible_compare.EVENT_KEYS in step with it when a side starts recording a new event kind.
  • A Java runtime method that every port calls must not start recording events: the COBOL equivalence side records no file
    events, so each existing proof would fail on event pairing. Add a recording overload instead.

🤖 Generated with Claude Code

Checklist: partial [c:8004bd43] -- READ INTO LENGTH events are recorded on both legs; the LENGERR scenario and mutant kill still need a cics-crucible release carrying it (check v0.9.0)

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

1 similar comment
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

squid-protocol added a commit that referenced this pull request Oct 23, 2026
…ects the stub to record READ/REWRITE/UNLOCK (Part of #4443)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ts (Part of #4443) (#6269)

* Split the CICS harness's conditions family into its own module (Part of #5274) (#6250)

* Split the CICS harness's conditions family into its own module (Part of #5274)

HANDLE CONDITION / AID / ABEND, PUSH / POP HANDLE, ASSIGN, the AID transfer after an input command and handler_labels move verbatim into equivalence_cics_conditions.py; the harness dispatches to it and re-exports handler_labels. Registered with the evidence harness inputs and trial.

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

* crucible_events.EVENTS: the four WEB events cics-crucible v0.10.0 added (Part of #5274)

The v0.10.0 pin bump (#6230) added WEB-WRITE-HTTPHEADER, WEB-OPEN, WEB-CONVERSE and
WEB-CLOSE to schema/expected.schema.json, but EVENTS was not updated. That left
test_crucible_case red on main and on every PR. The rows are copied from the
pinned schema.

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

* test_cics_spec: list equivalence_cics_conditions.py as a spec importer (Part of #5274)

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

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* carddemo cotrtupc, acctupdate: PF3 XCTL-fails scenario reaches ABEND-ROUTINE (Part of #6072) (#6259)

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* DL/I command code Q (enqueue) on gets, both runtimes (Part of #5233) (#6258)

Q is accepted on GU/GHU/GN/GHN/GNP/GHNP as no effect (one program, nobody to
wait); refused by name on ISRT. DLICMD Q40-Q45 prove it on the C twin and the
Java runtime; register I5 updated.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* Fact channels: LLM brief section 13 as FACT_LINES / FACT_SUMMARIES tables (Part of #3383) (#6260)

* Fact channels: LLM brief section 13 as FACT_LINES / FACT_SUMMARIES tables (Part of #3383)

_mainframe_facts_lines iterates a table instead of ~20 hand-written branches. Output is
byte-identical against the old method on 3000 randomized payloads.

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

* llm_recorder: ruff format and ISC004 parenthesisation (Part of #3383)

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

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* port_blockers: backfill the multi-estate / no-estate rows P065-P071 (Part of #5051) (#6264)

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* C stub records READ update/length/data/RESP2, REWRITE and UNLOCK events (Part of #4443)

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

* z/OS calibration probes for the remaining MATCHED entries A1, L1, L6 (Part of #4702) (#6263)

Six probes (CEEDAYS x3, CEEDYWK, CEEQCEN, COBDATFT) with oracle_expected measured on the pinned cobc
image (module not found, rc=1) and each note stating the answer z/OS should give. MATCHED_NO_COBC_FORM
is now empty: every MATCHED entry is probed or sorted out.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* Regenerate the CICS crucible baseline: four hc-file-unlock cobol-stub cells run again (Part of #4443)

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

* Stub file-event test: format, and the #6261 stub-unsupported test expects the stub to record READ/REWRITE/UNLOCK (Part of #4443)

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

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Joe Esquibel <[email protected]>
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (13ed36c) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 23, 2026 17:10
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Comment thread tests/tools/equivalence_cics.py Fixed
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6261 @ 13ed36c: 1 failed check(s)

== CodeQL (failure) -- real
https://github.com/squid-protocol/gitgalaxy/runs/120550297737
repro: no local equivalent; read the check page
log tail:
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push.

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 23, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (e54d4f4) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 23, 2026 17:23
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit c34e791 into main Oct 23, 2026
64 checks passed
@squid-protocol
squid-protocol deleted the churn/4443-20261023T1559Z branch October 23, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants