[bug] Escaped quotes in a quoted keyword search are searched with the backslashes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #1688 @breken-ai による — マージされずにクローズ
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- search
調査の方向性
Start in packages/web/src/features/search/parser.ts, focusing on the QuotedTerm and ContentExpr cases of transformTreeToIR. Run the parser unit tests and inspect parseQuerySyntaxIntoIR for quoted keyword and content: values. Done means escaped quotes and backslashes produce the intended substring pattern in keyword mode while regex mode remains unchanged.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The syntax reference says "foo \"bar\"" matches files containing foo "bar". In keyword mode (the default) it matches nothing: the parser strips the outer quotes but keeps the backslashes, so zoekt gets the substring foo \"bar\". The same happens with \\ and with quoted content: values.
Expected: in keyword mode, \" and \\ inside a quoted term are unescaped before the substring query is built. Regex mode can keep them as-is.
To reproduce
- Index a repo with a file containing
foo "bar". - Search
"foo \"bar\""in keyword mode. No results.
Or in code: parseQuerySyntaxIntoIR on "foo \"bar\"" returns substring.pattern = foo \"bar\" instead of foo "bar". The cause is the QuotedTerm and ContentExpr cases of transformTreeToIR in packages/web/src/features/search/parser.ts.
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): main @ b4931510 (found reading the source and confirmed with a unit test, not on a deployment)
Additional information
I have a small fix with tests ready and will open a PR that links this issue. (Found by an AI coding agent working for the breken-ai account.)
- 主要言語
- TypeScript
- スター
- 3.9k
- フォーク
- 374
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 43
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sourcebot-dev/sourcebot のほかの issue
-
[bug] Search result hydration performs duplicate repository lookups within the same chunk再び着手できるかも @Abhishek-Sonje が 19 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug triage needed
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
sourcebot-dev/sourcebot#1681 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Linux ctags build instructions in CONTRIBUTING.md are missing build dependencies再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
sourcebot-dev/sourcebot#1633 ·
メンテナーはふだん 1 日以内に返信
-
MCP ask_codebase rejects explicit languageModel: getLanguageModelKey includes displayName which the MCP schema doesn't expose再び着手できるかも @Harsh23Kashyap が 101 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンask_sb bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
sourcebot-dev/sourcebot#1137 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
[FR] Support file-based and Azure Key Vault token sources alongside env and googleCloudSecret再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
sourcebot-dev/sourcebot#1704 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[bug] Local repositories with a space or non-ASCII character in the path cannot be indexed再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
sourcebot-dev/sourcebot#1689 ·
メンテナーはふだん 1 日以内に返信
sourcebot-dev/sourcebot の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
homarr-labs/dashboard-icons#2939 ·
メンテナーはふだん 1 日以内に返信
-
Agent/category reasoning variants are still checked against the stale model cache in chat.paramsオープンopencode
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
code-yeongyu/oh-my-openagent#10003 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
Actions on Toastsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
メンテナーはふだん 1 日以内に返信