Opus finding
jq state-write swallows errors via `&& mv`, leaving stale STATE_FILE silently on failure
mediumdata-losshigh
- scripts/postprocess-admanage-create.sh:120-124
- scripts/postprocess-admanage-create.sh:195-199
Because the script runs under `set -uo pipefail` (without -e) and the jq+mv chain uses &&, a jq failure leaves $tmp behind and STATE_FILE unchanged with no log. The newly-created campaign ID is not persisted, but the script still records success in the result file and summary. On the next run, the campaign exists at the provider but is unknown locally — duplicate-create risk.
Recommendation
Check jq's exit status; if nonzero, log a loud error and record the create as needing manual reconciliation. Also `rm -f "$tmp"` on failure to avoid /tmp leaks.