P1-01: CLI stdin double-read bug — non-JSON piped input silently drops #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: P1 (High)
File:
decider/cli.pylines 62-67Problem
When piped input is NOT valid JSON (e.g. plain text), the second
sys.stdin.read()returns empty string because stdin is a stream and already consumed by the first read attempt.This means
echo "should I deploy?" | python3 -m decidersilently fails witherror: situation required.Fix
Read stdin once, store in variable, then attempt JSON parse: