Skip to content

Line map: MappedLine / line_map live in core.cobol_preprocessor (Part of #5648) - #5875

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5648-line-map
Oct 21, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5648-line-map

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5648 (slice 7: the line map).

What

core.cobol_preprocessor gains MappedLine (text, file, 1-based line; origin = file:line, short_origin = CUSTREC.cpy:12) and line_map(lines) (entry i = (file, line) of expanded line i). The translator's Line now extends MappedLine and keeps only its column-72 bookkeeping (cut, lost, lost_after, lost_joined); expand() builds its COPY error location from ln.origin. A COPY member's lines already carried the member's own file and line; this makes that the shared type instead of a translator-private one. Output is unchanged (error text identical: file:line).

Class

"Where an expanded line came from" held only in the translator's private Line. Covered: the shared type and map, with translator on it. Not covered: see Sibling gaps.

Evidence

  • New tests/core_engine/test_cobol_line_map_5648.py (3 pass): origin / short_origin / line_map; translator Line is a MappedLine with no extra fields leaking into core; nested COPY + REPLACING in fixed and free format, each member line keeps its member file and line.
  • tests/cobol_mainframe -k "det or layout or free or copy or comment or feature_inventory or source" + new test + test_source_reads: 2770 passed, 258 skipped.
  • pr_gates --fast 7/7, --ratchets 8/8 (fact-crosscheck, ground-truth, estate, ports all PASS), tree-wide guards green. Golden masters not re-run: no scanner code changed (additive in core, translator only).

Remaining slices (#5648)

  1. >>IF/>>ELSE/>>END-IF/>>DEFINE shared expander using core.compiler_options (core + det/source.py + test).
  2. Translator expand() / _replacing onto a core expand(source, libraries); EXEC SQL INCLUDE expansion.
  3. det/source.py logical_lines fixed/free splitting and _SOURCE_FORMAT onto line_formats (see gap 1).
  4. Scanner (mainframe_boundary._copy_replacing, galaxy_ir REPLACING) consuming MappedLine / line_map so findings cite CUSTREC.cpy:12.
  5. docs/language_status/fact_ownership.md note.

Sibling gaps

Co-Authored-By: Claude Sonnet 5.5 [email protected]

🤖 Generated with Claude Code

…map; translator Line extends it (Part of #5648)

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 14:20
@squid-protocol
squid-protocol enabled auto-merge (squash) October 21, 2026 14:23
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5875 @ ed32a29: 1 failed check(s)

== shard 4 (1666524 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39615994221/job/119279124910
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[helion]
errors:
fail-on-cache-miss: false
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:40: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[helion] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
file Tests/Unit/GameAction/Physics/Physics_Missile.cs: functions 15 -> 16, func_hash '63fb1953345d4acf' -> 'ab0449a22c0c5501'
file Tests/Unit/GameAction/Util/GameAction_Player.cs: functions 7 -> 9, func_hash 'e083523f533b132f' -> '6110616e13bc1aa8'
file Tests/Unit/GameAction/Util/InventoryUtil.cs: functions 10 -> 11, func_hash '618655e059ab7f12' -> 'bff66d6382432df6'
file Tests/Unit/GameAction/Vanilla/VanillaThingFlags.cs: functions 5 -> 6, func_hash '9703f2dc97589529' -> '7363a7dcf8ca648c'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "helion: 7 difference(s) from the golden\n summary.files_func_mismatch: 373 -> 377\n summary.functions: 9813 -> 9818...sts/Unit/GameAction/Vanilla/VanillaThingFlags.cs: functions 5 -> 6, func_hash '9703f2dc97589529' -> '7363a7d
1 failed, 11 passed, 6 deselected in 154.13s (0:02:34)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 4 (1666524 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: agentic-cobol-doom-cc,crispy-doom,doo-cr,doomf77,fastdoom,helion,inter-doom,kocoa-doom,managed-doom,prboom-plus,sqldoom,srb2
T0: 1792593272
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/b9275982-9d2e-4184-b821-add7027be0d1' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 21, 2026
@squid-protocol
squid-protocol merged commit 404646f into main Oct 21, 2026
97 of 98 checks passed
@squid-protocol
squid-protocol deleted the churn/5648-line-map branch October 21, 2026 15:12
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

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 shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant