fix(issue-36): merge review - a prompt file the runner cannot write is a failed submit; S9 asserts the libc wording on Linux only; an empty prompt file is refused
- runner._run_cmd: the write of the prompt file was outside the cleanup and error handling that the exec had (merge review: claude H1, codex R1). A failed write now removes the partial file and returns the same 126 failed submit an unstartable wrapper does, so the loop ends with rc 1 and no traceback. Test S4c. - test S9 required the literal "File too large" in stderr; bash 3.2 on macOS prints nothing for EFBIG, so the whole suite failed on this host (agy, grok, codex R2). The contract asserted everywhere is rc != 0, no leftover file and the portable diagnostic line; the libc wording is checked on Linux only. - the wrapper accepted an empty --prompt-file and registered an empty prompt (claude H3); it is refused now. Test S1e. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
1 parent
59be1c8920
commit
708262a598
3 files changed
+63
-7
No files matched your search
@@ -190,6 +190,7 @@ cmd_submit() {
|
||||
[[ -z "$PROMPT" ]] || { echo "submit takes --prompt or --prompt-file, not both" >&2; exit 1; }
|
||||
[[ "$PROMPT_FILE" == /* ]] || PROMPT_FILE="$(pwd)/$PROMPT_FILE"
|
||||
[[ -f "$PROMPT_FILE" && -r "$PROMPT_FILE" ]] || { echo "submit: cannot read --prompt-file $PROMPT_FILE" >&2; exit 1; }
|
||||
[[ -s "$PROMPT_FILE" ]] || { echo "submit: --prompt-file $PROMPT_FILE is empty" >&2; exit 1; }
|
||||
PROMPT="$(<"$PROMPT_FILE")"
|
||||
fi
|
||||
[[ -n "$PROMPT" || -n "$PROMPT_FILE" ]] || { echo "submit requires --prompt or --prompt-file" >&2; exit 1; }
|
||||
|
||||
Reference in new issue
Block a user