Problem
monitor-prs.sh fails with exit 1 if .autoship/.pr-monitor-seen.json doesn't exist (line 39 redirect fails with set -euo pipefail).
The script has: [[ -f "$SEEN_FILE" ]] || echo '{}' > "$SEEN_FILE" but this fails if .autoship/ dir permissions are wrong OR if the test runs before mkdir creates it.
Fix
init.sh should create an empty .pr-monitor-seen.json: echo '{}' > .autoship/.pr-monitor-seen.json
Acceptance Criteria
- init.sh creates .pr-monitor-seen.json (and any other state files monitors need) on first run
- monitor-prs.sh does not fail on a fresh AutoShip workspace
Problem
monitor-prs.sh fails with exit 1 if .autoship/.pr-monitor-seen.json doesn't exist (line 39 redirect fails with set -euo pipefail).
The script has:
[[ -f "$SEEN_FILE" ]] || echo '{}' > "$SEEN_FILE"but this fails if .autoship/ dir permissions are wrong OR if the test runs before mkdir creates it.Fix
init.sh should create an empty .pr-monitor-seen.json:
echo '{}' > .autoship/.pr-monitor-seen.jsonAcceptance Criteria