search_files can substitute the wrong line when matched text contains :number:
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- devtools, testing-qa
Hướng nghiên cứu
Xem xét hàm search_files và việc phân tích regex đầu ra grep của nó. Vấn đề nằm ở bộ chuyển đổi hiểu sai các chuỗi :number: trong văn bản khớp. Bắt đầu bằng cách tìm nơi xử lý kết quả grep và xác định mẫu regex. Kiểm tra với tệp mẫu được cung cấp để xem lỗi thay thế. Xác minh bản sửa lỗi bằng cách đảm bảo số dòng và văn bản chính xác được giữ nguyên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 54
- Fork
- 20
- Merge trung bình
- 4 giờ 1 phút
- Pull request đã merge (30 ngày)
- 12
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stepfun-ai/Step-Code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#190 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#185 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#184 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#179 · 1 bình luận ·
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#153 · 2 bình luận ·
Tất cả issue của stepfun-ai/Step-Code
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100