Repository navigation
#3933 / #3910 / #3911: floating currency editing, PICTURE SYMBOL precision, decimal-comma VALUEs -- the India slice passes - #3940
Merged
Conversation
…ision, decimal-comma VALUEs #3933: the generated CobolEdit.format implements IBM floating insertion ($ / currency symbol / + / - strings float to just left of the first significant digit, blanking the insertion characters they pass) and replaces a PICTURE SYMBOL letter (U / I / K) with the whole currency string. #3910: parse_pic_precision counts a declared PICTURE SYMBOL as a floating currency symbol; the schema forge records the program's symbol letters and the Spring forge reads them. #3911: under DECIMAL-POINT IS COMMA a numeric VALUE keeps its decimal comma as written (12345,67); a comma followed by a space still separates (VALUE 1, 2, 3). The Cultural Gauntlet declares the EUR / INR / Rs edited values and its baseline is now empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
This was referenced Sep 27, 2026
Closed
…ness (order-dependent in CI) The language registry is a process-wide global compiled in place, so an earlier test in the same xdist worker may already have compiled python's / objective-c's rules, and deepcopy copies that. The test then asserted they were still lazy and failed depending on test distribution (#3940's CI). It now snapshots rule identities and asserts _precompile_for_fork leaves non-claimants (and everything under spawn) untouched. Reproduced: the old test fails after a test that compiles python's rules first; the new one passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 28, 2026
#3834 (part 3): the Cultural Gauntlet's DB collation, input data and remaining runtime locales
#3947
Merged
squid-protocol
added a commit
that referenced
this pull request
Sep 28, 2026
…remaining runtime locales (#3947) * #3834 (part 3): the Cultural Gauntlet's DB collation, input data and remaining runtime locales D (target DB collation): a PIC X(8) KSDS that CICS browses and a batch step reads sequentially, generated for H2 / PostgreSQL / MySQL. collation-static checks #3822's contract; the opt-in --db layer creates the generated table in the databases this machine has (H2 from ~/.m2, a throwaway PostgreSQL cluster with C and en_US.UTF-8 databases; MySQL skipped, never faked) and reads the keys back through the generated finders' SQL against the keys' EBCDIC byte order. Found #3945 (batch sequential READ is findAll(): no key order). E (input data): DATUM / FECHA typed by PICTURE and SQL type, DB2 EUR / USA / ISO forms through Db2Dates, ROUNDED ties and NUMVAL / zoned over full-width, Arabic-Indic, Thai and Devanagari digits, pinned from GnuCOBOL 3 -std=ibm. Found #3946 (Db2Dates.parseTimestamp takes Arabic-Indic digits). C (rest): tr-TR, ar-EG, th-TH-u-nu-thai, de-DE x UTC / Asia/Kolkata / Europe/Berlin join --run's JVM environments (-Duser.extensions keeps -u-nu-thai); runtime-static traps locale-bound date formatters, SimpleDateFormat, Collator and Character.isDigit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #3834 (part 3): the baseline after #3940 -- only part 3's ledgered cells (#3945, #3946) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
The India slice of the Cultural Gauntlet (#3834 part 2) now passes: its baseline was 67 known failing cells, all three of these bugs, and is now empty (header only).
Fixes #3933
Fixes #3910
Fixes #3911
#3933: floating insertion in the generated
CobolEdit.formatProblem:
$$$,$$9.99of 1234.50 printed$$$,$$4.50. The high-order digits were dropped and the symbols left in place.£,€and₹behaved the same way. A PICTURE SYMBOL (U/I/K) came out as a literal letter.Change:
cobol_to_java_repository_forge._COBOL_EDITnow implements floating insertion, following IBM Enterprise COBOL Language Reference, PICTURE clause, "Floating insertion editing":$(or the currency symbol),+or-, with only, . B 0 /between them. A single$/+/-is still a fixed insertion., B 0 /insertion characters inside the string are blanked while suppression lasts, so$$$,$$9.99of 234.50 prints$234.50, with the$in the comma's position.$$$,$$$.$$of 0.05 prints$.05).$, or any character in the PICTURE that is no editing symbol (U,I,K,£,₹), stands for thecurrencyargument, which is the CURRENCY SIGN string. Withnullthe PICTURE's own character is printed.format(pic, value, decimalComma, currency)). The Javadoc and the port-ticket rule text now describe floating strings and the PICTURE SYMBOL.Multi-character currency spacing (a decision). GnuCOBOL has no multi-character currency strings, so this follows IBM's rule:
'INR 'carries its own trailing space and'Rs'has none. The results:UUU,UU9.99/ 'EUR ' of 1234.50 prints" EUR 1,234.50"III,II9.99/ 'INR ' prints" INR 1,234.50"KK,KK,KK9.99/ 'Rs' prints" Rs1,234.50"KK,KK,KK9.99has 6 integer digit positions (the first K is the symbol), so it cannot hold 1234567.89. COBOL truncates the high-order digit there, like any MOVE. The test pinsKK,KK,KK9.99of 123456.78 asRs1,23,456.78, andKKK,KK,KK9.99/K(3),KK,KK9.99of 1234567.89 asRs12,34,567.89.Checked against GnuCOBOL 3. Every
$/+/-case in the new test (25 of them) was run undergitgalaxy-gnucobol:3withcobc -std=ibm(MOVE of an S9(9)V99 into the edited item) and the output copied verbatim. That covers$,+,-,Binside the float, the float crossing the decimal point, the all-float zero,$$$9.99-, and DECIMAL-POINT IS COMMA$$$.$$9,99.#3910: a PICTURE SYMBOL counts as a floating currency symbol
parse_pic_precision: takescurrency_symbols. A declared symbol letter is read like$, soUUU,UU9.99gives (7, 2) andKK,KK,KK9.99gives (8, 2).render_schemas/parse_cobol_picture/forge_schemas):currency_symbols, only when there are any, so other schemas do not move.engine_sourcing.engine_schemas): takes the program's own symbols plus those its items took from the estate (galaxy_ir._attach_currency). This is the same source the record layout sizes from, so sizing and precision agree.parse_pic_clause/_render_field/ entity and DTO readcurrency_symbolsfrom the schema.java_typetreats edited PICTUREs as String, and_pic_numericonly reads plain numeric PICs, so neither needed a change.#3911: DECIMAL-POINT IS COMMA VALUEs
mainframe_boundary._cobol_recordskeeps the literal as written (VALUE 12345,67gives12345,67), as decided.VALUE 1, 2, 3gives1), and so does any comma in a program without the clause.special_names(read once now). Other callers default to reading the file's SPECIAL-NAMES themselves.value/value_literal: the schema and Java forges, the port tickets,galaxy_ir._value_text(text for LINK / TRANSID resolution only), the equivalence harnesses and the refraction differential. None turns a COBOL VALUE into a number, so there was nothing to change there. The gauntlet'sfactsexpectation (12345,67) already matches the literal as written.VALUE 1,5is still read the old way.Cultural Gauntlet (
--full --run, JDK 21)--full --run --update-baselineleavestests/cultural_gauntlet/baseline.txtheader-only.--full --run --ciand--ciboth exit 0.runtime-runcells check it.Snapshots / golden masters
refraction_snapshot.py check(excerpts) and--corpusfor all six full corpora both report 0 differ: no snapshotted project generatesCobolEditor a PICTURE SYMBOL / decimal-comma field.goldengate passes unchanged.Tests
tests/cobol_mainframe/test_floating_insertion.py: compiles and runs the generatedCobolEditwith the JDK, using the gauntlet'sjdk(). It covers 25 GnuCOBOL-run cases, 3 more single-character cases ($(3),£,₹) by the same rule, 8 IBM multi-character cases, and DECIMAL-POINT IS COMMA.tests/cobol_mainframe/test_picture_symbol_precision.py:parse_pic_precisionwith symbols;VALUE 1, 2, 3.Gates
tests/tools/pr_gates.py(full) on the branch:The one suite failure was already failing on origin/main; this branch did not cause it.
pr_gates.py --only suiteon a clean origin/main worktree (5d27aa1) fails the same test: 1 failed, 12937 passed. The 17 extra passes on this branch are the new tests.After
git merge origin/main(already up to date),pr_gates.py --only lint audits golden gauntlet suitegives the same result: lint, audits, golden and gauntlet pass, and suite has only that one failure.Also run:
tests/cobol_mainframe/test_ground_truth_ledger.pyandtest_ground_truth_diff.pypass (21), andtests/cultural_gauntletpasses (108).🤖 Generated with Claude Code