Skip to content

fix(search): recover camelCase symbols from prose words - #4710

Closed
ScriptedAlchemy wants to merge 14 commits into
masterfrom
fix/issue-4451-prose-identifier-subtokens
Closed

ScriptedAlchemy wants to merge 14 commits into
masterfrom
fix/issue-4451-prose-identifier-subtokens

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Multiword prose could miss camelCase symbols because unsplit words were absent from Subtoken queries. This PR admits content words through the canonical identifier-subtoken grammar while preserving single-token queries, exact search, authorization boundaries, and bounded candidate admission.

  • Whole/Subtoken sources charge only new document IDs against the 16,384-candidate union budget, with frequency-based source ordering and cancellation checkpoints.
  • Plain stopwords retain whole-word and phrase matching without new subtoken expansion. Compound identifier components retain the existing grammar.
  • Overlapping whole-word/subtoken matches receive only the stronger representation's excess, avoiding two full scores for the same evidence. This preserves identifier recovery without imposing a minimum count of matching words.
  • The shared index fixture uses its existing serving-generation readiness check, eliminating a check-before-subscribe publication race.

Validation of 4b73fa1742 on native Linux through Bazel and the remote fleet:

  • Query: 296 unit tests and 78 search-quality tests passed; one existing unit test ignored.
  • Search evaluator: 23 unit tests and four end-to-end journey tests passed. Both crates' formatting checks passed.
  • Direct evaluation retains train-020 (DigestMismatch) at rank 5, restores validation-018 at rank 4 and validation-019 at rank 1, and recovers validation-017 at rank 6.
  • Protected recall remains 8/8 train and 7/7 validation. The remaining conceptual misses are unchanged. Explicit positive assertions protect all three previously disputed recoveries; only the measured ranking receipts were updated, leaving workload identity, labels, and forbidden-hit checks unchanged.

Evidence: query suites, direct evaluation, evaluator suites. These private links require tailnet access.

Fresh full CI and review remain required; this focused validation is not a claim that every repository check has passed. Keep #4451 open until its complete acceptance journey is demonstrated.


Devin Review

@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 213f2e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Keep whole and subtoken channels independently selectable and charge only
new document IDs under the shared candidate cap. Prune provably oversized
postings from stored frequencies before decoding and check cancellation
within bounded posting batches. Cover rare whole-word recall, overlap,
common-source pruning, and mid-stream cancellation.
devin-ai-integration[bot]

This comment was marked as resolved.

ScriptedAlchemy and others added 6 commits November 3, 2026 03:41
Do not prune a common source when the first oversized source may
already cover all of its documents. Share one lower-bound guard
between runtime admission and tests, and cover complete overlap
and truly disjoint oversized channels. Keep test imports at module
scope.
The shared admission helper owns the cap after source admission
was consolidated; avoid a stale query-reader import.
Apply formatting from the failing hosted rustfmt_check_2024 gate.
Preserve admission behavior, budgets and all assertions.
The exact-head Linux search evaluation finds train-020's digest-mismatch
anchor at rank 5 after the candidate union fix. Three other train misses
remain, and protected recall remains 8/8 without forbidden hits.

Pin the measured ordered train fallback receipt and explicitly guard the
recovered query. Preserve the validation receipt, corpus/workload identity,
and all resource and conceptual-miss acceptance checks.
Use the validated shared fixture repair from #4731 after this branch's native Linux tests failed in the ignored-dependency publication race. The fixture now relies only on its canonical fresh serving-generation wait instead of missing a completed publication broadcast. Keep the stronger readiness assertion, its deadline and every admission regression.

The matching source change passed native Linux in #4731; this branch's separate search quality regressions and full CI remain unresolved.
Multiword prose also searched each plain word as a subtoken, and subtoken
postings split every chunk token, so a word the text already held whole
scored twice. That reordered ordinary prose results and lost validation-018
and validation-019.

Prose words now earn subtoken credit only when the row does not hold them
whole and at least two of them occur only inside identifiers. This restores
both validation queries and also recovers validation-017.

train-020 returns to the expected-miss list: a trace showed its recovery came
from stop-word fragments, so the assertion guarding it is removed. Both
query-fallback receipts are re-pinned from the measured rankings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

ScriptedAlchemy and others added 3 commits November 3, 2026 14:57
Only subtract overlapping whole-term evidence from a subtoken score when the
whole-word field is admitted by the request. A Subtoken whitelist or a
BodyText exclusion must not erase otherwise matching prose rows.

Cover both filtered routes against real sealed lexical postings. Keep the
existing unfiltered ranking and the recovered camelCase search regressions.
Rust Bazel validation is required on this new branch head.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Consolidated into #4742 (integrate/open-pull-requests) at the captured head shown in its description, as requested. Continue review and further fixes on #4742. This closure does not assert CI readiness; the replacement remains draft. Source branch retained.

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