Skip to content

C++ explicit destructor call p->~T() is a call to the ~T unit; re-bless goldens (Part of #5630) - #6762

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/5630-20261027T0250Z
Oct 27, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/5630-20261027T0250Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Part of #5630. Slice 5: the engine dropped explicit C++ destructor calls.

p->~player_t(), x.~T(), T::~T() were recorded as a call to player_t, the class, so the edge never resolved to the ~player_t unit. The detector now records ~T (explicit destructor syntax only; a bare ~g(x) bitwise-not stays a call to g). The oracle's text fallback names ->~T( the same way, so a misparsed body still agrees.

Evidence (23-port family, engine at 55f7491 + this change; recall/precision gate passes, baseline regenerated):

  • gzdoom miss:statement 16 -> 1; misses 26 -> 11, recall 0.9994 -> 0.9997.
  • odamex misses 22 -> 21; edge-classic precision and recall each up in the fourth decimal.
  • Golden masters: only godot variant.cpp / object.cpp move (String -> ~String, Callable -> ~Callable, ...), 5 differences per leg, all explained by this change. DOOM-rosetta: odamex, gzdoom, edge-classic, summary call-graph numbers only.
  • pr_gates --fast 9/9, --ratchets 9 pass / 0 fail / 0 skipped.

File-cap exception: 4 hand-written files (detector.py, its test, callgraph_oracle.py, its test); the other 3 flagged are the regenerated tests/golden_doom_rosetta/*.json.gz goldens (odamex, gzdoom, edge-classic), which don't count.

Class / Sibling gaps

Class: C++ call syntaxes whose callee name is not a plain identifier (explicit destructor p->~T(), x.~T(), T::~T(), T::~T() qualified, with whitespace after ~). All of these are handled in this PR with tests. Sibling gaps (burned-estate program needing each: none, this is the DOOM corpus):

  • Template destructor ->~TArray<FString>() (gzdoom types.cpp DestroyValue): the engine now emits ~TArray, but tree-sitter misparses the line (< read as less-than), so the oracle lists it as one absent edge. Needs an oracle-side template-destructor text rule.
  • MOODYCAMEL_CONSTEXPR_IF (...) { read as a function (eternity concurrentqueue.h, 8 units): an if-macro block treated as a unit, same class as C++ IFVM/IFVIRTUAL* macro blocks are statements, not functions; re-bless DOOM-rosetta (Part of #5630) #6760 with a different macro family.
  • gzdoom remaining misses: miss:unparsed 5 (vmexec.h, ExecScriptFunc computed-goto), assignment-rhs 2, nested-argument 2, after-operator 1.
  • doomsday absent 230 class-head edges, libclang C-subset reference (from the earlier handoff).

Remaining slices

None for this mechanism; the gaps above are separate mechanisms.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 26, 2026 23:17
… text view names it too (Part of #5630)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s (godot, gzdoom, odamex, edge-classic); format oracle (Part of #5630)

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.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 27, 2026 03:54
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

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

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 590c805 into main Oct 27, 2026
123 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/5630-20261027T0250Z branch October 27, 2026 04:00
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant