Repository navigation
fix(context): search follow-ups to #146 (snake_case, Windows fixtures) - #168
Merged
Merged
Conversation
#146 made search topics literal, but it also dropped "_" from the characters kept inside a word. A query for `spring_boot` became two ANDed terms, so a document mentioning "spring" and "boot" apart could outrank the one containing the identifier, or push it below the relevance cutoff entirely. "_" now stays inside a word. `spring_boot` is quoted as one part, and FTS5 tokenizes it back into an adjacent phrase, which is how main behaved before #146. Topics made only of underscores still return nothing without erroring. The new test fails without the fix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UX3uvgjRrv9uYuZxKjNF4o
🦋 Changeset detectedLatest commit: 1e249df The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The retrieval fixtures added in #146 are read from disk and matched with /```gdscript\n[\s\S]*?\n```/. Windows runners check files out with CRLF, so the match returned undefined and "preserves examples when matching content exceeds the token budget" failed on Test (Windows). #146's CI ran before the Windows job existed, so this only showed up once it merged. Reproduced on Linux by converting gdscript-signals.md to CRLF. A clone with core.autocrlf=true now keeps the fixtures LF while other files still convert. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UX3uvgjRrv9uYuZxKjNF4o
moshest
marked this pull request as ready for review
September 27, 2026 08:02
Merged
moshest
pushed a commit
that referenced
this pull request
Sep 27, 2026
Releases @neuledge/context 1.2.7 -> 1.2.8 (patch). Consumes two patch changesets on @neuledge/context: - tidy-ravens-search.md (#146): search topics are literal keywords, so malformed quotes and FTS operator words no longer cause SQLite errors. - keep-snake-case.md (#168): underscores stay inside search words, so snake_case identifiers match as one phrase. @neuledge/registry 0.0.20 -> 0.0.21 is the automatic dependent bump for the private workspace package. Verified before merging: npm dist-tags.latest is 1.2.7 and 1.2.8 is not published yet.
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.
Before: since #146, searching for a snake_case identifier such as
spring_bootmatched "spring" and "boot" as separate words. A page that mentions both words apart could outrank the page that contains the identifier, and in one probe the right page fell below the relevance cutoff entirely. Separately, Test (Windows) on main went red because one of #146's retrieval tests fails when fixtures are checked out with CRLF line endings.After: underscores stay inside a word, so
spring_bootmatches the identifier again, as it did before #146. The crash fixes from #146 are unchanged, and a topic made only of underscores still returns nothing without an error. The retrieval fixtures check out with LF on every platform, so the Windows test job passes again.How:
buildQuerykeeps_in the set of characters that stay inside a word. The part is still quoted, so FTS5 turns it back into an adjacent phrase and it can't become an operator. The README and the function comment now describe the underscore exception. One new test fails without the fix..gitattributessetseol=lfforpackages/context/src/fixtures/**. The failing test matches/```gdscript\n[\s\S]*?\n```/against fixture content read from disk. I reproduced the failure on Linux by converting the fixture to CRLF. Acore.autocrlf=trueclone now keeps the fixtures LF while other files still convert. fix(context): handle literal search topics safely (#145) #146's CI ran before the Windows job existed, which is why this didn't show up earlier.Includes a patch changeset for
@neuledge/context, so the search fix ships in the same release as #146.Validated locally: lint, build and test pass (context 259, registry 103).
🤖 Generated with Claude Code
https://claude.ai/code/session_01UX3uvgjRrv9uYuZxKjNF4o