Repository navigation
fix(haskell): wire haskell into class_start named-entity extraction (#1295) - #1377
Merged
squid-protocol merged 2 commits intoAug 12, 2026
Merged
Conversation
Haskell's class_start regex intentionally matches data, newtype, class, and type (representing Object / Entity Declarations). Prior to this fix, the tree-sitter accuracy audit only considered class_decl and class as Haskell's class_node_types. This caused a ground-truth measurement gap where real declarations (like data and newtype) found by GitGalaxy were incorrectly flagged as extra. By including data_type, newtype, type_synomym, data_family, and type_family in NODE_MAPS['haskell']['class_node_types'], we corrected this measurement gap. The name field is naturally resolvable for all of them, so _get_node_name works out-of-the-box. This successfully drops extra_classes to zero, allowing us to safely add haskell to _CLASS_START_NAMED_EXTRACTION_LANGS.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
squid-protocol
deleted the
fix/haskell-class-start-named-extraction-1295
branch
August 12, 2026 21:05
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 haskell, per epic #1295. Nolanguage_standards.pyregex change -- pure ground-truth fix, same shape as rust'sunion_itemfix.Haskell's own
class_startregex already intentionally matchesdata(?:\s+family)?|newtype|class|type(?:\s+family)?under an "Object / Entity Declarations" comment.NODE_MAPS["haskell"]["class_node_types"]intests/tools/tree_sitter_accuracy_audit.pyonly had{"class_decl", "class"}-- missing tree-sitter-haskell's separate node types fordata/newtype/typedeclarations (data_type,newtype,type_synomym-- the misspelling is the grammar's own, kept verbatim --data_family,type_family), all of which expose a usablenamefield natively (no_get_node_namebranch needed). Confirmed via pandoc'sdata PandocOutput/data Filter/etc. Added all 5 node types.real_classes/found_classes1→16,extra_classes15→0 -- a perfect match, not an accepted-gap case like csharp/zig/rust.This PR was implemented by an independent Gemini/Antigravity delegation pass (epic #1295's first cross-model implementation), then independently re-verified end to end before merge -- re-read the diff, re-ran
tree_sitter_accuracy_audit.py --lang haskell --ci, and re-ran the relevant pytest suites myself rather than trusting the subagent's own "verified" self-report alone.Verification
python tests/tools/tree_sitter_accuracy_audit.py --lang haskell --ci-- cleanpython tests/tools/crucible_check.py-- both modes PASSpython 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 haskell --cicleancrucible_check.pyboth modes cleanaudit_check.pycleancore_engine/extractionsuite passes🤖 Generated with Claude Code