Repository navigation
det translator takes the engine's record layouts, with a check mode (Part of #5649) - #5693
Merged
Merged
Conversation
…rt of #5649) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…line (mypy) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 20, 2026 05:32
Contributor
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 #5649 (slice 2 = issue Work step 3). Slice 1 (steps 1-2) merged as #5656.
Owner decisions
Issue #5649 (owner OK 2026-10-19; copy this line into the PR body under
## Owner decisions): translator consumes engine record layouts.What
The det translator can now take every record layout from the engine (
GalaxyIR.record_layout) instead of computing ititself. It asks for its own storage's POINTER width (
det.cics.POINTER_BYTES= 8, GnuCOBOL x86-64, register C9),the parameter added in #5656. The translator's own computation stays beside it behind a check mode for one release:
any difference refuses the program by name (
LayoutDisagrees).gitgalaxy/tools/cobol_to_java/det/engine_layout.py(new):EngineRecordsfinds the engine's record at the translator's file / line / level. A section-levelCOPY ... REPLACINGrecord is found by name (fact cross-check: engine adapter misses section-COPY-REPLACING records (329 stale ledger entries); update needs --corpus to drop entries #4472). This matching moved here fromfact_crosscheck.engine_extras,so the cross-check and the translator pair records the same way.
adopt()gives each elementary item the engine's offset and width. Groups, REDEFINES overlays and OCCURS stridesare then derived from those items.
EngineLayouts, modesengine|check.det/program.py:translate(..., layouts=)is passed down to_translateand to sibling-program services.stats["engine_layouts"]= {engine, own} record counts.tests/tools/det_port.py:port_casepasses check-mode layouts from the estate's scan DB (the clean room besidethe generated project).
tests/tools/fact_crosscheck.py:engine_extrasusesEngineRecords(same matching as before, no ledger move).Records the engine has no entry for keep the translator's layout and are counted as
own: system members such asDFHAID / DFHBMSCA, generated BMS maps, special registers.
Class (record-layout facts both sides computed)
adopt; toy test at z/OS 4 moves every item after a POINTERWS-REC0+11 at width 4R-ALTsits onR-X@4T-Estride 5,T-END@15EngineRecordsCP-RECconsumedSYS-RECownEvidence
det_port.py check(fresh--work, base = origin/main): 139/139 ports unchanged with check mode on. Everyburned-estate port (CardDemo, CBSA, GenApp, zECS, DBB MortgageApplication, async credit-card) translates
byte-for-byte the same on engine layouts, and no record refused. The Java is identical, so no proof moves and nothing
needs re-proving.
cardupdate 16 records from the engine / 2 own, posttran 48/2, signon 57/4, cbstm03b 66/4. The only records left to
the translator are DFHAID and DFHBMSCA.
pr_gates.py --fast6/6.pr_gates.py --ratchets8/8 (ports, port-surface, estate, fact-crosscheck, completeness, ground-truth, cics-spec, time). Tree-wide guard tests pass (184).tests/tools/1066 passed; one failure,test_pin_requirements_check_all: uv reports sixci/requirements/templates/requirementsfiles stale. This PR does not touch them. The run used-x, so the det / cross-check test files after that point were run separately: 970 passed, 115 skipped (Docker / JDK end-to-end cells; the translation is byte-identical, so they are unaffected).. New/changed tests timed: 0 over the limit.
Remaining slices
layouts=:tests/tools/equivalence_java.py,gitgalaxy/tools/cobol_to_java/port_runner.py,tests/tools/cics_crucible_det.py,cics_case_ports.py,det_survey.py,readiness/dryrun.py. Each needs a GalaxyIR for its estate; the CICS crucible cases have nonetoday, so they need a scan step first.
docs/language_status/fact_ownership.md, the "record layouts / offsets" row. State that layouts areowned and computed by the engine and that the translator consumes them in check mode. Add the numbers above.
enginemode, delete the translator's own offset computation indet/layout.py, and retire the duplicate check.Sibling gaps
would refuse (
does not know the record's width). Needed by DBB MortgageApplicationepscsmrd.cbl(
1 ROUTINE PROCEDURE-POINTER). It is not in a det_port case today: check mode passed on all 139.engine's slack. No burned program declares
POINTER SYNC.Programs: CardDemo COCRDUPC, COUSR01C, COTRN02C (DFHAID); CBSA UPDACC.
🤖 Generated with Claude Code