Skip to content

C++: a class-template member keeps its class in its name (Part of #3772) - #6639

Merged
squid-shepherd[bot] merged 4 commits into
mainfrom
churn/3772-20261025T1233Z
Oct 25, 2026
Merged

squid-shepherd[bot] merged 4 commits into
mainfrom
churn/3772-20261025T1233Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3772 (compiler call-graph comparison).

What

cpp had the lowest agreement with its compiler reference (libclang 18.1.1 on fmtlib/fmt: recall 21.5%, resolution recall 59.8%; rust 60.1%, c 36.7% for comparison). Foo<T>::bar() { was named ::bar: the name tokenizer split at the class template's <, ,, > and kept the tail, so libclang's Foo::bar had no engine counterpart (caller_unmapped), and the header's own Foo<T>::m( read as a call to m. cpp now strips a template argument list directly followed by :: (constructors, destructors, operators, ns::Foo<T>::m, template<> specialisations), and the own-header filter strips it too. operator<, operator<< and return-type <...> are untouched.

Before / after (fmt, callgraph_triage.py cpp)

metric before after
linked edges (agree) 2089 2139
recall 21.5% 22.0%
resolution recall 59.8% 61.3%
confident precision 92.5% 92.2% (gate tolerance 0.5)
caller_unmapped 1249 1226
wrong / unmapped_src 170 / 504 180 / 544

wrong and unmapped_src rose because callers that were unnamed now enter the judged set with their links; I did not read those 10 extra wrong links in source one by one.

Golden drift: 20 calls_out_to lists (godot node/editor_node/main/variant, powertoys FancyZones) lose the unit's own header name, plus 5 graph-sqlite hashes. No other change.

Class / Sibling gaps

Class: class-template qualifier in a C++ member definition name. Siblings fixed with it: ctor/dtor/operator/namespace-qualified/specialisation forms and the matching header self-call.
Sibling gaps (no issues filed; no burned-estate program needs any of them):

  • namespace n { template<class T> T Box<T>::get() {...} } on one line is not extracted at all (different mechanism).
  • gtest TestBody naming trade-off.
  • C++ x.m() receiver typing (ambiguous/receiver, 374 edges).
  • Rust Type::new( needs the impl type as owner.
  • C: 1356 unmapped ends.

Tests and gates

New tests/extraction/languages/test_cpp_template_member_names_3772.py; cpp extraction tests (394) and test_detector.py (219) pass; callgraph_check tests step 383 passed; audit_check.py all clear; pr_gates.py --fast 7/7. Not run: full suite, --ratchets, crucible CI legs. libclang was installed to scratch (pip --target) since the selfscan venv lacks it.

Merged origin/main before pushing (PR #6394 overlaps galaxyscope.py; I did not touch it).

Lessons for agents

  • callgraph_check.py runs its gate in a subprocess that does not see a scratch PYTHONPATH libclang via heavy-run: run call_graph_resolution.py cpp --ci / --regenerate directly with PYTHONPATH set.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 25, 2026 08:44
`Foo<T>::bar() {` was named `::bar` (the name tokenizer split at the class
template's argument list), so libclang's `Foo::bar` had no engine counterpart
and the header's `Foo<T>::m(` read as a self-call. cpp now strips a template
argument list directly followed by `::`, in both the name and the own-header
filter. fmt: linked edges 2089 -> 2139, recall 21.5% -> 22.0%, resolution
recall 59.8% -> 61.3%, confident precision 92.5% -> 92.2% (inside tolerance).
Golden drift: 20 calls_out_to lists (godot, powertoys) lose the unit's own
header name; no other change.

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

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 25, 2026 12:45
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 25, 2026 12:46
@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 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6639 @ 2688ab0: 1 failed check(s)

== shard 1 (1669449 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40194565142/job/121173411603
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[doomsday]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[doomsday] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
doomsday: 3 difference(s) from the golden
file doomsday/libs/core/include/de/constantrule.h: func_hash 'e583a34962edbe77' -> '3a2fe0d3447e6b4e'
file doomsday/tools/amethyst/src/list.h: func_hash '3c0dd1f34e0d1f8f' -> 'ea303d6cbb73bf9b'
file doomsday/tools/amethyst/src/uniquelist.h: func_hash '8c351621a736bb07' -> '0737e72598c9e2eb'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "doomsday: 3 difference(s) from the golden\n file doomsday/libs/core/include/de/constantrule.h: func_hash 'e583a34962...ea303d6cbb73bf9b'\n file doomsday/tools/amethyst/src/uniquelist.h: func_hash '8c351621a736bb07' -> '0737e72
1 failed, 9 passed, 22 deselected in 191.12s (0:03:11)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 1 (1669449 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: chocolate-doom,cssdoom,dartdoom,doomgeneric,doomsday,edge-classic,mood,room4doom,rust-doom,sdl-doom
T0: 1792932732
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/e3c58ede-2f25-4505-85a8-accc508f3a82' 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 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

squid-protocol and others added 2 commits October 25, 2026 09:00
…mber names (Part of #3772)

Only func_hash moved: 18 header files in doom3-bfg and 3 in doomsday, all
class-template member definitions now named Class::member instead of ::member.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@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 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6639 @ c7e9946: 1 failed check(s)

== shard 2 (1666363 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40195891549/job/121180010959
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[gzdoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[gzdoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[gzdoom] - AssertionError:
gzdoom: 2 difference(s) from the golden
file src/common/utility/vectors.h: func_hash 'aa82af535af4ab5e' -> 'a976408421733922'
file src/common/utility/weightedlist.h: func_hash '4adc1c3770a6fc99' -> 'a2dee0c0ce4b76b6'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "gzdoom: 2 difference(s) from the golden\n file src/common/utility/vectors.h: func_hash 'aa82af535af4ab5e' -> 'a976408421733922'\n file src/common/utility/weightedlist.h: func_hash '4adc1c3770a6fc99' -> 'a2dee0c0ce4b76b6'"
1 failed, 10 passed, 22 deselected in 194.98s (0:03:14)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 2 (1666363 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: agentic-cobol-doom-codex,doom-ascii,doom-fx,doom-scheme,doom3do,doomretro,fps-cob,gzdoom,mochadoom,nugget-doom,odamex
T0: 1792935185
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/682ea8f8-9550-44f7-82a8-10da8edc435d' 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 25, 2026
@squid-shepherd
squid-shepherd Bot merged commit dd766ce into main Oct 25, 2026
73 of 74 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/3772-20261025T1233Z branch October 25, 2026 13:44
squid-protocol added a commit that referenced this pull request Oct 25, 2026
…ged engine (Part of #6266)

doom3-bfg / doomsday: #6639's function names plus this branch's oracle numbers. gzdoom: #6639's class-template
member names in vectors.h / weightedlist.h (#6639 did not re-bless gzdoom); rescan confirmed stable.

Co-Authored-By: Claude Opus 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