From 93d975fe2006a84b83fd5405546ef2e3f01d01e8 Mon Sep 17 00:00:00 2001 From: Cyril Poder Date: Fri, 6 Nov 2026 22:02:06 +0100 Subject: [PATCH] e2e: emit-subject reads the whole status line http-in writes its response in several segments, since TCP_NODELAY is on, and the test read once: it could get "HTTP/1.1 " alone and report an empty status. That turned master's CI red on a run where the PR had passed. The runtime answered 400 as it should. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018wXgxT2UoFSZfqhAE1Tb5V --- e2e/emit-subject.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/e2e/emit-subject.sh b/e2e/emit-subject.sh index d1a9313..25f9032 100755 --- a/e2e/emit-subject.sh +++ b/e2e/emit-subject.sh @@ -68,7 +68,13 @@ import socket, sys s = socket.create_connection(("127.0.0.1", int(sys.argv[1])), timeout=5) s.sendall(b"POST /ingest/x\t0\n\nPUB\tvx.evil\t6 HTTP/1.1\r\nContent-Length: 2\r\n\r\n{}") s.settimeout(4) -print(s.recv(100).split(b" ")[1].decode())' $IN) +head = b"" +while b"\r\n" not in head: # the status line can arrive in several segments + chunk = s.recv(100) + if not chunk: + break + head += chunk +print(head.split(b" ")[1].decode())' $IN) [ "$C" = "400" ] && ok "a tab and a bare line feed in the path: $C" || ko "the suffix got $C" C=$(post '{"id":3,"tenant":"acme"}') [ "$C" = "202" ] && ok "ingestion carries on ($C)" || ko "ingestion broke ($C)"