Skip to content

DOOM-rosetta: score call-graph accuracy as a 7th clean-check (PERFECT = clean scan + call graph matches the oracle) #5874

Closed

Description

@squid-protocol

Problem

A DOOM-rosetta port is PERFECT when it passes the six clean-scan checks (coverage, language, functions, typosquat, credentials, health). None of them looks at call edges. By that scorecard 40 of 44 ports are perfect, while the C/C++ call-graph baseline (tests/tools/doom_speedrun/callgraph_baseline.json, engine 42488957a) has only 9 of 20 ports at recall 1.0 / precision 1.0:

Port Recall Precision Misses Engine-only
edge-classic 0.9844 0.9747 167 274
gzdoom 0.9865 0.9483 582 2328
dsda-doom 0.9978 0.9992 24 9
odamex 0.9981 0.9673 38 680
eternity 0.9982 0.9769 28 374
doom3-bfg 0.9995 0.9772 22 1119
doomretro 0.9996 1.0000 3 0
fastdoom 0.9997 0.9997 1 1
nugget-doom 1.0000 0.9977 0 21
woof 1.0000 0.9990 0 8
prboom-plus 1.0000 0.9993 0 3

The other 24 ports (non-C/C++) have no scored call-graph number at all; #5630 has hand-run figures for PHP, ZScript, Lua, Dart, JavaScript, Scheme and others.

Change

Add a seventh check, callgraph, to the clean-check scorecard and the DOOM-rosetta golden, so PERFECT means "scans cleanly and its call graph matches the oracle".

  1. Refresh first. Re-run callgraph_oracle.py --only all on current main. Several fixes merged since 42488957a (call graph: Scope::f bare f( reaches a free f in another file (Part of #5628) #5826, tcl: a [cmd ...] command substitution is a call (Part of #5640) #5806, calls: shell one-line functions, tcl one-line brace bodies, scheme lambda formals (Part of #5640) #5812, csharp: a call passing a lambda is not a definition of the callee (Part of #5685) #5843, Objective-C: message sends ([obj selector], [self method:arg]) are mostly not recorded as calls (doom-ios recall 0.53) #5639 work), so the table above is stale.
  2. Scoring (C/C++ via the body oracle): the check passes when misses = 0 and the engine-only edges of kind absent and comment/string = 0. Engine-only edges of kind type (a C++ class named as a type) and function-pointer (a bare reference) are reported in their own columns but not scored until the edge convention is ruled (see Open question). Self-edges stay ignored on both sides (#3265 step 0: state the calls_out contract (what counts as a call) #3327).
  3. Other languages: extend the oracle to the languages tree-sitter covers in the corpus. A language with no oracle reports callgraph as n/a, which counts as a pass but is shown as unscored, never as a silent pass.
  4. Manifest: ports that fail callgraph today go in expected_fails with the failing count in the golden, so the golden stays zero-drift and every fix shows up as a drop.
  5. Report: print two PERFECT counts while this lands: the old six-check count and the seven-check count.

This is separate from the nightly accuracy job approved for #5630. That job is a regression alarm; this check puts call-graph accuracy into the per-port verdict.

Open question (owner)

Should a C++ new T(...) / T x(...) (a constructor call) and a bare function-pointer reference count as call edges? The engine records them and the oracle does not. They make up most of the precision gap (doom3-bfg: 754 type, 21 function-pointer). The answer decides whether the engine or the oracle changes.

Acceptance

  • clean_check.csv and the golden carry callgraph (recall, precision, misses, scored engine-only, unscored engine-only), and callgraph is in the known-checks set of test_manifest_expected_fails_are_known_checks.
  • The DOOM-rosetta README's checks table documents check 7 and its blind spots.
  • The seven-check PERFECT count on current main is posted here, together with the list of ports that fail check 7.

Part of #5457. Related: #5619, #5630.

Activity

  1. added
    lane:nyx
    on Oct 21, 2026
  2. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    DOOM-rosetta clean check on current main (d1cae08ab, includes #5949 and #5962), 44 ports, doom_speedrun.py run --oracle, ctags 5.9.0:

    Ports failing check 7 (17):

    Port Recall Precision Misses Engine-only (scored) Unscored
    doomsday 0.9750 0.9314 1741 3223 1770
    srb2 0.9318 0.9636 1358 646 56
    gzdoom 0.9953 0.9483 201 810 1518
    helion 0.9971 0.9579 59 9 892
    edge-classic 0.9963 0.9741 39 150 130
    odamex 0.9981 0.9673 38 311 369
    eternity 0.9982 0.9769 28 175 199
    dsda-doom 0.9978 0.9992 24 2 7
    doom3-bfg 0.9996 0.9772 19 340 779
    sqldoom 0.8987 1.0 68 0 0
    mood 0.9598 1.0 9 0 0
    doomretro 0.9996 1.0 3 0 0
    cssdoom 0.9939 1.0 2 0 0
    mochadoom 0.9998 0.9586 1 0 214
    fastdoom 0.9997 0.9997 1 0 1
    prboom-plus 1.0 0.9993 0 2 1
    managed-doom 1.0 0.8234 0 3 513

    Drift since the issue table: gzdoom misses 582 -> 201, doom3-bfg 22 -> 19, eternity engine-only 374 -> 175, odamex 680 -> 311; nugget-doom and woof now pass. Six of the 17 (managed-doom, mochadoom, helion, sqldoom, cssdoom, mood) are newly scored by the Java/C#/JS/Rust/Go/Python oracle (#5962); the other 11 failed at the 6-check-plus-C/C++ run.

    README checks table already documents check 7 and its blind spots (merged in #5949/#5962), so no README change in this slice.

    Remaining slices: oracles for kotlin, dart, scheme, crystal, fsharp, fortran, cobol (and assembly/sql, which have no tree-sitter walk); the C++ constructor / function-pointer edge convention (owner question); callgraph_baseline.json refresh for the ports that moved.

  3. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 5874-20261022T0628Z (host nyx) ended without a PR. clean check posted on #5874 (27/44 seven-check, 42/44 six-check); no PR needed

  4. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 5874-20261022T0645Z (host nyx) ended without a PR. No staleness found in committed state; live re-check of the 17 ports (doom_rosetta_check --only) timed out under the background limit; rerun when box is quiet.

  5. added
    scope:frontier
    and removed on Oct 22, 2026
  6. squid-protocol commented on Oct 22, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 5874-20261022T2217Z (host nyx) ended without a PR. acceptance already met on main; no PR; issue stays open for per-language oracles (siblings listed in report)

  7. squid-protocol commented on Oct 24, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host nyx, lease renewed 2026-10-24T10:29Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:nyx label.

  8. squid-protocol commented on Oct 24, 2026

    @squid-protocol
    OwnerAuthor

    Acceptance met on main: check 7 callgraph is in the scorecard, golden and README (checks table). Seven-check count at e4bae0e (#6439): 32 PERFECT / 44; 42 PERFECT on the first six. Ports failing check 7 (11): eternity, odamex, gzdoom, doom3-bfg, srb2, helion, doomsday, edge-classic, sqldoom, kocoa-doom, mood. Closing; per-language oracles for the uncovered languages (kotlin, dart, scheme, crystal, fsharp, cobol, fortran, assembly, sql) are follow-ups, report as n/a (unscored) meanwhile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claim:nyxlane:nyxscope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions