Repository navigation
The porting loop on CardDemo: an unattended model proves 5 programs, and the tooling it needed - #4040
Merged
Merged
Conversation
…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
Contributor
…ailure, 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
…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
…json is missing (the *.json ignore trap) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
…red 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
…, not errors=replace Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
Closed
10 tasks
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.
This PR runs the porting loop (#3753) unattended on CardDemo and fixes the tooling gaps it exposed. A model ports each program from its ticket, the equivalence harness proves the port, and a failed proof becomes the next attempt's feedback. Full write-up:
docs/language_status/porting_loop.md.Results
The model is Claude Sonnet 5.5, run headless (
claude -p) with no tools, no MCP and no repository settings, from an empty directory. It sees only the ticket's prompt.CardDemo is development data, so these are loop / tooling numbers, not fresh-estate trial numbers.
What failed, and the fix (each is in this PR)
CobolFiles/CobolAbend, so the port did not compile. They're now in the prompt, and the rule states return types.save(). AddedCobolFiles.writeKeyed/rewriteKeyedand a rule, plus a rule on record copies and silent READ errors.task.now()was null for any port that followed the rules. It is now set.void handleCall(String…)could not return BY REFERENCE results or the RETURN-CODE. It is nowCobolRef<T>/int(call forge;test_service_callsupdated).INQUIRE PROGRAMwas untranslated. Added:call(tests/tools/equivalence_call.py);tests/equivalence/le/ceedays.c), which refuses what IBM's docs don't settle (other pictures; a month outside 1–12: 2508 or 2517?);INQUIRE PROGRAMin the translator, stub andCicsTask, injectable.report.jsonnow carries afeedbacksection: the first differing records / events, failing fault runs, and errors once each with the port's own stack frames.Also in here
port/provenance.json(model, attempt, ticket hash).NEXT SENTENCEdefect (the report stops without grand totals) is proven..gitignorenow admitstests/equivalence/*/case.jsonandport/provenance.json. The existing cases had been force-added.equivalence_call.pyand the CEEDAYS model are added totrial.py'sHARNESS_PATHS.Verification
tests/cobol_mainframe+tests/cics_crucible+tests/tools: 1342 passed, 29 skipped (plainpytest, outside the repo).test_porting_loop_tooling.py: 11 passed withEQUIVALENCE_E2E=1, including:--ci: 108/44/0, unchanged, and the coverage ledger reproduces.CicsTask.audit_check.pyall clear;trial.py checkvalid.🤖 Generated with Claude Code
https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ