Repository navigation
Upgrade full-text search to Tantivy 0.27 - #3680
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
There was a problem hiding this comment.
Code Review
This pull request upgrades the @harperfast/fulltext optional dependency from version 0.6.0 to 0.7.0 (embedding Tantivy 0.27.0) and introduces documentation, tests, and a migration path for upgrading existing indexes. It also adds @harperfast/fulltext-previous as a dev dependency to test index migration from 0.6.0 to 0.7.0 using a child-process fixture. Feedback on the changes highlights an issue in the test fixture where a native reader's close method is called with an unsupported rollback option in the finally block, which should be resolved by closing the reader immediately after opening it.
11 of 52 tasks
5 of 54 tasks
kylebernhardy
marked this pull request as ready for review
October 28, 2026 01:30
kylebernhardy
marked this pull request as draft
October 28, 2026 01:36
kylebernhardy
marked this pull request as ready for review
October 28, 2026 02:16
This was referenced Oct 28, 2026
kriszyp
approved these changes
Oct 28, 2026
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.
⊙ Problem
Tantivy 0.27 changes English stemming. Existing indexes require rebuilding; Harper records remain authoritative.
🤔 Adopt before workload qualification?
Target v5.4 with executable upgrade checks and explicit rollout gates.
💡 Solution
Pin 0.7.0 for v5.4. Qualify upgrades from the fulltext 0.5.0 engine shipped with Harper 5.3.4 through existing ownership, retirement, scan and replay. Main previously pinned 0.6.0.
⚖️ Alternatives
Reuse existing coordination and native lifecycle APIs. Another rebuild coordinator or file surgery would duplicate ownership. Direct downgrade remains unsupported; recovery restores the current engine with traffic drained.
🔧 Changes
Product and architecture tour
Rebuild before serving the new analyzer
Existing ownership across the upgrade
flowchart LR Old[Old checkpoint] --> Refuse[Identity mismatch] Refuse --> Drain[Drain readers] Drain --> Reset[Native reset] Reset --> Replay[Scan and replay] Replay --> Ready[Coverage-gated search]✅ Verification
Remaining qualification
Implement full-text generation lifecycle, rebuild, eviction, backup, and status retains multi-node, storage durability and downgrade gaps. Qualify native full-text filtering and catalog-scale operation for v5.4 retains matched Harper performance and capacity. Existing long upgrade/baseline measurements cover 100,000 documents and 10,000 mixed queries on matching Node 24.21: indexing 82,263→85,729 documents/s, mixed p99 5.576→5.170ms, fuzzy-prefix p99 3.361→3.639ms (+8.3%). Separate shared runners limit attribution. No Harper parity or reproducible regression claim.
Claude/Composer reviewed the ordering fix. Final direct sibling fixes passed locally and in CI.
PR QA: skipped @ 5006a0f — dispatch unavailable (CLI not installed).
Comment generated by kAIle (GPT-6)
Release target: v5.4 — Kyle's requested adoption release; no v5.3 backport.
Related PRs: #691 overlaps (Document native full-text search, upgrade and recovery guide), #739 overlaps (Document full-text paging and configurable search limits, v5.4 reference and release notes)
The backpressure receipt entry below is resolved in code; its linked issue records passing rejection/recovery checks.
Deferred findings
a605adc86ce788c0minor performance —package.json— Fulltext 0.7.0 swap measured; fuzzy-prefix p99 tail regression and catalog-scale qualification owed — filed Qualify native full-text filtering and catalog-scale operation for v5.4 #2512b1b0f6aa38552f15nit maintainability —integrationTests/resources/full-text-search.test.ts— Integration suite imports a unit-test fixture directly — filed Implement full-text generation lifecycle, rebuild, eviction, backup, and status #2510fba076e9a15861b3none test-coverage —resources/FULL_TEXT.md— No test asserts write rejection during the post-rebuild lag window — filed Implement full-text generation lifecycle, rebuild, eviction, backup, and status #2510Review-Coverage: authored=codex; ran=cursor-composer,claude; adjudicated=domain; declined=gemini,cursor-grok,muse; rounds=8; full=5 @ 5006a0f
Review-Attention: read ~7m (sensitive: package-lock.json; decisions: cross-thread-sequence-counters, real-previous-engine-fixture, forced-rebuild-on-upgrade) @ 5006a0f