v0.19.0
[0.19.0] - 2026-05-23
GLR materialization, query parity, and parser hot-path release.
Added
- Reduce-chain hint metadata is now attached to embedded grammars and used by
the parser to classify hot reduction chains without re-deriving them at run
time. Rust carries a targeted reduce-chain hint in this release. - Parser and harness attribution now expose reduce-chain timing, action
dispatch/apply/lookup timing, GLR merge and cull timing, result-tree
materialization timing, lazy-child materialization cost, and GLR equivalence
hot-spot counters. - Real-corpus benchmark and parse-gap reporting tools now surface top parse
gaps, parser phase timing, result attribution, symbol names, active
reduce-chain hints, and compiled-test-binary RSS lanes for CI.
Changed
- Final tree construction now keeps compact/lazy final child references deeper
into parser result assembly, tree traversal, cursor movement, query matching,
descendant lookup, sibling scans, and edit paths. Public nodes are
materialized on demand instead of eagerly for every reduction result. - Parser hot paths cache action classes, lex-mode rows, visible symbol lookups,
JS/TS normalization traits, reduce-chain signatures, and language metadata
needed for full parses. - Full-parse scratch allocation is capped and tuned for medium sources so large
files do not preallocate excessive entry storage. - JavaScript, TypeScript, TSX, Python, Rust, Go, C, and Java compatibility
normalization now routes more work through dense/lazy child accessors and
source-gated fast paths. - The default reduce-chain hint path is enabled while the explicit reduce-chain
experiment knob was removed.
Fixed
- Query matching now preserves tree-sitter-compatible behavior for nested
repeated children, namedness-sensitive candidates, field matching through
parent links, and lazy final child refs. This fixes downstream public queries
such as nested Kotlinsource_file -> import_list -> import_headerpatterns
without requiring query rewrites. #lua-match?predicate parity and query predicate stack storage now match
expected tree-sitter semantics more closely.- GLR materialization preserves pending direct fields, hidden-child field
metadata, compact leaf parents, lazy final child refs through edits, and
sidecar child counts across tree operations. - Incremental reuse handles lazy child refs, no-op edits, top-level reuse, and
external-scanner checkpoint rebuilds without forcing broad materialization. - Parser compatibility repairs restore or preserve tree shapes for Go,
JavaScript/TypeScript optional chains, Python collapsed keyword leaves, Rust
recovery/doc comments/repetition conflicts, C parity recovery, Java unary
wrappers and annotation parses, and TypeScript repetition conflicts. - Large GLR merge caps, terminal-node stack equivalence, zero-width sidecar
traversal, and C merge survivor caps now fail boundedly instead of corrupting
branch selection or retaining excessive alternatives.
Removed
- Removed legacy generated grammar register stubs that were hidden behind the
obsoletelegacy_generated_register_stubsbuild tag; the generated registry
is now the single checked-in grammar registration surface. - Folded the one-off Go blob regeneration command into
cmd/grammargenvia
-lr-split, reducing the public command set while keeping the regeneration
path available. - Removed the legacy host-side race wrapper in favor of CI or Docker-scoped
race validation. - Removed the obsolete scoped Canopy Docker runner; Canopy now runs directly on
host for structural analysis. - Removed the undocumented
grammarlspside package and its LSP/SegmentIO
dependencies from the root module. - Collapsed stale internal aliases/helpers around token-source reparsing,
snippet parsing, COBOL dispatch, and perf counter structs.
Performance
- Standard Go/editor benchmark median on the release cut:
full DFA parse~1.54 ms, incremental single-byte edit~649 ns, no-edit
incremental reparse~2.43 ns. Full parse now reports728 B/opand
7 allocs/opon this workload. - Lazy final-child refs and deferred parent-link materialization reduce full
parse result-tree construction work while preserving query, cursor, edit, and
traversal behavior. - GLR stack equivalence checks short-circuit earlier, cache more relevant
frontier state, and expose true-share metrics for remaining ambiguity hot
spots.
Testing
- Focused release benchmark command:
GOMAXPROCS=1 go test . -run '^$' -bench 'BenchmarkGoParseFullDFA|BenchmarkGoParseIncrementalSingleByteEditDFA|BenchmarkGoParseIncrementalNoEditDFA' -benchmem -count=10 -benchtime=750ms. - Query parity was checked against the original nested Kotlin queries used by
downstream Aspect/Gazelle Orion plugins. - CI and harness work now prefer compiled test binaries for RSS benchmarks and
keep heavy parity/perf runs language-scoped.