Skip to content

call-graph accuracy: dart reader sees initializer lists and const callees (Part of #6454) - #6550

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6454-20261024T2109Z
Oct 24, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6454-20261024T2109Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6454 (siblings of #3799).

Checklist: done [c:a678bf65]
Checklist: done [c:7167e1ad]

What changed

  • Generic invocations f<T>(x) (c:a678bf65): already fixed by Dart calls_out: generic invocations f<T>(x) and nullable type arguments (Part of #6454) #6473 (CALLS_OUT_DART), which carried no checklist line, so the box never ticked. Re-measured here: the argument_part/-+generic shape no longer appears in the --buckets report (it was 88).
  • Optional-parameter type names (c:7167e1ad): not an engine defect, a harness defect. Every sampled case is a real call (const RouteSettings(), FocusManager()) in an initializer list or default value. The tree-sitter reader (tests/tools/call_graph_accuracy.py) got two things wrong for dart:
    1. initializers is a sibling of constructor_signature, so calls in : x = x ?? const Foo(), y = bar() were outside every function span. New _bodies_of adds the initializer list to the constructor's unit.
    2. const Foo(1): _dart_callee took the first named child, const_builtin, so the callee read as const and the call was lost. It now takes the last identifier before the arguments, so const Foo.named() names named, the rightmost identifier, as the harness documents and the engine does.
  • The ledger verdict for formal_parameter<optional_formal_parameters ("engine defect") was wrong; the shape no longer reproduces and --ledger recorded that. No verdict was hand-edited.
  • Test: test_dart_constructor_initializer_list_and_const_callees_belong_to_the_constructor.

Evidence

call_graph_accuracy.py, dart, before -> after: precision 95.8% -> 99.1%, recall 99.0% -> 99.1%, FP 111 -> 23, FN 25 -> 25, TP 2531 -> 2619. Remaining dart FP are outside-ts-function (13) and unconditional_assignable_selector (2) etc.; remaining FN: argument_part/- (12), engine-attributes-to-another-function (13).
No engine, standards or golden-master file changed (tests/tools only), so no bless and no --ratchets. pr_gates --fast 7/7; tree-wide guard tests and test_call_graph_accuracy.py 273 passed.
Baseline and ledger are scoped to dart: a full --regenerate also moved cpp (fp 271 -> 258, from #6524) and powershell (matched 460 -> 490, unexplained), which I left at main's values; the ledger run also reordered examples in other languages, reverted.

Class / Sibling gaps

Class: dart call-graph disagreements where the engine is right and the tree-sitter reader misses the call (initializer lists, const constructors). Both members handled here. Not handled: powershell baseline drift (matched 460 -> 490 with no change of mine) and cpp baseline (fp 271 -> 258) are stale on main; whoever owns them should regenerate. Remaining dart shapes (argument_part/- 12, engine-attributes-to-another-function 13, outside-ts-function 13) are own slices; haskell (3 shapes) and rust token_tree items are different mechanisms.

🤖 Generated with Claude Code

…nd names const callees (Part of #6454)

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-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 24, 2026 22:20
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 24, 2026 22:22
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Oct 24, 2026
@squid-shepherd
squid-shepherd Bot merged commit d30f961 into main Oct 24, 2026
60 of 63 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6454-20261024T2109Z branch October 24, 2026 22:50
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 shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant