Skip to content

call graph: Scope::f bare f( reaches a free f in another file (Part of #5628) - #5826

Merged
squid-protocol merged 3 commits into
mainfrom
churn/5628-20261021T0435Z
Oct 21, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/5628-20261021T0435Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5628 (slice 2 of 2). Slice 1: #5698, #5788.

What

Scope::f calling a bare f( whose free f lives in another file was dropped by the detector (it could only see the same file). Now the detector keeps the bare own-leaf call (this->f( / Scope::f( still dropped), and call_resolver.resolve_calls decides with whole-repo knowledge: a free f found -> the edge; the call resolves only to the unit itself -> dropped as recursion and pruned from calls_out_to (#3327 contract kept). Removed _drop_own_leaf_recursion and its candidate collection.

Prune applies only where the detector recorded the bare qualifier (calls_out_qualifiers[f] == [""], the qualified-call languages): without that, shell kube::release::md5 calling the md5 binary was wrongly pruned (caught in the first golden run).

Class

Bare own-leaf call from a scoped unit: same-file free f (slice 1), cross-file free f (this PR), C# explicit interface impl (covered, same mechanism), overload sibling in same class (addControlFieldNode in NVDA: now an edge, a real call, not recursion), no namesake anywhere (still recursion, test), Other::f (not reachable by bare name, test), receiver/this->/Scope:: (unchanged).

Golden

Re-blessed via golden-lock. Attributed drift: NVDA storage.cpp VBufStorage_buffer_t::addControlFieldNode gains its call to the other overload (fan-out/fan-in/PageRank); godot node.cpp/variant.cpp and roslyn LanguageParser.cs gain edges (PageRank, fan-in). Other languages (python, go, cobol, tcl, ts, zig, fortran, scheme, livecode) move only in PageRank's last digit (global renormalisation from the added cpp/C# edges); no calls/fan columns change outside cpp/csharp.

Gates

pr_gates --fast 7/7, --ratchets 8/8, audit_check clear, tree-wide guards + new tests pass. DOOM-corpus oracle counts not re-run in this PR.

Sibling gaps

Leaf-named-language probe (not here: different mechanism).

🤖 Generated with Claude Code

squid-protocol and others added 3 commits October 21, 2026 00:38
…it reaches a free f in another file (Part of #5628)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ecorded it; re-bless goldens (Part of #5628)

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

Copy link
Copy Markdown
Owner Author

PR #5826 @ 5c1a308: 1 failed check(s)

== Call resolution (Level 2, vs pyan3) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39548258941/job/119051278948
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-21 05:13:45,322 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:13:47,447 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:13:47,900 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:13:52,011 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:13:55,201 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:13:58,414 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 05:13:58,416 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 05:13:58,418 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 05:13:58,419 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 05:13:58,629 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 05:13:58,632 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 05:13:59,567 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 05:13:59,568 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 05:13:59,570 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 05:13:59,572 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 05:13:59,573 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 05:13:59,574 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 05:13:59,575 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-21 05:13:59,667 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-21 05:14:03,988 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:14:11,164 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:14:11,439 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:14:11,740 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:14:12,001 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-21 05:14:13,431 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:*.AssertionError>
... 67 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/2025d718-b878-44be-97d0-91cb37e87390' 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
@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

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