Skip to content

DOOM-rosetta: tree-sitter call-graph oracle covers kotlin; kocoa-doom scored (Part of #5874) - #6422

Merged
squid-protocol merged 3 commits into
mainfrom
churn/5874-20261024T0831Z
Oct 24, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/5874-20261024T0831Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5874 (check 7, item 3: oracles for more languages).

What

ts_callgraph_oracle.py now covers kotlin (function declarations, secondary constructors, init blocks; call callee = first named child, a.b.f -> f). kocoa-doom goes from n/a to scored: recall 0.9970, precision 0.9998, 14 misses, 1 unscored engine-only. The 14 misses are user functions the engine does not see when they are called with only a trailing lambda (ev.ifKey { .. }). kocoa-doom is added to expected_fails (callgraph); golden re-blessed for kocoa-doom only (7 callgraph/verdict fields, nothing else).

Convention (stated in the README): a trailing-lambda-only call of a Kotlin stdlib scope/iteration function (run, with, apply, let, also, repeat, times, map, filter, forEach, ...) is no call. By bare name it collides with the port's run() overrides (81 false misses on kocoa-doom before this). A user function called the same way still counts.

Class / Sibling gaps

Class: DOOM-rosetta ports with no check-7 oracle (n/a). Handled here: kotlin (kocoa-doom). Not handled, each a different mechanism:

  • crystal (doo-cr): tree-sitter crystal grammar puts a parse ERROR over much of the file; 698 of 1509 engine functions have no node at their start line, so a score would cover about half the port. Left n/a.
  • dart (dartdoom): calls are sibling selector nodes after the callee identifier and the signature is separate from the body: needs its own walker.
  • scheme, fsharp, fortran, cobol (3 ports), assembly (doom-fx), sql: no oracle yet; doom-ios (objective-c, not a licensed C/C++ oracle port) is also unscored. All still n/a (a shown pass, not silent).
  • C++ type / function-pointer edges: owner's open question, kept unscored.
  • callgraph_baseline.json refresh for the C/C++ ports that moved: separate slice.

Evidence

  • doom_rosetta_check.py --only kocoa-doom: drift was exactly the 7 callgraph fields before bless.
  • Tests: kotlin added to the per-language fixture test, plus a test for init/constructor units and trailing-lambda calls. tests/doom_rosetta + test_doom_speedrun.py pass (the 44 skipped are the opt-in doom_rosetta marker).
  • pr_gates --fast: 7/7; pr_gates --ratchets: 9 pass, 0 fail, 0 skipped.

🤖 Generated with Claude Code

… scored (Part of #5874)

kocoa-doom: recall 0.9970, precision 0.9998, 14 misses (user functions called with only a trailing lambda,
e.g. ifKey { }); expected_fails gains callgraph. A trailing-lambda-only call of a Kotlin stdlib scope function
(run, map, ...) is no call: by name it collides with the port's own run() overrides.

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 24, 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 24, 2026 08:57
@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 09:00
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6422 @ a77032c: 1 failed check(s)

== shard 4 (1666524 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40080027974/job/120831567839
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[sqldoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[sqldoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
sqldoom: 3 difference(s) from the golden
summary.callgraph_precision: 1.0 -> 0.9878
summary.callgraph_recall: 0.9371 -> 0.9364
summary.callgraph_unscored: 0 -> 8
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not 'sqldoom: 3 difference(s) from the golden\n summary.callgraph_precision: 1.0 -> 0.9878\n summary.callgraph_recall: 0.9371 -> 0.9364\n summary.callgraph_unscored: 0 -> 8'
1 failed, 11 passed, 21 deselected in 124.28s (0:02:04)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 4 (1666524 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: agentic-cobol-doom-cc,crispy-doom,doo-cr,doomf77,fastdoom,helion,inter-doom,kocoa-doom,managed-doom,prboom-plus,sqldoom,srb2
T0: 1792832491
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/377b19be-75aa-4723-acf9-2f7dc052451b' 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 24, 2026
squid-protocol and others added 2 commits October 24, 2026 05:06
…tlin only (Part of #5874)

It had dropped map/run/with calls from JS/Go/Rust call_expression too, moving sqldoom's golden.

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

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (5e5ee0c) 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 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 09:20
@squid-protocol
squid-protocol merged commit 0f77c32 into main Oct 24, 2026
39 checks passed
@squid-protocol
squid-protocol deleted the churn/5874-20261024T0831Z branch October 24, 2026 09:42
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

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