Opus
Daily spend circuit breaker compares strings as numbers; awk treats missing/non-numeric values as 0 → cap bypass
- scripts/postprocess-admanage.sh:60-71
The dailySpendCap and TODAY_SPEND values are interpolated unquoted into the awk program. If TODAY_SPEND is a non-numeric string (e.g., the API returned `{"metadata":{"totalSpend":"$0.00"}}` or `null` or a JSON error blob), jq will produce a string that awk will treat as 0 and the breaker will silently pass — even when the API is broken. Worse, if the API response contains characters like `;` or whitespace, awk will misparse the expression. There is no validation that TODAY_SPEND is numeric and no error-out when the spend endpoint fails (curl|| echo '{}' silently masks failures). For a 'circuit breaker' protecting real spend this fail-open behavior contradicts the stated safety posture ('Hard-fails if ADMANAGE_API_KEY is not set (never silently skips auth)').
Recommendation
Validate the spend response with `jq -e`, fail closed (skip launches + notify) if the value is missing or non-numeric, and validate STRICTEST_CAP is numeric before passing to awk. Quote/escape awk inputs via `awk -v cap="$STRICTEST_CAP" -v spend="$TODAY_SPEND" 'BEGIN{...}'`.