AntFleet

Disagreement · 5a1afff9-anthropic-5

API error responses that are non-JSON crash jq parsing and surface generic curl_failed

solo Opus
repo 6f7fc663·PR #33·reviewed 1 week ago

Opus finding

API error responses that are non-JSON crash jq parsing and surface generic curl_failed

lowbugmedium
  • scripts/postprocess-admanage-create.sh:100-108
If the API returns HTML or a plain string (e.g., 502 gateway HTML, plaintext rate-limit body), curl returns 0 but jq fails with parse error; success defaults via // false won't apply because jq exits non-zero before producing output. Without -e, success may be empty, then the !="true" branch is taken, but the subsequent `jq --argjson resp "$resp"` will hard-fail because $resp is not valid JSON, killing that iteration's logging. Bash continues to next file under set -uo pipefail (no -e), but no result file is written and the input is not moved.

Recommendation

Validate response is JSON (e.g., `if ! echo "$resp" | jq -e . >/dev/null; then resp='{"success":false,"error":"non_json_response"}'; fi`) before --argjson usage.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →