Skip to content

DOOM-rosetta: tree-sitter call-graph oracle for non-C/C++ ports (Part of #5874) - #5962

Merged
squid-protocol merged 5 commits into
mainfrom
churn/5874-20261022T0421Z
Oct 22, 2026
Merged

squid-protocol merged 5 commits into
mainfrom
churn/5874-20261022T0421Z

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #5874 (slice 2; slice 1 = #5949). Item 3: extend the call-graph oracle past C/C++.

What

tests/tools/doom_speedrun/ts_callgraph_oracle.py: the body oracle (tree-sitter function node at the engine start line; every call whose callee is a port-defined bare name; self-edges dropped) for go, java, csharp, rust, javascript, python, the languages the scorer's tree-sitter oracle already maps. doom_scorer.callgraph_check uses the C/C++ oracle for a LICENSED C/C++ port (unchanged, so those goldens do not move) and this one otherwise; a port with none of those six languages stays n/a (unscored, shown). Scoring is the slice-1 rule (misses = 0 and absent/comment/string engine-only = 0).

Oracle blind spots found by reading real source and fixed before blessing: Rust macro arguments are unparsed tokens (vec![T::default(); n] was a false absent), but quote! bodies are emitted code, not calls; a C# : base(...) initializer sits outside the method body (false absent for helion).

Class table (languages in the corpus)

Language / ports Status
rust: room4doom, rust-doom covered, pass (room4doom 29 unscored function-pointer)
java: gore, mochadoom gore pass; mochadoom 1 miss (sizeof)
csharp: managed-doom, helion managed-doom 3 engine-only absent (string keyword read as a callee); helion 59 misses, 9 absent (a Write body overrun)
javascript: cssdoom 2 misses (activateLift at lifts.js:81 verified in source)
python: sqldoom 68 misses (_log_failure, prepare_renderer, close in _run verified in source)
kotlin, dart, scheme, crystal, fsharp, cobol, fortran, assembly: kocoa-doom, dartdoom, doom-scheme, doo-cr, fsharp-doom, fps-cob, agentic-cobol-*, doomf77, doom-fx no oracle here: n/a

Golden re-blessed for 8 ports (callgraph columns only; doom_rosetta_check.py scope report shows no other field moved). expected_fails gains callgraph for managed-doom, mochadoom, helion, sqldoom, cssdoom (sqldoom/cssdoom also keep functions). test_doom_speedrun.py touched only to give a fake scan DB the columns the oracle reads (a 6th hand-written file, a fixture fix for this PR's own failure).

Gates

pr_gates --fast 7/7, audit_check clear, tree-wide guards + tests/doom_rosetta + tests/tools/test_doom_speedrun.py pass, pytest from /tmp passes. --ratchets not run (no engine/regex change; golden-master/ground-truth untouched).

Remaining slices

Sibling gaps

  • Engine: helion Write -> EnsureMenuKey/Exists/GetCommandArray (body overrun into the next method, FileConfig.cs:134); managed-doom ToString -> string (a C# keyword read as a callee). Source: this PR's oracle output.
  • Mixed ports in LICENSED (C port with a Python tool) score the C/C++ files only.

🤖 Generated with Claude Code

…avascript/python ports (Part of #5874)

ts_callgraph_oracle.py scores check 7 for the non-C/C++ ports whose language tree-sitter covers; a port with none
reports callgraph n/a. Golden re-blessed for the 8 ports that moved (callgraph columns only); 5 ports added to
expected_fails (managed-doom, mochadoom, helion, sqldoom, cssdoom).

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 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 22, 2026 04:34
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 04:34
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5962 @ 5f760c6: 3 failed check(s)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39723105407/job/119641881063
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
Hosted Compute Agent
Version: 20261012.601
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {4376a69c-0489-4f33-a11d-213fa3b0acaa}
Region: westus3
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: full-suite
##[group]Run echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && test "$SKIP" = "true"; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
##[endgroup]
full-suite parts: failure (tested-tree skip: )
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== full-suite part 1/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39723105407/job/119640870166
repro: python -m pytest -q tests/doom_rosetta/test_doom_rosetta.py::test_ts_oracle_scores_each_covered_language[csharp]
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_ts_oracle_scores_each_covered_language[csharp]
errors:
fail-on-cache-miss: false
[--ai-guardrails] [--fail-on-secrets]
[--fail-on-malware]
--fail-on-secrets CI/CD Gate: Fail build if hardcoded secrets are
--fail-on-malware CI/CD Gate: Fail build if ML threat inference flags
CI/CD Gate: Fail build if any file exceeds this risk
CI/CD Gate: fail the build if any file's structural
E tree_sitter_language_pack.DownloadError: Download error: Language 'c_sharp' is not in the download manifest, which lists 372 language(s). Call manifest_languages() to enumerate the names that exist.
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_ts_oracle_scores_each_covered_language[csharp] - tree_sitter_language_pack.DownloadError: Download error: Language 'c_sharp' is not in the download manifest, which lists 372 language(s).
##[error]Process completed with exit code 1.
log tail:
env:
PYTHONUTF8: 1
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
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
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 189912
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 6c060bd775a8d5af9347e3014f800fd653d065d96eeec3749c8e7fc570dc7154
Finalizing artifact upload
Artifact test-times-part-1 successfully finalized. Artifact ID 12401459453
Artifact test-times-part-1 has been successfully uploaded! Final size is 189912 bytes. Artifact ID is 12401459453
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39723105407/artifacts/12401459453
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/edbd4b2e-2ebe-452c-bf4e-91dfc89defbe' 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
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

== shard 1 (1669449 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39723105302/job/119640911231
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[mood]
errors:
fail-on-cache-miss: false
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:44: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[mood] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
summary.callgraph_unscored: 'n/a' -> 0
summary.expected_fails_met: True -> False
summary.fails: '' -> 'callgraph'
summary.verdict: 'PERFECT' -> '6/7'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "mood: 8 difference(s) from the golden\n summary.callgraph_engine_only: 'n/a' -> 0\n summary.callgraph_misses: 'n/a'... summary.expected_fails_met: True -> False\n summary.fails: '' -> 'callgraph'\n summary.verdict: 'PERFECT
1 failed, 9 passed, 16 deselected in 166.39s (0:02:46)
##[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: 1792643670
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/4612451e-7c55-4f0f-b653-fd4ae220f828' 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-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 22, 2026
…est; skip when unavailable (Part of #5874)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (26d0c65) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 04:51
@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (18e8395) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

1 similar comment
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (18e8395) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 05:28
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5962 @ 18e8395: 1 failed check(s)

== shard 1 (1669449 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39728104859/job/119656687956
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[mood]
errors:
fail-on-cache-miss: false
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:44: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[mood] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
summary.callgraph_unscored: 'n/a' -> 0
summary.expected_fails_met: True -> False
summary.fails: '' -> 'callgraph'
summary.verdict: 'PERFECT' -> '6/7'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "mood: 8 difference(s) from the golden\n summary.callgraph_engine_only: 'n/a' -> 0\n summary.callgraph_misses: 'n/a'... summary.expected_fails_met: True -> False\n summary.fails: '' -> 'callgraph'\n summary.verdict: 'PERFECT
1 failed, 9 passed, 16 deselected in 129.89s (0:02:09)
##[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: 1792646864
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/92eee595-d281-425c-953a-ac369c63205c' 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
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push.

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 22, 2026
squid-protocol and others added 2 commits October 22, 2026 01:54
…xpects callgraph (Part of #5874)

mood: map_state_to_cobol calls _format_ammo_record, _format_entity_record and
_format_player_record; the engine misses them (9 misses, recall 0.9598).
freedoom (92 oracle calls) and doom-scheme (15) agree fully.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (a3b86b0) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 06:08
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit d1cae08 into main Oct 22, 2026
39 checks passed
@squid-protocol
squid-protocol deleted the churn/5874-20261022T0421Z branch October 22, 2026 06:16
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