Repository navigation
fix(dart): wire dart into class_start named-entity extraction (#1295) - #1385
Merged
Merged
Conversation
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
Co-Authored-By: Claude Sonnet 5 <[email protected]>
…named-extraction-1295 # Conflicts: # tests/extraction/how_to_extend_class_start_named_extraction.md
Contributor
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends #1264's per-language
class_startnamed-entity extraction to dart, per epic #1295. Nolanguage_standards.pyregex change -- pure ground-truth fix, every real class was already matched correctly by dart's ownclass_startregex (missing_classes=0throughout).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 nonamefield in this grammar, needed a new_get_node_namebranch that walks children for a plainidentifiernode.enum_declaration(enum Foo { ... }) -- resolves via the existing fast path, no extra code needed.extra_classes8→0,real_classes/found_classes167→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-- cleanpython tests/tools/crucible_check.py-- both modes PASS (rebuilt a corruptedfull_precisionvenv 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-shiftspython -m pytest tests/core_engine/ tests/extraction/-- 6585 passed, 2 skipped, 11 xfailed, 3 xpassedTest plan
tree_sitter_accuracy_audit.py --lang dart --cicleancrucible_check.pyboth modes cleanaudit_check.pycleancore_engine/extractionsuite passes🤖 Generated with Claude Code