Skip to content

det port: a numeric literal MOVEd to a group or alphanumeric item keeps its digits (#8223) - #8269

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8223-20261111T0403Z
Nov 11, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8223-20261111T0403Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #8223: MOVE 08000000 TO WS-START-NUM-TIME (a group) emitted Cobol.move(D8000000,...), losing the leading zero; GnuCOBOL keeps 08000000.

Change

gen.py _move_from calls new literal_digits_to_text: a numeric literal MOVEd to a group, alphanumeric, alphabetic, alphanumeric-edited or reference-modified receiver is its digits as written (leading zeros kept, sign dropped). A noninteger literal there is refused by name (IBM Table 47: invalid; GnuCOBOL only warns, C11). Numeric and numeric-edited receivers still take the value.

Probed on the GnuCOBOL image: MOVE 08000000 TO group -> 08000000; -0012/+0012/0012 to X(6) -> 0012 ; 0012 to XXBXX -> 00 12; 0012 to ZZ,ZZ9 -> 12; 12.50 to X(6) -> 1250 (warning).

Class / Sibling gaps

Class: numeric-literal MOVE to a receiver whose category is not numeric. Members handled with a test each (MOVELITZ e2e program in test_det_programs.py, bytes/typed/groups modes vs GnuCOBOL): group, alphanumeric (unsigned, negative, positive, zero), alphanumeric-edited, numeric-edited (value kept), reference-modified receiver, group with FILLER; noninteger literal refused (test_a_noninteger_literal_moved_to_an_alphanumeric_item_is_refused).
Sibling gaps: none found in the move path. Other literal-text paths (comparison literal_text, INITIALIZE REPLACING) already keep the spelling. hcmadb02 / hcmaba01 (example-health-apis) were not re-proved here: the mainframe corpora checkout on this box is not at the pinned ref.

Gates

Pytest MOVELITZ (3 modes) and refusal test pass; MOVELITZ fails without the fix. pr_gates --fast: 8/9 then the one lint finding (SIM108) fixed and ruff re-checked. NOT run: det_port.py check (base translate aborts: the example-health-apis corpus on this box is not at its pinned ref) and --ratchets.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 11, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 11, 2026 04:24
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 11, 2026 04:25
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

det port: numeric literal with leading zero moved to a group item loses its zero (MOVE 08000000 TO group)

1 participant