AntFleet

Disagreement · 18907f89-anthropic-2

`cron-state.json` consecutive_failures counter resets only on success branch, but JSON merge in apply_state_update never resets on success when prior state was loaded fresh after a conflict

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

Opus finding

`cron-state.json` consecutive_failures counter resets only on success branch, but JSON merge in apply_state_update never resets on success when prior state was loaded fresh after a conflict

lowbugmedium
  • .github/workflows/aeon.yml:670-686
The success branch sets NEW_CONSEC=0 but then writes it as `.[$s].consecutive_failures = $consec`. That's fine on first apply. However on the conflict-retry path the function reads STATE again from disk (line 731-740) and re-runs apply_state_update, incrementing total_runs again, which over-counts runs when the push retries. Each conflict retry adds another +1 to total_runs / total_successes / total_failures even though the skill ran exactly once. This poisons success_rate metrics that the heartbeat/skill-health logic depends on for the self-healing loop described in README.

Recommendation

Guard apply_state_update so counters are only incremented if the current run's timestamp is not already recorded, e.g. write a per-run idempotency key (GITHUB_RUN_ID + attempt) into the state and skip increments if present.

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 →