Skip to content

Perl calls: long multi-line strings, open FH forms (Part of #6433) - #6721

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6433-20261026T0628Z
Oct 26, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6433-20261026T0628Z

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #6433 (slice 3).

What changed

  • detector.py (perl string shield): a second quote alternative takes a string over 200 chars that runs across lines (up to 4000), only when it is opened after =, (, , or ., closed before ;, ,, ) or ., and holds no sub or POD line. Before, such a string matched neither bound, so a } or quote inside it ended the unit early (repro in the new test: the first sub lost all its calls).
  • _shared_patterns.py _PERL_ARG: open FH, ..., opendir DH, ... (bareword handle then a comma) and open my $fh, ... now open an argument list. rand / int rand were already matched in no-arg positions (tests added). Filetest operators (-e) stay out.
  • Tests in test_calls_out_perl_6433.py; contract row in docs/calls_out_rule_contract.md.

Evidence

  • Corpus drift is 3 differences per golden leg: one function (exiftool Infile gains open). A first, looser guard (any multi-line string) lost 11 real subs in spamassassin Parser.pm and 2 in Makefile.PL (stray quotes in comments/POD paired far ahead); I replaced it with the value-context guard above and checked per-file function lists before/after on the perl crucible: identical.
  • call_graph_accuracy perl: fn 174 -> 173. The issue's "~150 FN from early unit end" is not reproduced on the crucible, where no perl function changed. I did not regenerate call_graph_accuracy_baseline.json (regenerating moved other languages' rows from main drift, not from this change).
  • audit_check.py: all clear. Perl test files: 211 passed.

Remaining slices / sibling gaps

  • The perl FN residue (173) is scattered: new 12, print 9, filetests -f/-d/-e (excluded here), join, say, warn, push, catch. A method-call / list-operator slice is next.
  • Sibling shields with the same bound idea: the slash-delimited quote-op shield and the prism.py perl line masker. No burned-estate program needs these.

Lessons for agents

  • A regex alone cannot tell a real multi-line string from a stray quote in a comment or POD; guard a long-string alternative by value context, and compare per-file function lists before/after on the perl crucible, not only the golden count.

Cross-repo: none.

🤖 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 26, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 26, 2026 06:43
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 26, 2026 06:47
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6721 @ a7c1d26: 2 failed check(s)

== crucible (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40281506272/job/121438309672
repro: tests/tools/box/heavy-run.sh python -m pytest -q tests/cics_crucible && tests/tools/box/heavy-run.sh python tests/tools/cics_crucible.py --ci --out /tmp/gitgalaxy-scratch/ci-digest/cics
errors:
CICS crucible: 340 pass, 408 fail, 32 unsupported (780 cells, 2 shards)
##[error]Process completed with exit code 1.
log tail:
Beginning upload of artifact content to blob storage
Uploaded bytes 26589
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is f2f3d7381461eb125a0f699dbffc9e4a23e772575a7c82280aa1a17ff6846ea1
Finalizing artifact upload
Artifact cics-crucible-results successfully finalized. Artifact ID 12633105510
Artifact cics-crucible-results has been successfully uploaded! Final size is 26589 bytes. Artifact ID is 12633105510
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/40281506272/artifacts/12633105510
##[group]Run echo "measure: success, runner-tests: failure"
echo "measure: success, runner-tests: failure"
[ "success" = "success" ] && [ "failure" = "success" ]
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
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]
measure: success, runner-tests: failure
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/a2a51567-5aae-4712-8b29-47858b3508b1' 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

== runner-tests (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40281506272/job/121435617899
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/cobol_mainframe/test_blocker_leak.py::test_anonymized_blockers_leak_nothing_of_the_estate_source[cics-crucible]
errors:
fail-on-cache-miss: false
pytest.fail(f"{estate} missing under GITGALAXY_MAINFRAME_CORPORA: the leak scan would skip")
E FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy/docs/language_status/evidence_report/cics-crucible/report.json'
FAILED tests/cobol_mainframe/test_blocker_leak.py::test_anonymized_blockers_leak_nothing_of_the_estate_source[cics-crucible] - FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy/docs/lan
##[error]Process completed with exit code 1.
log tail:
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
JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.20-1/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.20-1/x64
MAVEN_ARGS: -ntp
GITGALAXY_ORACLE_PREBUILT: 1
##[endgroup]
Multiple search paths detected. Calculating the least common ancestor of all paths
The least common ancestor is /home/runner/work/_temp. This will be the root directory of the artifact
With the provided path, there will be 2 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-cics-crucible.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 5646
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 43a159fa8a32394e6f9dc28e22926204d9f6fe6f56894cc2aad7ae811ce5a337
Finalizing artifact upload
Artifact test-times-cics-crucible successfully finalized. Artifact ID 12631594532
Artifact test-times-cics-crucible has been successfully uploaded! Final size is 5646 bytes. Artifact ID is 12631594532
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/40281506272/artifacts/12631594532
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/329b6f8c-2e23-4bcb-b7a4-00bbba7928e7' 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-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 26, 2026
@squid-shepherd
squid-shepherd Bot merged commit 1900e80 into main Oct 26, 2026
122 of 124 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6433-20261026T0628Z branch October 26, 2026 06: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 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