Fix search tool crash on CRLF search results#309
Conversation
Implementation PlanAnalysisThe TUI crash is caused by raw carriage returns surviving through the search result rendering path. Source files can be indexed with CRLF line endings, The invariant in Deliverables
Files to modify
Acceptance Criteria
Testing ApproachTargeted tests after implementation: cd packages/coding-agent && npx vitest --run test/search/search-tool.test.ts test/tool-execution-component.test.ts
cd packages/semantic-search && npx vitest --run test/mcp-server.test.ts
cd packages/tui && node --test --import tsx test/markdown-softwrap.test.ts test/wrap-soft.test.tsBroader validation: cd packages/coding-agent && npm test
cd packages/semantic-search && npm test
cd packages/tui && npm testRequired repository build after code changes before any real binary testing: npm run buildRisks and Open Questions
Plan created by mach6 |
Progress UpdateImplemented the CRLF search-result crash fix:
Verification completed:
Commit: Progress tracked by mach6 |
Vitest coverage
|
Code ReviewCriticalNone. ImportantNone. SuggestionsFinding 1 — Missing hard-wrap regression test for Finding 2 — Simplify normalized search output expression Finding 3 — Extract repeated stable Sonnet retry-test fixture Strengths
Agents run: code-reviewer, error-auditor, test-reviewer, completeness-checker, simplifier Reviewed by mach6 |
Review AssessmentReview comment: #309 (comment) Classifications
Action Plan
Assessment by mach6 |
Progress UpdateFixed review finding 1 by adding hard-wrap
Verification completed before commit:
Commit: Progress tracked by mach6 |
Closes #308
Fix the search tool crash when CRLF-containing search output reaches the interactive TUI.
Implementation plan posted as a comment below.