Skip to content

fix(dart): wire dart into class_start named-entity extraction (#1295) - #1385

Merged
squid-protocol merged 6 commits into
mainfrom
fix/dart-class-start-named-extraction-1295
Aug 12, 2026
Merged

squid-protocol merged 6 commits into
mainfrom
fix/dart-class-start-named-extraction-1295

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

Extends #1264's per-language class_start named-entity extraction to dart, per epic #1295. No language_standards.py regex change -- pure ground-truth fix, every real class was already matched correctly by dart's own class_start regex (missing_classes=0 throughout).

All 8 pre-fix "extra" names traced to two tree-sitter node types missing from NODE_MAPS["dart"]["class_node_types"]:

  • mixin_declaration (mixin Foo on Bar { ... }) -- has no name field in this grammar, needed a new _get_node_name branch that walks children for a plain identifier node.
  • enum_declaration (enum Foo { ... }) -- resolves via the existing fast path, no extra code needed.

extra_classes 8→0, real_classes/found_classes 167→200 -- a perfect match, confirmed via flutter's mixin/enum examples in the corpus.

Implemented via an independent Gemini/Antigravity delegation pass, then independently re-verified end to end (full diff re-read, accuracy audit, both crucible modes from a clean venv, full test suite) before this commit -- same discipline as the other 3 languages in this batch (#1295's haskell/c PRs).

Verification

  • python tests/tools/tree_sitter_accuracy_audit.py --lang dart --ci -- clean
  • python tests/tools/crucible_check.py -- both modes PASS (rebuilt a corrupted full_precision venv left over from the delegation's own permission churn, same as the c PR hit)
  • python tests/tools/audit_check.py --regenerate -- ruff findings were pure line-shifts
  • python -m pytest tests/core_engine/ tests/extraction/ -- 6585 passed, 2 skipped, 11 xfailed, 3 xpassed

Test plan

  • tree_sitter_accuracy_audit.py --lang dart --ci clean
  • crucible_check.py both modes clean
  • audit_check.py clean
  • Full core_engine/extraction suite passes

🤖 Generated with Claude Code

squid-protocol and others added 4 commits August 12, 2026 17:15
No language_standards.py regex change -- pure ground-truth fix. Every real
class was already matched correctly by dart's own class_start regex
(missing_classes=0 throughout); all 8 pre-fix "extra" names traced to two
tree-sitter node types missing from NODE_MAPS["dart"]["class_node_types"]:

- mixin_declaration (`mixin Foo on Bar { ... }`) -- has no "name" field in
  this grammar, needed a new _get_node_name branch (walks children for a
  plain "identifier" node).
- enum_declaration (`enum Foo { ... }`) -- resolves via the existing fast
  path, no extra code needed.

extra_classes 8->0, real_classes/found_classes 167->200 -- a perfect match,
confirmed via flutter's mixin/enum examples in the corpus.

crucible_check.py both modes clean, full core_engine/extraction suite passes
(6585 tests), audit_check.py clean.

Implemented via an independent Gemini/Antigravity delegation pass, then
independently re-verified end to end (full diff re-read, accuracy audit, both
crucible modes from a clean venv, full test suite) before this commit.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…named-extraction-1295

# Conflicts:
#	tests/extraction/how_to_extend_class_start_named_extraction.md
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

squid-protocol and others added 2 commits August 12, 2026 17:30
The prior merge commit let git auto-merge this machine-generated file
textually instead of regenerating it fresh, leaving it a line off from
the real merged code (caught by CI's ruff-audit check).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…named-extraction-1295

# Conflicts:
#	tests/extraction/how_to_extend_class_start_named_extraction.md
@squid-protocol
squid-protocol merged commit a3cbeba into main Aug 12, 2026
30 of 31 checks passed
@squid-protocol
squid-protocol deleted the fix/dart-class-start-named-extraction-1295 branch August 12, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant