Skip to content

COBOL: quoted copybook literals with an extension keep IN/REPLACING; plain section COPYs get a row (Fixes #5618) - #5626

Merged
squid-protocol merged 4 commits into
mainfrom
churn/5618-20261019T1231Z
Oct 19, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
churn/5618-20261019T1231Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Fixes #5618 (engine side).

Cause

_COPY_IN_ENTRY (mainframe_boundary.py) read the member name up to ., so for COPY "m.cpy" OF lib / COPY "m.cpy" REPLACING ... the closing .cpy" broke the IN|OF and REPLACING phrases. Also copy_statement_data only ever received statements with a REPLACING: a plain COPY that follows no entry (before a section's first entry), and any COPY in the PROCEDURE DIVISION, had no row. (The member stem and the copybook edge already resolved.)

Change

  • _COPY_IN_ENTRY: swallow .ext only when a closing quote follows it; the member stays the stem.
  • Plain COPYs no entry carries are recorded in copy_statement_data with empty replacing.
  • PROCEDURE DIVISION COPYs (outside every data window) are recorded with section PROCEDURE.
  • galaxy_ir._materialize_replaced_copies skips rows with no REPLACING or section PROCEDURE, so nothing new is expanded.

Class table

Member Status
COPY "x.cpy". / 'x.cpy'. in a group handled, test
COPY "x.cpy". before first entry row recorded, test
COPY x. / "x". regression handled, test
"m.cpy" OF lib, REPLACING after a quoted member handled, test
COPY in PROCEDURE DIVISION row recorded, test

Acceptance (acherm/agentic-cobol-doom-cc, MIT, 117db75)

Scanned with this worktree's engine. copy_statement_data = 7 (was 3): walker.cob lines 40-42 (WORKING-STORAGE: ws-levels, ws-entities, ws-render) and 85-88 (PROCEDURE: pd-screens, pd-level, pd-world, pd-render), fixed format, area B. The source has 7 COPY statements (grep). Each of the 7 has an edge_data import edge from walker.cob to its cpy/<member>.cpy file. An internal sample also passes.

Sibling gaps

  • A plain COPY of a copybook with its own 01 records before a section's first entry: row recorded, but the reader still does not add its records to the layout (needs a different mechanism in galaxy_ir).
  • Plain COPYs attached to an entry stay in record_data.copy_members, not copy_statement_data, so the full count is the sum of both tables.

Gates

pr_gates --fast 6/6; --ratchets 8/8; crucible_check.py both legs PASS (no drift, no re-bless); 32 copy tests pass.

🤖 Generated with Claude Code

…CING phrase; plain section COPYs get a copy_statement_data row (Fixes #5618)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 19, 2026 12:48
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 19, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 19, 2026 13:01
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5626 @ b76b5b0: 2 failed check(s)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39254929981/job/118073497712
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
Hosted Compute Agent
Version: 20261012.601
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {817c45bf-9aad-4ac3-bde1-4d870c708186}
Region: westus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: full-suite
##[group]Run echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && test "$SKIP" = "true"; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
##[endgroup]
full-suite parts: failure (tested-tree skip: )
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== full-suite part 2/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39254929981/job/118069642042
repro: python -m pytest -q tests/core_engine/test_national_names.py::test_every_mainframe_letter_class_accepts_the_national_letters
failing tests: tests/core_engine/test_national_names.py::test_every_mainframe_letter_class_accepts_the_national_letters
errors:
fail-on-cache-miss: false
E AssertionError: gitgalaxy/core/mainframe_boundary.py: [A-Z0-9_-]
tests/core_engine/test_national_names.py:42: AssertionError
FAILED tests/core_engine/test_national_names.py::test_every_mainframe_letter_class_accepts_the_national_letters - AssertionError: gitgalaxy/core/mainframe_boundary.py: [A-Z0-9_-]
##[error]Process completed with exit code 1.
log tail:
env:
PYTHONUTF8: 1
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 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
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 181511
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is ce345e545fb508c24ae0e771212de7ccdc3a612905367effe1b1feb344715f83
Finalizing artifact upload
Artifact test-times-part-2 successfully finalized. Artifact ID 12187963277
Artifact test-times-part-2 has been successfully uploaded! Final size is 181511 bytes. Artifact ID is 12187963277
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39254929981/artifacts/12187963277
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/e63cd795-dad8-48c7-95c4-134f4f34e0b2' 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
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 19, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 19, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (1ef5215) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md 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:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 19, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

1 similar comment
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 19, 2026 13:09
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5626 @ 1ef5215: 2 failed check(s)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39257352823/job/118083481736
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
Hosted Compute Agent
Version: 20261012.601
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {74c21776-350c-48f0-8a79-f86ee82c9cea}
Region: eastus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: full-suite
##[group]Run echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && test "$SKIP" = "true"; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
##[endgroup]
full-suite parts: failure (tested-tree skip: )
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== full-suite part 2/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39257352823/job/118079140404
repro: python -m pytest -q tests/core_engine/test_national_names.py::test_every_mainframe_letter_class_accepts_the_national_letters
failing tests: tests/core_engine/test_national_names.py::test_every_mainframe_letter_class_accepts_the_national_letters
errors:
fail-on-cache-miss: false
E AssertionError: gitgalaxy/core/mainframe_boundary.py: [A-Z0-9_-]
tests/core_engine/test_national_names.py:42: AssertionError
FAILED tests/core_engine/test_national_names.py::test_every_mainframe_letter_class_accepts_the_national_letters - AssertionError: gitgalaxy/core/mainframe_boundary.py: [A-Z0-9_-]
##[error]Process completed with exit code 1.
log tail:
env:
PYTHONUTF8: 1
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 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
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 181494
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is bf39ea424723d78bc8aef873fe6338b194f71305eb1e0be8e8585149e8850a3e
Finalizing artifact upload
Artifact test-times-part-2 successfully finalized. Artifact ID 12189547138
Artifact test-times-part-2 has been successfully uploaded! Final size is 181494 bytes. Artifact ID is 12189547138
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39257352823/artifacts/12189547138
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/a266e5de-04e1-456a-99be-3090b7c99e1a' 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
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 19, 2026
@squid-protocol squid-protocol added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 19, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 19, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (6d4c287) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 19, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

1 similar comment
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit d8e642a into main Oct 19, 2026
61 checks passed
@squid-protocol
squid-protocol deleted the churn/5618-20261019T1231Z branch October 19, 2026 15:11
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.

COBOL: quoted copybook literals with an extension (COPY "x.cpy".) record no COPY statements, free and fixed format

1 participant