feat(ingestion): tree-sitter node-type/field validation gate + remove dead literals#1937
Conversation
… dead literals
Add a CI gate (test/integration/grammar-literal-validation.test.ts) validating
every node-type and field-name literal in the ingestion code layer against each
grammar's node-types.json, with a live `new Parser.Query` probe fallback for
literals the static JSON under-reports. Covers all three surfaces:
- legacy Call-Resolution DAG (type-extractors, *-extractors/configs) + the
ungated structure phase (field/method extractors, export-detection) — AST scan;
- registry scope-resolution captures + scope queries (Mode 3 compile);
- the registry RESOLUTION layer (scope-resolver/type-binding/receiver-binding/
interpret/arity/import-decomposer …) via a TS-TypeChecker discriminator that
collects a literal ONLY when its `.type` receiver is a tree-sitter SyntaxNode
(so resolved-symbol `.type` kinds like 'Class' are never mistaken for nodes).
Helpers: test/helpers/{grammar-introspection,literal-collectors}.ts.
Remove every existence-dead literal the gate surfaces (behavior-neutral
dead-branch/fallback deletions verified absent from the installed grammar),
spanning the legacy, structure-phase, and registry production paths:
reference_type/pointer_type/scoped_identifier/scoped_type_identifier/
rvalue_reference_declarator/variadic_parameter (C/C++), equals_value_clause/
identifier_name/simple_identifier/record_struct_declaration/record_class_declaration
(C#), generic_type/`type` field (Dart), nullable_type (PHP), method_call/symbol
(Ruby), method_call_expression/slice_type/shorthand_field_pattern (Rust),
struct_declaration/internal_name (Swift), comment (Java), parameter/
parameterized_type and dead childForFieldName('pattern'|'modifiers'|
'formal_parameters'|'declaration'|'default'|'return_value'|'alias_clause') /
class_expression fallbacks. Gate ships with an empty allowlist.
One behavior FIX (scope-resolution): PHP `findEnclosingTypeDeclaration` omitted
`anonymous_class`, so a method inside an anonymous class mis-bound `$this` to the
enclosing named class; add `anonymous_class` so it is correctly skipped.
Verified: tsc clean; gate green (empty allowlist); scope-resolution parity 26/26
on both REGISTRY_PRIMARY_*=0 and =1; resolver suite no new failures.
Issue #1920 (epic #1919).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 10388 tests passed 9 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
… tests Three tests asserted defensive handling of node types the installed grammars never emit (verified via real tree-sitter parse), so they broke once the dead literals were removed in af9d709: - parsing.test.ts isNodeExported / csharp: `record struct` and `record class` both parse to `record_declaration` (kept in CSHARP_DECL_TYPES) — tree-sitter-c-sharp emits no `record_struct_declaration` / `record_class_declaration` node. Switch the two mock nodes to `record_declaration`. - extract-generic-type-args.test.ts: Java emits `generic_type` and Kotlin `user_type`+`type_projection`; `parameterized_type` is produced by no installed grammar, so the shared extractor returns [] for it. Convert the case to a documented negative assertion (real paths already covered by the generic_type cases). No source behavior change: production export detection (record_declaration) and generic type-arg extraction (generic_type / type_projection) were already correct. Fixes the 3 CI failures on PR #1937. Issue #1920 (epic #1919). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…wlisted) Restore the `parameterized_type` branch in extractSimpleTypeName / extractGenericTypeArgs (type-extractors/shared.ts) so a parameterized_type node still yields its type arguments (List<User> -> [User]). Current tree-sitter-java emits `generic_type` and tree-sitter-kotlin `user_type`+`type_projection`, so this is a defensive alternate node kept for grammar-version resilience; it is allowlisted in the node-type validation gate with a documented justification rather than removed. extract-generic-type-args.test.ts now asserts the User type argument is captured from a parameterized_type node. Issue #1920 (epic #1919). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rameterized_type guess extractGenericTypeArgs / extractSimpleTypeName special-cased `parameterized_type`, a node type NO installed grammar emits (real parse: Java/TypeScript/Rust -> generic_type, C# -> generic_name, Kotlin -> user_type). It was a guess masking a real gap; remove it. The genuine 'Kotlin alternate node type' is `user_type` (`List<User>` parses to user_type > [type_identifier, type_arguments]), which the extractor returned [] for. Handle it: read a user_type's own type_arguments, else recurse into its wrapped child (preserving the existing user_type > generic_type unwrap). No production caller passes user_type today (Kotlin generics resolve via jvm.ts), so this only makes the function's documented Kotlin contract correct — zero behaviour change for current callers (Java/TS/C#/Rust pass generic_type/name). Replace the mock parameterized_type test with REAL-PARSE coverage across Java/TypeScript/C#/Rust/Kotlin (+ Java Map<String,User>) so a wrong node-type guess can't silently pass again. Gate allowlist returns to empty. Issue #1920 (epic #1919). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✨ PR AutofixFound fixable formatting / unused-import issues across 70 changed lines. Comment |
magyargergo
left a comment
There was a problem hiding this comment.
PR Tri-Review — node-type/field validation gate + dead-literal removal
Verdict: production-ready with minor follow-ups. Merge state: MERGEABLE / CLEAN (CI green — run 26705126928). Branch hygiene: 5 focused commits on origin/main@d1d2a64d, no merge-from-main, no unrelated churn. The production changes are correct and validated; every finding below concerns the new gate's completeness and none blocks merge.
Methods: 5 Claude reviewer lanes (risk, correctness, adversarial, maintainability, testing) + a synthesis-critic gate. Codex was dispatched but returned no structured findings, so this is a multi-Claude-lane review — agreement here is consistent across personas, not independent cross-engine confirmation.
✅ What's solid (validated, not assumed)
- The central dead-literal claim held under empirical real-parse testing by the adversarial and correctness lanes. Every removed node-type literal — C#
record_struct_declaration/equals_value_clause, C++scoped_identifier/variadic_parameter, Rustslice_type/method_call_expression/shorthand_field_pattern, PHPnullable_type/alias_clause, Swiftstruct_declaration, Rubysymbol/method_call, Dartgeneric_type, TSclass_expression, … — was confirmed not emitted by the grammar for the language(s) that code path serves. No silent regression. type-extractors/shared.ts: droppingparameterized_typeand handling Kotlin's realuser_typeis a net improvement — the old code returned[]for Kotlin generics. Depth-guarded; no infinite recursion.languages/php/receiver-binding.ts: theanonymous_classchange is a genuine correctness fix — it closes a latent$thismis-bind (a method in an anonymous class nested in a named class previously bound$thisto the outer class).anonymous_classis the real grammar node; the oldanonymous_class_declarationliteral never matched.
🔧 Findings — gate completeness (none block merge)
Two inline comments (P2). In short:
- Node-agnostic field validation lets node-scoped-dead
childForFieldNamelookups through — the kept?? childForFieldName('pattern')fallbacks attype-extractors/csharp.ts:101andtype-extractors/jvm.ts:90,419(the same dead-field pattern this PR removes from go/php/python/swift) survive the gate. Reproduced. - Mode-4 (resolution layer) can silently contribute zero literals —
resolutionLayerProgramOkis set but never asserted and the gate floors nothing, so a TS-build failure on a CI host would let resolution-layer files go unvalidated while the gate stays green.
📋 Lower-priority (body only)
- P3 — a dead
parameterized_typeliteral still lives attype-env.ts:980on a realSyntaxNode(child.type === 'parameterized_type'), outside all four scan surfaces; the collector doc comment incorrectly claimstype-env.tsuses only resolved-symbol kinds. Behavior-neutral, but a blind spot in the PR's own remove-and-gate thesis (type-env.tsisn't in this diff — follow-up). - P3 nits — (a)
literal-collectors.tsdoc says "THREE modes" but four are implemented (in-file order 1,2,4,3); (b)collectResolutionLayerLiterals(Mode 4) returns typeMode2Result(misnamed); (c) the twoknownFailures.has()checks at:71/:87run against the empty Set at:27(dead conditionals — considerexpect(knownFailures.size).toBe(0)); (d) the real-parse generics matrix lacks Kotlin/C# multi-arg cases (only mock-tested); (e) theprobeNodeType"unavailable" test asserts only not-throw, not the return value.
🧪 Refuted (actively checked, found false — validation is a result)
Every removed-literal regression hypothesis; user_type infinite-recursion / wrong-args; the PHP anonymous_class change breaking a previously-correct binding.
⏭️ Pre-existing (not caused here — follow-up)
Java argument-arity overcounts interleaved block_comment/line_comment (the removed comment literal was already dead, so removal is behavior-neutral, but it surfaces a real overcount that can skew arity-based overload resolution).
Automated multi-tool digest (5 Claude lanes; Codex unavailable). Verify before acting.
…(U1) Add probeField(language, nodeType, field) — the node-scoped analogue of probeNodeType: compiles `(<nodeType> <field>: (_)) @_` against the live grammar and classifies TSQueryErrorStructure/Field -> dead, TSQueryErrorNodeType (node absent here) -> unavailable, compile -> valid. Conservative-toward-valid (supertype-typed fields make some wrong fields compile), so it never produces a false positive. Add isFieldError classifier; make validateField's node-scoped path membership-then-probe so node-types.json field under-reporting can't yield a false `dead`. Foundation for the node-scoped field validation gate (no gate behavior change yet). Issue #1920 (epic #1919).
…nv.ts (U2) CollectedField gains receiverNodeType, captured conservatively by receiverNodeTypeOf: only when a childForFieldName receiver is unambiguously narrowed by a single enclosing positive guard (if (recv.type==='X') then-branch, or switch case 'X') with no reassignment/shadowing of the receiver in the enclosing function. Any uncertainty -> undefined (sound global fallback); fail-safe (benign false negative, never a false positive). Extend Mode-4's resolutionLayerFiles to include shared resolution files directly under ingestion/ (type-env.ts), tagged with the full gated language set via fileLanguages (valid-if-any). Entries now carry a language SET. Rename Mode2Result -> ScanResult; fix the header doc (THREE -> FOUR modes). Gate behavior unchanged until U3 consumes receiverNodeType. Issue #1920.
…terals (U3, U4) U3: the gate validates childForFieldName lookups node-scoped (validateField with the captured receiverNodeType) and fails loudly on a degraded/vacuous run (asserts resolutionLayerProgramOk, floors collected counts, requires knownFailures empty). U4: remove every dead field/literal the hardened gate flags — all behavior-neutral (the dead disjunct never fired on reachable nodes; verified by real parse + the type-extractor/resolution unit suites, 484 passing): - type-env.ts: parameterized_type (emitted by no grammar) and switch_block_label (real Java enhanced switch is switch_label/switch_rule) from the SyntaxNode .type sets - languages/csharp/captures.ts: generic_name has no `name` field -> firstNamedChild - type-extractors/jvm.ts: Kotlin property_declaration has no name/type fields (positional children) -> findChild; drop the else-branch `pattern` fallbacks x2 - type-extractors/csharp.ts: drop the else-branch `pattern` fallback (parity with go/php/python/swift) Gate green with node-scoped validation on; tsc clean. Closes the Mode-4 type-env coverage opened in U2. Latent follow-up: Java enhanced-switch arms (switch_rule) are absent from NARROWING_BRANCH_TYPES — a separate behavior fix. Issue #1920 (epic #1919).
tree-sitter-java emits block_comment/line_comment as named children of argument_list; counting them inflated @reference.arity / @reference.parameter- types / @reference.arg-names for any Java call with an inline comment, which skews arity-based overload resolution (arity feeds call-processor symbol-ID generation). Filter them at the single arg-list site (also corrects the downstream args.map). The previously-removed `comment` literal never matched — the real nodes are block_comment/line_comment (the #1920 gate lesson). Isolated from the behavior-neutral gate units (U1-U4) since this changes production graph output. Java resolver suite 178/178; new java-call-arity test covers block/line comments, leading comment, constructor calls, and the no-comment regression. Issue #1920 (epic #1919).
…ssertions (U6) - extract-generic-type-args: add real-parse Kotlin Map<String,User> (user_type > type_arguments > type_projection) and C# Dictionary<string,User> (generic_name > type_argument_list) multi-arg cases. - grammar-introspection: the probeNodeType test now asserts 'dead' for a bogus node on installed grammars (not merely not-throw), and documents the null-model split (validateField -> unavailable; validateNodeType -> still probes the live grammar). Issue #1920 (epic #1919).
CI runs `prettier --check .` from the repo root (printWidth 100); the gitnexus/ pre-commit hook formatted these two files differently. Format-only, no behavior change. Issue #1920.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
…to validation gate The grammar-literal-validation gate (abhigyanpatwari#1937) added to main exposed latent bugs in GDScript extractor code that used incorrect tree-sitter field names: - for_statement: 'name'/'iterable' → 'left'/'right' (GDScript grammar uses different field names) - base_call/attribute_call: removed 'name' field lookup (identifier is child, not field) - assignment: removed 'type' field check (doesn't exist in GDScript grammar) - parameter: removed (GDScript uses typed_parameter/default_parameter/typed_default_parameter) Also added GDScript to test helper mappings (GRAMMAR_PACKAGES, DIR_LANG, BASENAME_LANGS, PREFIX_LANGS) so the validation gate can properly validate GDScript literals.
Summary
Adds a CI gate that validates every tree-sitter node-type and field-name literal used across the ingestion code layer against each grammar's actual
node-types.json, and removes the existence-dead literals it surfaces. This kills the systemic "dead branches keyed on node types the grammar never emits" class (the AST audit's dominant finding) and prevents new grammar drift on a bump.Closes #1920 (enabler in the AST coverage epic #1919).
What the gate covers
test/integration/grammar-literal-validation.test.ts(+ helperstest/helpers/{grammar-introspection,literal-collectors}.ts) validates literals across all three resolution surfaces:type-extractors/*,*-extractors/configs/*,export-detection.ts) — static AST scan by consumption site (node.type === '…',childForFieldName('…'),Set.has(node.type)members).query-compilation.test.ts, which only covers the legacy*_QUERIES).scope-resolver/type-binding/receiver-binding/interpret/arity/import-decomposer…) — the production path for migrated languages — via a TS-TypeChecker discriminator that collects a literal only when its.typereceiver resolves to a tree-sitterSyntaxNode, so resolved-symbol.typekinds (e.g.'Class') are never mistaken for grammar nodes.Oracle:
node-types.jsonmembership (union of types + subtypes + field/child types, including anonymous tokens & supertypes) with a livenew Parser.Queryprobe fallback for literals the static JSON under-reports. Optional/uninstalled grammars are skipped (never a build failure). Ships with an empty allowlist.Dead literals removed (behavior-neutral)
Each removal deletes a dead branch/fallback verified absent from the installed grammar (the correct node is already handled elsewhere):
reference_type,pointer_type,scoped_identifier,scoped_type_identifier,rvalue_reference_declarator,variadic_parameterequals_value_clause,identifier_name,simple_identifier,record_struct_declaration,record_class_declarationgeneric_type,typefield · PHP:nullable_type,alias_clause,return_valuefield · Ruby:method_call,symbolmethod_call_expression,slice_type,shorthand_field_pattern· Swift:struct_declaration,internal_name· Java:comment· Go:parameterparameterized_type, and deadchildForFieldName('pattern'|'modifiers'|'formal_parameters'|'declaration'|'default')/class_expressionfallbacksOne behavior fix (scope-resolution)
PHP
findEnclosingTypeDeclarationomittedanonymous_class, so a method insidenew class {…}mis-bound$thisto the enclosing named class. Addedanonymous_classso anonymous-class methods are correctly skipped.Verification
tsc --noEmitcleanREGISTRY_PRIMARY_*=0and=1+60 / −209lines across the ingestion source (deletions dominate — dead-code removal)🤖 Generated with Claude Code
Refs #1923
Refs #1926
Refs #1935
Refs #1930
Refs #1934