Repository navigation
fix(core): extend class_start named extraction to go and objective-c (#1295) - #1344
Merged
Merged
Conversation
…1295) Both regressed when tried against their own class_start rule in #1295's scaffolding pass, but the actual root cause was a ground-truth measurement gap in tree_sitter_accuracy_audit.py's _get_node_name, not a regex bug: go's type_declaration has no "name" field (it lives on the child type_spec), and objective-c's class_interface/class_implementation/ class_declaration have no "name" field either (the identifier is a plainly-typed child, with superclass as a second sibling for class_interface). Both measured real_classes=0 pre-fix regardless of how good the regex was. With ground truth fixed, both languages measure cleanly at the allowlist flip: go found_classes 0->69, extra_classes 0->0 (the 15 "missing" are all plain type aliases like `type WaitStatus uint32` that go's class_start intentionally excludes, requiring struct/interface -- a ground-truth scope mismatch, not a recall bug, same shape as csharp's enum precedent in #1264). objective-c found_classes 0->5, extra_classes 0->0, a perfect match. crucible_check.py (both modes) shows zero golden-master diff. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…in/zig status go and objective-c are now flipped into the allowlist (this PR). Also corrects kotlin and zig, which the doc listed as needing the same ground-truth _get_node_name fix -- both were actually already fixed as a side effect of #1313's function-extraction work, so real_classes reads plausible for them today. Neither is flipped into the allowlist yet: kotlin needs a class_start capture-group fix (regex workflow, same as C/ Swift), zig needs a real per-file diff to explain extra_classes=10/ missing_classes=23 before concluding anything. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
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
class_startnamed-entity extraction to the 13 languages left on the legacy fallback).tests/tools/tree_sitter_accuracy_audit.py's_get_node_name, per the epic's own scaffolding-pass finding: go'stype_declarationand objective-c'sclass_interface/class_implementation/class_declarationnodes have nonamefield, soreal_classesmeasured0for both languages regardless ofclass_startregex quality._CLASS_START_NAMED_EXTRACTION_LANGScleanly, no regex changes needed:found_classes0→69,extra_classes0→0. The 15 "missing" are all plain type aliases (type WaitStatus uint32,type gcMode int, ...) that go'sclass_startintentionally excludes (requiresstruct/interfaceto follow) -- a ground-truth scope mismatch, same shape as csharp's enum precedent in [TIER 1] Class detection is 0% across apex/csharp/fortran/solidity despite near-perfect function detection #1264, not a recall bug.found_classes0→5,extra_classes0→0 -- a perfect match.Verification
python tests/tools/tree_sitter_accuracy_audit.py --lang go --regenerate/--lang objective-c --regeneratepython tests/tools/tree_sitter_accuracy_audit.py --summary-tablepython tests/tools/crucible_check.py-- both modes PASS, zero golden-master diffpython -m pytest tests/core_engine/ tests/extraction/-- 6573 passedpython tests/tools/audit_check.py --regenerate-- 5 pure line-shift ruff findings from the new frozenset entries, baseline regenerated; mypy/dead-key/ast-accuracy cleanTest plan
crucible_check.pyboth modes passtree_sitter_accuracy_audit.py --ciclean for both languages post-regenerateaudit_check.pyclean🤖 Generated with Claude Code