Skip to content

Call-graph reference: JavaScript via tsc allowJs (Part of #3781) - #6392

Merged
squid-protocol merged 1 commit into
mainfrom
churn/3781-js-callgraph
Oct 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/3781-js-callgraph

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3781 (epic #3772). Adds the JavaScript call-graph reference: the TypeScript checker with allowJs (ts_callgraph.js --js) over expressjs/express, already pinned in tests/import_graph_corpus.json.

Class / Sibling gaps

Class: onboarding a CommonJS/untyped reference whose declaration shapes (exports.f = function, module.exports = function, x.prototype.m = function, .cjs/.mjs) must be named as the engine names them. All handled by one functionOf extension and one registry entry. Sibling gaps: the CI wiring (graph-accuracy-audit.yml gate step and paths: for the new baseline) needs allow_workflows, so it is a remaining slice; Go/Java/C++/Rust (#3782-#3785) use other mechanisms; JSX/Flow-typed JS is untested.

First numbers (vs tsc (allowJs) 6.0.2, express)

metric value
reference defs / edges 341 / 29 (141 files)
confident precision 100.0% (16 judged; 4 unconfirmed)
recall 55.2% (13 of 29 missed; 12 resolved_outside, e.g. this.set(...), this.route(...); 1 same-name)
unmapped ends 0

The untyped checker resolves few edges (29 in 341 defs): this.x() and calls on untyped parameters get none. That is the reference's blind spot, reported as unconfirmed, not engine error. Not yet hand-checked against source beyond the triage samples; no issues filed.

Verification

  • callgraph_check.py: java, javascript, typescript gates and 356 tests PASS, lint PASS; pyan3, crucible and tree-sitter steps could not run here (pyan3 not installed, language-crucible not found in this worktree's sibling path). No engine code changed.
  • call_graph_resolution.py typescript --ci OK (TS mode output unchanged by construction; its committed baseline lags main).
  • pr_gates.py --fast: 7/7.

Remaining slices

.github/workflows/graph-accuracy-audit.yml gate step + baseline in paths: (needs allow_workflows); docs/function_call_graph.md numbers; triage of the 12 resolved_outside links against source.

🤖 Generated with Claude Code

…3781)

ts_callgraph.js gains a --js mode (.js/.cjs/.mjs, allowJs) that resolves
CommonJS assignment declarations (exports.f = function, module.exports =
function); a javascript entry in callgraph_refs.REFERENCES, its baseline,
a fixture test and docs.

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 07:00
@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 07:02
@squid-protocol
squid-protocol merged commit f9cf517 into main Oct 24, 2026
51 checks passed
@squid-protocol
squid-protocol deleted the churn/3781-js-callgraph branch October 24, 2026 07:15
@squid-protocol

Copy link
Copy Markdown
Owner Author

Waiting on an owner decision (asked privately, 2026-10-24). Nothing is needed from contributors; work resumes once it is answered.

squid-protocol added a commit that referenced this pull request Oct 24, 2026
…dit (Part of #3781) (#6468)

Adds the call-javascript gate to lane 1 (after call-typescript, same tsc), the
baseline to paths:, and re-measures the baseline: engine changes since #6392
moved it (judged 16 -> 414, recall 55.2 -> 77.8, precision 100 -> 99.3), so the
committed numbers would have failed the first CI run.

Co-authored-by: Claude Sonnet 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