authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-03-01 16:34:59-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-03-01 20:06:21-08:00
log596e1590dfd602ffcf1efd77b5d9a0eac465f374
tree64ac20a07ddf3dc5288574758510f67cf2d43844
parent70c9147c7fa86ada23c55fa17b3a63f6a832f5f4

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

1 files changed, 1 insertions(+), 1 deletions(-)

apps/server/src/git/Layers/CodexTextGeneration.test.ts+1-1
...@@ -41,11 +41,11 @@ function makeFakeCodexBinary(dir: string) {...@@ -41,11 +41,11 @@ function makeFakeCodexBinary(dir: string) {
41 " fi",41 " fi",
42 " shift",42 " shift",
43 "done",43 "done",
44 'stdin_content="$(cat)"',
44 'if [ "$T3_FAKE_CODEX_REQUIRE_IMAGE" = "1" ] && [ "$seen_image" != "1" ]; then',45 'if [ "$T3_FAKE_CODEX_REQUIRE_IMAGE" = "1" ] && [ "$seen_image" != "1" ]; then',
45 ' printf "%s\\n" "missing --image input" >&2',46 ' printf "%s\\n" "missing --image input" >&2',
46 " exit 2",47 " exit 2",
47 "fi",48 "fi",
48 'stdin_content="$(cat)"',
49 'if [ -n "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" ]; then',49 'if [ -n "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" ]; then',
50 ' printf "%s" "$stdin_content" | grep -F -- "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" >/dev/null || {',50 ' printf "%s" "$stdin_content" | grep -F -- "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" >/dev/null || {',
51 ' printf "%s\\n" "stdin missing expected content" >&2',51 ' printf "%s\\n" "stdin missing expected content" >&2',