Skip to content

COBOL units: record each unit's owning program for multi-program sources (Part of #4404) - #5343

Merged
squid-protocol merged 2 commits into
mainfrom
churn/4404-20261017T1400Z
Oct 17, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/4404-20261017T1400Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4404 (the acceptance line: GalaxyIR exposes the owning program of every unit in a multi-program source).

What changed

  • EngineUnit.program (galaxy_ir.py), set in _attribute_programs next to the COBOL engine and answer key read only the first program's DATA DIVISION in a multi-program source #4245 data-item attribution: a unit belongs to the last program whose PROCEDURE DIVISION precedes its start line (the _program_at rule). One-program sources keep None.
  • cobol_refractor_controller engine_units emits program only when set, so single-program output is unchanged.
  • New tests/cobol_mainframe/test_multi_program_units_4404.py: nested/sibling programs, same-named paragraphs in sibling programs get distinct owners, one-program source stays None.

No detector/parsing change, no function_data column, so no golden bless. Refraction differential, completeness, answer-key and 4245 tests pass (200); audit_check and pr_gates --fast clean.

Sibling gaps

  • A function_data column (DB-level exposure): wider schema/golden change; no burned-estate program needs it yet.
  • EngineEntryPoint / call sites carry a line but no program field (call sites use _program_at internally). Burned multi-program source: DBB epscsmrd.cbl; none needs it today.
  • engine_sourcing._unit_at is name-based and could collide across sibling programs sharing paragraph names (no burned-estate case seen).
  • CobolCraft (not burned): listed only.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 17, 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 17, 2026 14:21
@squid-protocol
squid-protocol enabled auto-merge (squash) October 17, 2026 14:22
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@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 #5343 @ 3b4b5aa: 1 failed check(s)

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39040385331/job/117419289261
repro: python tests/tools/pr_gates.py --fast
errors:
fail-on-cache-miss: false
FAIL tests/cobol_mainframe/test_tool_regex_redos.py::test_catches_the_3205_pattern: 15.2s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
##[error]Process completed with exit code 1.
log tail:
archive: true
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
GITGALAXY_MAINFRAME_CORPORA: /home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora
PYTHONUTF8: 1
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]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-ground-truth-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 139161
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 3b882e10c283da0220b74bb351ee01c55b5a6bc0ce8bc4028d54d87f0f55c4c1
Finalizing artifact upload
Artifact test-times-ground-truth-part-1 successfully finalized. Artifact ID 12103799212
Artifact test-times-ground-truth-part-1 has been successfully uploaded! Final size is 139161 bytes. Artifact ID is 12103799212
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39040385331/artifacts/12103799212
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/57e0f3a1-548a-467f-838d-e8e05a6e92af' 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 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 698bbcf into main Oct 17, 2026
51 checks passed
@squid-protocol
squid-protocol deleted the churn/4404-20261017T1400Z branch October 17, 2026 15:20
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