From 54a7089e1b9a828fe7e82f777b67a92b35ce718b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sun, 7 Jun 2026 16:57:39 -0400 Subject: [PATCH] Update grep replay snapshot for absolute paths Allow the builtin tools replay snapshot to match grep results that include the normalized workdir path, preserving the existing relative-path variant for older runtime output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../should_search_for_patterns_in_files.yaml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/snapshots/builtin_tools/should_search_for_patterns_in_files.yaml b/test/snapshots/builtin_tools/should_search_for_patterns_in_files.yaml index f4e32f773..a1723fa0b 100644 --- a/test/snapshots/builtin_tools/should_search_for_patterns_in_files.yaml +++ b/test/snapshots/builtin_tools/should_search_for_patterns_in_files.yaml @@ -50,3 +50,33 @@ conversations: The search found **2 lines** starting with 'ap': - Line 1: `apple` - Line 3: `apricot` + - messages: + - role: system + content: ${system} + - role: user + content: Search for lines starting with 'ap' in the file 'data.txt'. Tell me which lines matched. + - role: assistant + tool_calls: + - id: toolcall_0 + type: function + function: + name: report_intent + arguments: '{"intent":"Searching file for pattern"}' + - id: toolcall_1 + type: function + function: + name: grep + arguments: '{"pattern":"^ap","path":"${workdir}/data.txt","output_mode":"content","-n":true}' + - role: tool + tool_call_id: toolcall_0 + content: Intent logged + - role: tool + tool_call_id: toolcall_1 + content: |- + ${workdir}/data.txt:1:apple + ${workdir}/data.txt:3:apricot + - role: assistant + content: |- + The search found **2 lines** starting with 'ap': + - Line 1: `apple` + - Line 3: `apricot`