Skip to content

fix(treesitter): index Java record definitions - #18

Merged
odvcencio merged 1 commit into
mainfrom
feature/java-record-tags-20260823
Aug 24, 2026
Merged

fix(treesitter): index Java record definitions#18
odvcencio merged 1 commit into
mainfrom
feature/java-record-tags-20260823

Conversation

@odvcencio

Copy link
Copy Markdown
Owner

Summary

  • supplement the inferred Java tags query with record_declaration type definitions
  • preserve existing inferred Java methods and call references
  • cover the record, both methods, and the internal call reference

Evidence

  • exact baseline: 70836d6
  • bounded matrix stopped at probe 1 because User was absent while label and normalize methods remained indexed
  • the Java AST query for record_declaration and identifier matches User directly
  • live indexing changes the sample from 2 to 3 symbols while preserving the label -> normalize call edge
  • production and regression logic are model-authored; integration changed only malformed hunk counts and new-file placement

Validation

  • go test ./pkg/lang/treesitter -run ^TestJavaRecordDefinition$ -count=20
  • focused Ruby, JavaScript, TypeScript, Rust, and Java tag tests
  • go test ./pkg/lang/treesitter -count=1
  • go test -race ./pkg/lang/treesitter -count=1
  • go test ./pkg/index ./pkg/xref ./cmd/canopy -count=1
  • go test ./... -count=1
  • go test -race ./... -count=1
  • git diff --check
  • commit-range gitleaks scan: no findings

- Capture Java record declarations as type definitions in supplemental tags queries
- Add coverage for Java record types, methods, and call references to prevent regressions

Buckley-Change-Hash: sha256:2fd07e542709e7ed5ba8ec13dd133c0a7101a42fd7911723e898533fdb6d0ff4
Buckley-Change-Stats: files=2 insertions=45 deletions=0 binaries=0
@odvcencio
odvcencio marked this pull request as ready for review August 24, 2026 03:13
@odvcencio
odvcencio merged commit b2bb164 into main Aug 24, 2026
1 check passed
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