Skip to content

oracle: a constructor's owner is the class it is named for, not a misread enclosing class (Part of #6266) - #7023

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6266-20261029T1601Z
Oct 29, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6266-20261029T1601Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6266. Checklist: partial [c:0254d813] -- doomsday still has engine-only edges (.old x4, fontlinewrapping, inputdevice, amethyst, fluid) and 1 miss (sortSegments->map, rescan needed); other ports untouched this slice.

What

Oracle fix (not an engine change). tree-sitter reads class X : public A, DE_OBSERVES(..) // c { (packageswidget.cpp's PackageListItemWidget) as an unclosed class enclosing the rest of the file, so callgraph_oracle._owner returned that class for every later constructor. Impl(Public *i) : Base(i) and PackagesWidget::PackagesWidget(..) : GuiWidget(name) then had no known base, and the engine's real constructor calls were scored engine-only "absent". _owner now accepts an enclosing class only when its name is the constructor's name (new _ctor_name); otherwise it keeps climbing, then uses the qualified scope, else None (any base).

Doomsday engine-only "absent" 13 -> 10 (Impl->Base, PackagesWidget->GuiWidget x2); callgraph_engine_only 16 -> 13, precision 0.9684 -> 0.9685. Verified by doom_rosetta_check over all ports: only doomsday drifted, blessed (--only doomsday). The new test fails without the fix.

Files (2 hand-written): tests/tools/doom_speedrun/callgraph_oracle.py, tests/tools/test_callgraph_oracle.py; regenerated: tests/golden_doom_rosetta/doomsday.json.gz.

Class / Sibling gaps

Class: engine-only constructor-initializer edges the oracle drops because the owner class is misread. Members handled: Impl->Base, PackagesWidget->GuiWidget x2 (all of the class on doomsday; the rule is general to every port).
Sibling gaps (doomsday; burned-estate need: none, these are DOOM ports, not mainframe): .old x4 (no class decl, engine-only); fontlinewrapping DE_PIMPL_NOREF -> line and inputdevice description -> isActive/name (comment/string kind); amethyst filledLine x3; fluid context x2; sortSegments->map miss after #7014 needs a rescan. Different mechanisms, not here.

Gates

pr_gates --fast 9/9 pass; audit_check clear; tree-wide guards and test_callgraph_oracle.py pass; ruff format --check clean (0.17.1). --ratchets not run: no engine, signature or golden-master input changed (doom-rosetta golden only).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 29, 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 29, 2026 16:30
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 29, 2026 16:34
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit ff640e3 into main Oct 29, 2026
70 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6266-20261029T1601Z branch October 29, 2026 16:56
squid-protocol added a commit that referenced this pull request Oct 29, 2026
callgraph_oracle.py: #7023 merged the same constructor-owner fix; main's
_owner (named-for-its-class climb) is kept, this branch's Classes table and
.old-wrapper bases stay. doomsday golden re-blessed on top of main with CI's
pinned tree-sitter (language-pack 1.22.1): callgraph engine-only 13 -> 0,
verdict 6/7 -> PERFECT; linuxdoom re-checked clean as the parity control.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant