Skip to content

C++ calls_out: a functional cast to a built-in type keyword is no call (Part of #6454) - #6524

Merged
squid-protocol merged 1 commit into
mainfrom
churn/6454-20261024T1840Z
Oct 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/6454-20261024T1840Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6454 (siblings of #3799). Takes the c++ box.

Checklist: done [c:f25846fb]

What changed

  • gitgalaxy/core/detector.py: in a C++ unit body (calls_out_declarator_constructs), a functional cast to a built-in type keyword (bool(x), unsigned(n), double(x)) is skipped as a callee (_FUNCTIONAL_CAST_KEYWORDS). operator bool( is kept. Constructor-style declarations (Foo f(a, b);) are untouched: they stay calls (C3).
  • tests/extraction/languages/test_calls_out_cpp_functional_cast_6454.py: every keyword, cast in a condition and an initializer, class / size_t / uint32_t stay calls, .operator bool() stays a call.
  • Golden masters re-blessed via golden-lock.sh crucible_check.py --update --yes (cpp only: callee lists of godot/powertoys functions, their function hashes and the LLM brief).

Evidence

  • call_graph_accuracy.py cpp, before -> after: precision 96.6% -> 96.8% (FP 271 -> 258), recall unchanged 99.7% (FN 24). The remaining declaration<compound_statement hits are the constructor-style declarations the verdict calls correct.
  • scope_check.py --expect cpp: 20 differences, all cpp (15 attributed, 5 repo rollups that are cpp function hashes and the brief).
  • Gates: pr_gates --fast 7/7, --ratchets 9 pass 0 fail, tree-wide guard tests pass.

Class / Sibling gaps

Class: a C++ unit body token followed by ( that names a type keyword, not a callee. Members: the 11 type keywords (all handled and tested); auto/void (never precede ( as a cast); size_t and stdint names (uint32_t(x)) are ordinary identifiers to tree-sitter too, so they stay calls. Not handled here:

🤖 Generated with Claude Code

…l (Part of #6454)

`bool can_expand = bool(EDITOR_GET(..))` listed `bool` as a callee. A cast to
int/bool/char/float/double/long/short/unsigned/signed/wchar_t/charN_t constructs
nothing; `operator bool()` and class constructors stay calls.

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 24, 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 24, 2026 19:12
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 19:22
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6524 @ 7e941ad: 1 failed check(s)

== shard 3 (1667394 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40124217224/job/120962822854
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[eternity]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[eternity] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
summary.callgraph_engine_only: 128 -> 73
summary.callgraph_misses: 28 -> 31
summary.callgraph_precision: 0.9797 -> 0.9831
summary.callgraph_recall: 0.9982 -> 0.998
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not 'eternity: 4 difference(s) from the golden\n summary.callgraph_engine_only: 128 -> 73\n summary.callgraph_misses: 28 -> 31\n summary.callgraph_precision: 0.9797 -> 0.9831\n summary.callgraph_recall: 0.9982 -> 0.998'
1 failed, 10 passed, 22 deselected in 185.51s (0:03:05)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 3 (1667394 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: doom-ios,doom-wasm,doom3-bfg,dsda-doom,eternity,freedoom,fsharp-doom,gore,linuxdoom,puredoom,woof
T0: 1792870303
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]
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/298cb0e2-7494-4961-8ea4-c5188a15a208' 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 24, 2026
@squid-protocol
squid-protocol merged commit 8545798 into main Oct 24, 2026
102 of 103 checks passed
@squid-protocol
squid-protocol deleted the churn/6454-20261024T1840Z branch October 24, 2026 19:49
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

squid-protocol added a commit that referenced this pull request Oct 25, 2026
… are no calls)

Bisected: eternity passes at 8545798^ and drifts at 8545798 (callgraph_engine_only 128 -> 73, misses 28 -> 31,
precision 0.9797 -> 0.9831, recall 0.9982 -> 0.998); doom-rosetta did not run on that PR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Oct 25, 2026
…art of #5882) (#6567)

* Det Sweep: plan Db2 shards with 20% headroom and a long-pole floor (Part of #5882)

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

* Re-bless the eternity doom-rosetta golden for #6524 (functional casts are no calls)

Bisected: eternity passes at 8545798^ and drifts at 8545798 (callgraph_engine_only 128 -> 73, misses 28 -> 31,
precision 0.9797 -> 0.9831, recall 0.9982 -> 0.998); doom-rosetta did not run on that PR.

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

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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