Repository navigation
#3989: port the CICS crucible through the porting loop (17/17 proven, java-ported 37/37) - #4025
Merged
Merged
Conversation
… java-ported side Claude Opus 5.5 (port_runner's command backend, Claude Code print mode with no tools) ported every crucible program's runTask. tests/tools/cics_crucible.py proves each port as port_runner prove's command. All 17 are proven: 9 at attempt 1, 7 at attempt 2 and 1 at attempt 3. The new java-ported side passes 37 of 37 cells. Every failure was fixed in gitgalaxy, never in a port: - CicsTask: EIBTRMID (termid); HANDLE ABEND's upward exit search across LINK levels (handleAbend / abend / abendOnCondition / abendExit, PUSH / POP); the LINK LENGTH on a level-2 RETURN. - The generator emits CobolEdit / CobolRecords for CICS estates. The rules require them even when the estate has no VSAM entities. - Porting rules: EIBTRMID and ASKTIME, condition / abend handling, and COMMAREAs with no DTO. - Harness: a DTO is compared as its record's bytes; String / byte[] COMMAREAs. - port_runner run --feedback: the next attempt gets the failed proof's first divergences and the failed port. Each proposal logs its ticket hash. The proven ports are committed with their provenance under tests/cics_crucible/ports. None is approved. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EC8FWfn3aPmsUPnRgKNVup
Comment on lines
+132
to
+133
| "The equivalence harness ran it against the expected behaviour. What it found, per scenario that did not" | ||
| " pass (the first divergence only: later ones may hide behind it):", |
Contributor
squid-protocol
added a commit
that referenced
this pull request
Sep 30, 2026
…on ignore rule PR #4025 described committing provenance.json with each crucible port (model, backend, attempt, ticket hash, attempt history), but .gitignore's blanket *.json dropped every one; they survived only in that PR's worktree. Copied back unchanged, and the ignore rule now admits them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
squid-protocol
added a commit
that referenced
this pull request
Sep 30, 2026
…and the tooling it needed (#4040) * The porting loop on CardDemo: an unattended model proves 5 programs, and the tooling it needed tests/tools/porting_loop.py drives port_runner end to end on one equivalence case. A model (Claude Code headless: no tools, no MCP, run in the attempt's own directory, so it sees only the ticket's prompt) ports the program. The harness proves it: every output / event / CALL and every fault run. A failed proof's findings are the next attempt's feedback. Results (Claude Sonnet 5.5): - INTCALC (CBACT04C): attempt 1, 19 fault runs. - POSTTRAN (CBTRN02C): attempt 1, 28 fault runs. - TRANREPT (CBTRN03C), new case: attempt 1, 447 report lines, 24 fault runs. - COMEN01C, new CICS case: attempt 1, 11 scenarios. - CSUTLDTC, new CALL case: attempt 2, 11 CALLs through CEEDAYS. Details, and what each failure taught: docs/language_status/porting_loop.md. The failures were in what we gave the model; each is fixed here: - the prompt lists CobolFiles / CobolAbend, and the file-status rule states return types; - CobolFiles.writeKeyed / rewriteKeyed: a KSDS WRITE of an existing key is 22, not save(); rule on record copies and silent READ errors; - the CICS equivalence test sets the task's clock (task.now() was null); - a CALLed program's BY REFERENCE elementary item is a CobolRef<T>, and handleCall / call<Target> return the RETURN-CODE (the void/String signature could not be correct); - new case kind "call" (equivalence_call.py) and a documented CEEDAYS model (tests/equivalence/le/ceedays.c) that refuses what IBM's docs don't settle; - EXEC CICS INQUIRE PROGRAM in the translator, stub and CicsTask, injectable like READ; - proof feedback in report.json: first differing records / events, failing fault runs, compiler / test errors once each with the port's own frames. New cases: carddemo-trnrpt (its last transaction out of range, so the program's NEXT SENTENCE defect is proven), carddemo-menu, carddemo-dateutil. Each has the loop's port, unedited, with port/provenance.json. .gitignore now admits equivalence case.json and provenance.json. Filed along the way: #4037 (reserved-word column), #4031 (engine END- paragraphs). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ * porting-loop skill + CLAUDE.md pointer: how to run the loop, read a failure, build a case The `porting-loop` skill records the loop's workflow and what this round taught: - how to run it (JDK 17, the corpora cache, the no-tools headless model, parallelism); - a table for deciding who owns a failure (ticket, harness, runtime, generator, model, case), with the fix each round made; - how to build a case worth measuring (faults, coverage gaps, IBM services modelled only where documented); - how to commit a proven port with provenance; - the environment traps. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ * Restore the 17 CICS crucible ports' provenance.json, lost to the *.json ignore rule PR #4025 described committing provenance.json with each crucible port (model, backend, attempt, ticket hash, attempt history), but .gitignore's blanket *.json dropped every one; they survived only in that PR's worktree. Copied back unchanged, and the ignore rule now admits them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ * Guard: fail when a committed port's provenance.json or a case's case.json is missing (the *.json ignore trap) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ * Break the equivalence <-> equivalence_call import cycle (CodeQL): shared pieces live in equivalence_common CodeQL flagged equivalence.py importing equivalence_call, which imported equivalence back for diff_records and java_failure_report. equivalence_cics had the same back-import for the failure report. The harness already keeps what every module shares in the leaf module equivalence_common ("no cycle; re-exported here"), so the record diff (diff_records with its two helpers) and java_failure_report move there verbatim, and equivalence.py re-exports them. The submodules now import only equivalence_common. No behaviour change: the harness tests pass, and the CALL case and a batch case with fault runs still prove end to end. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ * #4040: decode logs through source_text.decode_bytes (the #3813 guard), not errors=replace Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Part of #3989 (the porting step): the crucible's 17 CICS programs are ported by a model through the porting loop, and the crucible harness proves each port.
Result
All 17 programs are proven; the new
java-portedside passes 37 / 37 cells.commandbackend: Claude Code in print mode, with no tools, no MCP and no project context.port_runner prove, which runstests/tools/cics_crucible.pyagainst the crucible's hand-written expected logs.port_runner reviewis Joe's.The per-program table and the failure causes are in
docs/cobol_to_java_porting_loop.md("Measured: CICS crucible, Claude via the command backend").Failures and the fixes (all in gitgalaxy; no port was hand-edited)
CicsTaskhad no EIBTRMIDtask.termid(); the driver passes the task's terminalCicsTaskdid not model HANDLE ABEND's upward exit search across LINK levels. The ports invented incompatible exception protocols, and an exception through a@Transactionalservice rolled the task backhandleAbend/handleAbendCancel/handleAbendReset,pushHandle/popHandle.abend/abendOnConditionnow search the exits and return the label to continue at (or null: stop).abendExit()after a LINK. New porting rule; never throw to model a CICS transferCicsTaskrecords it; the runner uses itPIC X(32767)COMMAREA has no DTOsendMap(..., null)What changed
tests/tools/cics_crucible.py:java-portedside: the generated project with each case's committed ports laid over it (tests/cics_crucible/ports/<case>/<PROGRAM>/overlay), re-proven on every run.port_runner prove --command:--ports,--overlay {port_dir},--program,--report-dir {report_dir}. It writesreport.jsonwith per-scenario results and afeedbacktext (first divergence, operator steps, the expected event there, what the port recorded, compile errors).javaside still measures the unported generator output.port_runner run --feedback: the next attempt gets the last failed proof's feedback and that port. Each proposal logsticket_sha256,prompt_tokensandfeedback_from.provenance.json(model, backend command, attempt, ticket hash, notes, full attempt history, proof) and a NOTICE. The crucible is Apache-2.0.java-ported.Checks
ruff_audit/mypy_audit/dead_key_audit --ci: no new findings (feedbackallowlisted as a proof-report key).ruff formaton touched files.tests/cics_crucible,tests/cobol_mainframe,tests/cultural_gauntlet.--update-baseline.Generated output changes:
CicsTask(termid, abend exits, LINK length at RETURN), CobolEdit / CobolRecords now present in CICS estates without VSAM, and ticket rule text. java-compile's--same-aswill see the change and build.🤖 Generated with Claude Code