Repository navigation
#3819: culture options in the conversion config -- faithful by default, deviations declared - #3849
Merged
Merged
Conversation
…ult, deviations declared The COBOL -> Java target config gains `culture:` -- rounding, overflow, zone, format_locale, display_locale, decimal_point, currency, key_collation, db2_date_format. Every default is what the COBOL program does on its mainframe; a non-default is a business choice. - java_target: Culture dataclass, validation naming each key (IANA zones through zoneinfo, by shape where Python has no tz database; BCP-47 locale tags; an abbreviation like IST is refused as ambiguous), the annotated --init-config text, JavaTarget.deviations() - deviations are business choices that change results (half_even rounding, overflow: error, a format locale, non-EBCDIC key order); settings describing the site (zone, display locale, decimal comma, currency, DB2 date format) are not - application.yml: gitgalaxy.culture.* when any choice is non-default (the default run's file is unchanged; readers carry the defaults) - java_migration_audit.txt: "[0] DECLARED CULTURAL DEVIATIONS" when there are any - porting tickets: the target config shows the culture section - each option carries a TODO naming the issue that implements its behaviour (#3822, #3824, #3825, #3827, #3820, #3828) Tests: tests/cobol_mainframe/test_culture_config.py; the port-ticket test checks the culture section. Mainframe suite 725 passed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
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 epic #3819. This is the configuration layer that the cultural fixes plug into.
What
The COBOL → Java target config (
--config modernize.yaml, template from--init-config) gains aculture:section:Principle: every default reproduces the COBOL program's own behaviour. Anything else is a business choice and gets recorded.
JavaTarget.deviations()lists them, and they appear injava_migration_audit.txtunder "Declared cultural deviations".application.ymlgetsgitgalaxy.culture.*, only when a choice is non-default. The default run's output is unchanged, and generated code will read${gitgalaxy.culture.zone:UTC}and so on.zoneinfo, checked by shape only where Python has no tz database (zero-dep).ISTis refused as ambiguous (India, Ireland or Israel).This PR declares the options. Their behaviour lands in the issues each one's TODO names: #3825 (rounding, overflow), #3824 (zone), #3822 (collation), #3827 (decimal point), #3820 (currency), #3828 (DB2 dates).
Verified
tests/cobol_mainframe/test_culture_config.pycovers:--init-configdocuments every option;application.ymland the audit.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g