Skip to content

Java call graph: a constructor's super(...) is a call to the superclass constructor (Part of #3772) - #6456

Merged
squid-protocol merged 5 commits into
mainfrom
churn/3772-20261024T0958Z
Oct 24, 2026
Merged

squid-protocol merged 5 commits into
mainfrom
churn/3772-20261024T0958Z

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #3772.

Java not_extracted/other bucket vs scip-java 0.12.3 (gson), slice A: a constructor's super(...) is now a call to the superclass constructor.

  • Detector (detector.py): super stays in _calls_out_ignore (so super.m() and non-constructors are untouched), but a bare super( in an uppercase-named unit with arity tracking is kept, with its argument counts, like this(...) from Java call resolver: calls to a sibling overload of the same name and this(...) chaining are edges, not recursion (Part of #3772) #6424.
  • Resolver (call_resolver.py, _expand_super_ctor): the super callee becomes the unit's direct in-repo superclass (generic arguments stripped: extends Base<T> names Base), and the existing class -> constructor -> overload choice by argument count does the rest. A parent outside the repo (Exception) leaves no call, as before.

Class / Sibling gaps

Class: a Java constructor call that calls_out_to drops (reference sees an edge to the superclass or class constructor). Handled here: super(...) chaining (arity overloads, nested class, cross-file parent, generic parent, out-of-repo parent, super.m() unchanged).
Sibling gap: new TypeToken<A<B<C>>>() {} anonymous generic subclass and its chained .getType() / enclosing gson.fromJson(...) (about 21 edges left in the bucket). It goes through the shared JVM pattern CALLS_OUT_C_STYLE_GENERIC_NO_ANNOTATION (_shared_patterns.py, #4124, also kotlin and groovy), so it needs its own PR with a wider golden check. No burned estate needs it.
Known limit: a qualified parent (extends Outer.Base<T>) is recorded by the class extractor as Outer, so super(...) there would target Outer; the same weakness already feeds method lineage. Not touched here.

Evidence

callgraph_triage.py java: not_extracted/other 49 -> 21; recall 72.2% -> 72.5%; precision 99.8% unchanged; wrong 12 unchanged. callgraph_check.py --langs java: gate, tests, crucible (both modes, no golden drift), tree-sitter all PASS; baseline regenerated. pr_gates --fast 7/7, --ratchets 9/9 (no skips). New test file also run with plain pytest from /tmp.

Hand-written files: 3 (detector, resolver, one test); baseline regenerated.

🤖 Generated with Claude Code

Checklist: partial [c:e759db1c] -- Java call-graph accuracy (super(...) edges) only; the SCIP shared-route evaluation is not done

squid-protocol and others added 3 commits October 24, 2026 08:29
…ss constructor (Part of #3772)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…3772)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@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 12:47
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 12:50
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6456 @ 687c3a0: 2 failed check(s)

== full-suite part 1/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40095387579/job/120878984100
repro: python -m pytest -q tests/extraction/languages/test_calls_out_contract_3327.py::test_super_keyword_is_not_a_call[java-class
failing tests: tests/extraction/languages/test_calls_out_contract_3327.py::test_super_keyword_is_not_a_call[java-class
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 AssertionError: assert ('super' not in ['super', 'go'])
tests/extraction/languages/test_calls_out_contract_3327.py:111: AssertionError
FAILED tests/extraction/languages/test_calls_out_contract_3327.py::test_super_keyword_is_not_a_call[java-class B extends A {\n B(int x) {\n super(x);\n go(x);\n }\n}\n-B] - AssertionError: assert ('super' not in ['super', 'go'])
##[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 204877
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 9baae2a82664246c0fab2bd0fa8e65e73c1251c79aa844d4b8070ec02f0b900e
Finalizing artifact upload
Artifact test-times-part-1 successfully finalized. Artifact ID 12560779699
Artifact test-times-part-1 has been successfully uploaded! Final size is 204877 bytes. Artifact ID is 12560779699
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/40095387579/artifacts/12560779699
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/33a9ba92-13fe-4633-bfd1-5a19e15ddc46' 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 2 (1666363 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40095387564/job/120878549084
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[mochadoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[mochadoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
summary.callgraph_unscored: 214 -> 272
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 "mochadoom: 6 difference(s) from the golden\n summary.callgraph_engine_only: 0 -> 1175\n summary.callgraph_precision... summary.expected_fails_met: True -> False\n summary.fails: '' -> 'callgraph'\n summary.verdict: 'PERFECT
1 failed, 10 passed, 22 deselected in 121.37s (0:02:01)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 2 (1666363 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-codex,doom-ascii,doom-fx,doom-scheme,doom3do,doomretro,fps-cob,gzdoom,mochadoom,nugget-doom,odamex
T0: 1792847416
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/790b1b83-5fab-4d6b-b216-47f97a32f94d' 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 squid-protocol added the shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md label Oct 24, 2026
…es, broken implements headers (Part of #3772)

mochadoom's DOOM-rosetta call-graph check went red (1175 engine-only edges): a nested class
name repeated across files merged its parents, a lowercase class name and a header broken
before `implements` dropped the edge. The oracle now counts a Java super(...) as a call to the
extends type. Contract test updated: java super(...) is a call since #3772.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@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 (e656d9f) 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 (e656d9f) 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:waiting-on-main Bot: the failing check fails on main too (main's to fix). 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 13:30
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 1438c6f into main Oct 24, 2026
69 checks passed
@squid-protocol
squid-protocol deleted the churn/3772-20261024T0958Z branch October 24, 2026 13:45
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