From 85b29d642f9d14bdc0dde0b3e1bcd3f32e754c7d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 1 Dec 2026 07:12:42 -0500 Subject: [PATCH] test(8249): the payload-shape test expects the code as the shell sends it, without a trailing newline Co-Authored-By: Claude Opus 5.5 --- tests/test_write_path_trigger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_write_path_trigger.py b/tests/test_write_path_trigger.py index 0ecd9458..3d13cc8f 100644 --- a/tests/test_write_path_trigger.py +++ b/tests/test_write_path_trigger.py @@ -1020,8 +1020,9 @@ def test_hook_is_executable_and_shell_valid(): ]) def test_hook_reads_every_write_and_edit_payload_shape(tmp_path, tool, field): """Write and Edit name the payload differently, and the names have changed - across Claude Code versions: the code is sent whichever one is present.""" - code = "def debounce(fn):\n return fn\n" + across Claude Code versions: the code is sent whichever one is present. + (The shell drops a trailing newline, so the code here has none.)""" + code = "def debounce(fn):\n return fn" seen = _run_hook_against_sink(tmp_path, { "session_id": f"s-shape-{field}", "cwd": str(tmp_path), "tool_name": tool, "tool_input": {"file_path": str(tmp_path / "b.py"), field: code},