Skip to content

Fixed-form row wrapper lives in core.cobol_source_format (Part of #5648) - #5801

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5648-fixed-wrap
Oct 21, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5648-fixed-wrap

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5648 (slice 6).

What

The fixed-form row wrapper of det/source.py's as_fixed_rows moves to core.cobol_source_format: wrap_fixed (was _wrap), join_wrapped (was unwrap's _CONTINUED join), and the column constants TEXT_END (72), TEXT_WIDTH (65), FIXED_LEAD, CONTINUATION_LEAD. as_fixed_rows keeps its Line / grammar-literal (QQ, HX) logic, which is translator-only. Moved verbatim.

Class

Fixed-form column layout (col 7 indicator, col 72 edge) knowledge outside core.cobol_source_format. Covered: the translator's wrap and rejoin. Not covered: see Sibling gaps.

Evidence

  • Differential vs main's _wrap / _CONTINUED over 40000 random inputs (quotes, doubled quotes, spaces, 0-200 chars): identical.
  • New tests/core_engine/test_cobol_fixed_wrap_5648.py 7 pass (width, no row past col 72, literal resumes with its quote, doubled quote at col 72, translator holds no copy).
  • tests/cobol_mainframe -k "det or layout or free or copy or comment or feature_inventory or source": 2703 passed, 250 skipped.
  • pr_gates --fast 7/7, --ratchets 8/8, audit_check clear, tree-wide guards green. Golden masters not re-run: no scanner code changed (additive functions in core).

Remaining slices (#5648)

  1. Line map: expanded line -> (file, line), shared type in core, consumed by expand().
  2. >>IF/>>ELSE/>>END-IF/>>DEFINE shared expander using core.compiler_options.
  3. Translator expand() / _replacing onto a core expand(source, libraries); EXEC SQL INCLUDE expansion.
  4. det/source.py logical_lines fixed/free line splitting (indicator, col 72) and _SOURCE_FORMAT onto line_formats (see gap 1).
  5. docs/language_status/fact_ownership.md note.

Sibling gaps

  • det/source.py:297 _SOURCE_FORMAT knows only FREE|FIXED and is matched on line[6:]; core directive_format also reads VARIABLE and Micro Focus $SET SOURCEFORMAT. Not unified here: it changes which lines the translator reads (output risk), needs its own proof. Source: logical_lines.
  • core/data_moves.py:140, core/cics_macro_level.py:92: naive *> cut (from Floating *> comment helpers live in core.cobol_preprocessor (Part of #5648) #5785); needs golden.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 20, 2026 20:05
…ives in core.cobol_source_format (Part of #5648)

as_fixed_rows keeps its Line / grammar-literal logic in the translator and takes the
column-72 wrapping from core. Moved verbatim; differential vs main's _wrap over 40000
random inputs is identical.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 21, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 21, 2026 00:30
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 21, 2026 00:30
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 518492c into main Oct 21, 2026
89 checks passed
@squid-protocol
squid-protocol deleted the churn/5648-fixed-wrap branch October 21, 2026 00:54
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.

1 participant