AntFleet

Disagreement · 5a1afff9-anthropic-3

jq state-write swallows errors via `&& mv`, leaving stale STATE_FILE silently on failure

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

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.

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 →