From 596e1590dfd602ffcf1efd77b5d9a0eac465f374 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sun, 1 Mar 2026 16:34:59 -0800 Subject: [PATCH] Read stdin before validating required image flag in codex test stub - Move stdin capture earlier in fake codex script setup - Ensure stdin-based assertions remain available even when image validation fails --- apps/server/src/git/Layers/CodexTextGeneration.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/git/Layers/CodexTextGeneration.test.ts b/apps/server/src/git/Layers/CodexTextGeneration.test.ts index 326b00e9fb2d8bf069b883e0849e39c080a07305..576e51b4fa4f1d0646a39079a2412f8227ed1c37 100644 --- a/apps/server/src/git/Layers/CodexTextGeneration.test.ts +++ b/apps/server/src/git/Layers/CodexTextGeneration.test.ts @@ -41,11 +41,11 @@ function makeFakeCodexBinary(dir: string) { " fi", " shift", "done", + 'stdin_content="$(cat)"', 'if [ "$T3_FAKE_CODEX_REQUIRE_IMAGE" = "1" ] && [ "$seen_image" != "1" ]; then', ' printf "%s\\n" "missing --image input" >&2', " exit 2", "fi", - 'stdin_content="$(cat)"', 'if [ -n "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" ]; then', ' printf "%s" "$stdin_content" | grep -F -- "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" >/dev/null || {', ' printf "%s\\n" "stdin missing expected content" >&2', -- 2.54.0