Repository navigation
#3934 / #3930: the yml's culture.zone reaches the clock; port tickets reference the COMMAREA class instead of inlining it - #3944
Merged
Conversation
…rence the COMMAREA class #3934: the generated application.yml wrote gitgalaxy.culture.zone but MainframeClock read gitgalaxy.zone, so editing the yml's zone changed nothing. The clock now reads ${gitgalaxy.zone:${gitgalaxy.culture.zone: <baked>}}: gitgalaxy.zone still wins when set (the equivalence harness pins it per case), else the yml's key, else the zone baked in at generation. Audit of the other eight culture keys: none is read at run time (all are applied at generation), so the yml now says so. The Cultural Gauntlet's runtime-static oracle expects the new expression. #3930: port tickets always reference, not inline, a facts.interface record layout the generated contract class carries: the COMMAREA and each container layout, once the dto.contract class is checked field by field (name, PIC, usage, offset, width, copybook). Other keys are kept; the ticket records `referenced` with bytes before / after. Left inline by design: an unpacked COMMAREA, cics_file_lineage (its CSD key length, group and access lines are in no generated class) and record layouts (`records` is a bulk section that never reaches a ticket). On a COACTVWC-shaped CICS fixture: facts.interface 5,055 -> 1,087 bytes (1,529 -> 325 tokens), the ticket 34,219 -> 29,454 bytes. Also: test_lazy_re's fork test builds fresh lazy rules -- deepcopy shares the registry's patterns, which an earlier test may have compiled (it failed under xdist). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01X9PBcL8evG7CEzff1zE8v5
…p6rj # Conflicts: # tests/core_engine/test_lazy_re.py
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.
Summary
Fixes #3934
Fixes #3930
#3934: the generated
application.yml's zone was dead configWhat was wrong.
_culture_ymlwritesgitgalaxy.culture.zone, butMainframeClockread only@Value("${gitgalaxy.zone:<baked>}"). So editing the zone in the yml, as the file invites, changed nothing.The fix. The clock now reads:
Why this order, and not the brief's
${gitgalaxy.culture.zone:${gitgalaxy.zone:…}}. The equivalence harness pinsgitgalaxy.zoneper case (equivalence_java.py:120). With the yml key first, any generated project with a non-default culture (soculture.zonein its yml) would silently ignore the harness's per-case zone.gitgalaxy.zonewin.Audit of the other keys
_culture_ymlwrites. None ofrounding,overflow,format_locale,display_locale,decimal_point,currency,key_collationordb2_date_formathas a run-time reader. All are applied when the code is generated. The yml keeps them as the record of what the project was generated with, and a comment in it now says so: onlyzoneis read at run time, and changing the others means regenerating.Tests (
test_time_zones.py): the clock's@Valueis resolved with Spring's nested${key:default}rules against the generated yml of aculture.zone: Asia/Kolkatamigration.gitgalaxy.zone=UTCalso setThe default culture's yml is unchanged. The Cultural Gauntlet's runtime-static oracle now expects the new expression.
#3930: tickets reference what the generated code carries
reference_generated()runs on every ticket, not only over budget, before #3919'strim_ticket.facts.interfacerecord layout (the COMMAREA, and each container that has a layout) becomesReference: <Class> (<n> fields: name, PIC, usage, offset, bytes, copybook) in <path>. The fact's other keys are kept._carrying_classchecks the generateddto.contractclass field by field.COBOL record <record> (<file>)).referencedlists each replacement with its bytes before and after. Bytes only: a token count depends on whether tiktoken loads, which would make tickets differ by environment.Section by section:
facts.interfaceCOMMAREA and containers_field_linesrenders every named field with name, PIC, usage, offset, width and copybook; the level numbers are in the copybook listings the ticket already attachesfacts.interfaceunpacked COMMAREA (basis: unpack)facts.cics_file_lineagerecordsis a bulk section (_BULK_SECTIONS) that never reaches a ticket; the*Recordentities carry itMeasured on a COACTVWC-shaped CICS fixture: an account view with a CardDemo-style 16-field COMMAREA, two CICS file reads and one BMS map. Tokens are tiktoken
o200k_base.facts.interfacefacts.cics_file_lineage#3863 measured COACTVWC's real
facts.interfaceat 10.9 KB, so its saving should be proportionally larger, but I haven't measured it: the CardDemo corpus isn't in this clone.Tests (
test_port_ticket_references.py, run through the real pipeline):cics_file_lineagestays inline, key lengths included;_carrying_classrefuses a class with a moved field, a different usage, a missing field or another program's record, and a layout with an unknown offset.Refraction snapshots
The pinned mainframe corpora aren't in this clone, so I couldn't regenerate the snapshots here. Two changes will show up once CI has the corpora:
referencedblock;MainframeClockwill show the new@Valueexpression.Type of change
This is COBOL-to-Java generation only, so the engine's golden masters don't move. The branch has
origin/main(with #3940) merged in. #3940 had already fixedtest_lazy_re's order-dependent fork test, so main's version is kept.CI checklist
python tests/tools/audit_check.py: all clear (ruff, mypy, dead-key, format)python -m pytest tests/: 12,929 passed on the merged branchDifferential Scan target
n/a
Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01X9PBcL8evG7CEzff1zE8v5
Generated by Claude Code