Opus
jq --argjson resp $resp will crash the result-writer if curl/server returns non-JSON, dropping the error record
- scripts/postprocess-admanage-create.sh:87-96
- scripts/postprocess-admanage.sh:96-100
curl with `-sS` plus `||` only substitutes a JSON fallback when curl exits non-zero. If the API returns HTTP 5xx with an HTML body (or proxy text), curl exits 0 with non-JSON output. `jq -r '.success // false'` on non-JSON prints a parse error to stderr and outputs nothing → `success` is empty → the failure branch runs, but then `jq -n --argjson resp "$resp"` REQUIRES valid JSON for `--argjson` and will error out, so the result file is never written. The pending input file is then mv'd into results anyway (because `mv ... || true`), but the failure context is lost. Set -e isn't on (only `set -uo pipefail`), so the loop continues but the operator gets no error record for the failed entity.
Recommendation
Validate `resp` is parseable JSON (e.g., `echo "$resp" | jq empty 2>/dev/null || resp='{"success":false,"error":"non_json_response","raw":"..."}'`) before passing to `--argjson`. Apply same fix in postprocess-admanage.sh for launch_resp and batch_resp.