search_files can substitute the wrong line when matched text contains :number:
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- devtools, testing-qa
調査の方向性
search_files 関数と、grep 出力の正規表現解析を確認してください。問題は、一致したテキスト内の :number: シーケンスを誤って解釈するアダプターにあります。まず、grep の結果が処理される場所を見つけ、正規表現パターンを特定します。提供されたサンプルファイルでテストし、置換エラーを確認します。正しい行番号とテキストが保持されていることを確認して修正を検証します。
索引モデルが issue の本文から書いたものです。
説明
What happened?
search_files can return the wrong source text when a matched line itself contains another :<number>: sequence.
For example, if line 1 is:
src/example.ts:42: build failed
the native grep tool correctly returns:
many.log:1: src/example.ts:42: build failed
but the Step-facing search_files result can become:
many.log:1: src/example.ts:42: UNRELATED_LINE_42
The adapter reparses rendered grep output with a greedy path:line:text regex, mistakes the later :42: for the real line number, then reloads line 42 from the file. Timestamp-shaped text such as 12:34: reproduces the same problem; if the false line number is past EOF, the visible result can become (no matches) while the details still report one match.
I reproduced this on clean main @ f113768 with the built-in tool profile and project-native Vitest, without external extensions.
Steps to reproduce
- Create a 42-line file where line 1 is
src/example.ts:42: build failedand line 42 isUNRELATED_LINE_42. - Run
search_filesforbuild failedon that file. - The native grep result contains the correct line-1 text.
- The Step-facing result substitutes the contents of line 42.
Expected behavior
search_files should preserve the native match path, line number, and matched text without reinterpreting delimiter-like text inside the match.
Version
main @ f113768 / @step-harness/coding-agent 0.84.4
- 主要言語
- TypeScript
- スター
- 54
- フォーク
- 20
- 平均マージ
- 4時間 1分
- マージ済み PR(30日)
- 12
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stepfun-ai/Step-Code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#185 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#184 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#179 · コメント 1 件 ·
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#153 · コメント 2 件 ·
stepfun-ai/Step-Code の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100