Skip to content

SQL Mode E: shield /* */ comments, DDL head behind a comment (Part of #5736) - #5837

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5736-20261021T0732Z
Oct 21, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5736-20261021T0732Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5736. Follow-up to #5735.

Checklist: done [c:e9766964]
Checklist: done [c:0997ebe5]
Checklist: partial [c:0755f773] -- not touched: call_site_data for SQL is a separate channel
Checklist: partial [c:6a180fa3] -- not touched: Db2 CALL inside COBOL EXEC SQL is #4304

What

  • _slice_by_terminator (Mode E) shielded only --/% comments, so a ; (or CREATE) inside a /* */ license header ended/ignited a statement mid-comment; the next chunk's Copyright (C) / X (the ...) then read as calls and the routine lost its name. For SQL, /* ... */ is now blanked (newlines preserved) in the scan copy; the stored block text is unchanged.
  • The call-scan shield turns a block comment into "", so MySQL CREATE TABLE /*prefix*/blobs ( hid the DDL head. _SQL_NOT_A_CALL now tolerates one "" between keyword and name.

Class: SQL comment/shield noise in calls_out

Member Status
; in /* */ header slices mid-comment fixed here (postgresql, db2_sql, sqlite)
KEYWORD /*c*/name ( DDL head fixed here (all DDL-head keywords share the rule)
/* c */ g(x) real call after a comment still a call (tested)
erlang / prolog Mode E unchanged (not SQL; prolog /* */ is a possible sibling)

Evidence

Tests: test_sql_calls_out_5635.py +5 cases; 443 sql/db2/pg/sqlite/erlang/prolog extraction tests and 51 core_engine mode-e tests pass. crucible_check.py both legs PASS, no golden diff. pr_gates --fast 7/7, --ratchets 8/8 (none skipped).

Cross-repo: none.

Remaining slices

Sibling gaps

  • Prolog Mode E /* */ comments are not shielded either (no burned-estate need).

🤖 Generated with Claude Code

…comment is not a call (Part of #5736)

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 07:50
@squid-protocol
squid-protocol enabled auto-merge (squash) October 21, 2026 07:54
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5837 @ e744087: 1 failed check(s)

== Small audits (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39564625849/job/119103829897
repro: no local equivalent; read the check page
errors:
##[error]Process completed with exit code 1.
log tail:
{
echo "## ⚠️ This PR modifies a golden-crucible fixture"
echo ""
echo "Files changed ($(echo "$CHANGED" | wc -l) golden-master part(s)):"
echo '' echo "$CHANGED" | head -n 100 echo ''
echo ""
echo "These files should only ever change via `tests/tools/update_golden_master.py`,"
echo "and the PR description should explain why GitGalaxy's output was expected to"
echo "change. Reviewers: confirm the description covers this before approving."
echo "For the semantic diff: `python tests/tools/bless_scope.py --from-head tests/golden_master_audit`."
} >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
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
BASE_REF: main
##[endgroup]
No golden master fixture changes in this PR.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/d80f6ef5-a2a1-4f67-b793-808b89f9efb5' 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 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol squid-protocol removed 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

CI shepherd: the head of this PR (62eb96b) 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 shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 21, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 21, 2026 08:26
@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

PR #5837 @ 62eb96b: 1 failed check(s)

== Call resolution (Level 2, vs pyan3) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39568730445/job/119117302492
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-21 08:30:10,448 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:12,997 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:13,436 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:17,319 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:20,584 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:23,663 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 08:30:23,664 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 08:30:23,665 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 08:30:23,666 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 08:30:23,830 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 08:30:23,832 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 08:30:24,686 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 08:30:24,687 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 08:30:24,688 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 08:30:24,689 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 08:30:24,690 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 08:30:24,691 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 08:30:24,691 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 08:30:24,767 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 08:30:28,638 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:35,323 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:35,589 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:35,878 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:36,144 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 08:30:37,551 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:*.AssertionError>
... 71 more
log tail:
"overload_blind_precision_pct": 99.7
},
"recall_all_kinds_pct": 76.4,
"resolution_recall_pct": 97.7,
"named_pyan_edges": 1748,
"pyan_edges": 3592,
"wrong_examples": [
"fastapi: fastapi/routing.py:app -> fastapi/exceptions.py:45 (pyan3: fastapi/exceptions.py:213)",
"fastapi: tests/test_arbitrary_types.py:test_typeadapter -> tests/test_arbitrary_types.py:20 (pyan3: tests/test_arbitrary_types.py:59)"
],
"external_examples": [],
"reference_version": "2.9.0",
"lang": "python"
}
}
| language | reference | confident precision | ambiguous precision | recall | resolution recall |
|---|---|---|---|---|---|
| python | pyan3 | 99.9% (1829 judged) | 60.0% | 50.9% | 97.7% |
decorator edges (not gated): precision 100.0% (575 judged); recall with decorators 66.9%
reference edges (not gated): precision 99.7% (345 judged); recall, all kinds 76.4%
call_graph_resolution: WARNING -- pyan3 2.9.0 is not the pinned 2.8.1; numbers are not comparable to the baseline
call_graph_resolution: REGRESSION
python: recall_pct 51.7 -> 50.9
##[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/180b283e-d647-46eb-8d06-89696355e650' 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 15f511d into main Oct 21, 2026
73 of 75 checks passed
@squid-protocol
squid-protocol deleted the churn/5736-20261021T0732Z branch October 21, 2026 08:48
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