A reservation-release marker whose branch delete fails for a permanent reason is retried and warned about every cycle, for ever, with nothing that escalates or ages it out
Id: TD-PPagop-26082806 · Status: resolved · Filed: 2026-08-28 · Resolved: 2026-09-25 · Ref: #1853
What. scripts/release-pending-reservations.sh (PR #841, TD-PPagop-26082427) leaves a marker in place whenever its retry DELETE fails and the follow-up git/ref/heads/<branch> read does not confirm a 404. For a transient failure that is exactly right — the marker survives until the window clears. But a permanent non-404 failure — an archived target repository answering 403 to the DELETE and 200 to the confirmation read, a branch protected against deletion, a repository the pipeline login has lost push access to — produces a marker that is retried and emits a warning log event on every cycle’s standdown pass, indefinitely, with nothing that escalates it to a human or ages it out.
Why it matters. The per-cycle warning is the only surfacing, and a warning that repeats identically every cycle for weeks trains operators to stop reading it — the same normalisation that let the original fourteen-orphan incident go unnoticed. The retry itself also spends two GitHub API calls per stuck marker per cycle across the whole fleet, for ever.
Where. scripts/release-pending-reservations.sh (release_one’s delete-failed-again path), lib/standdown.sh step 2.1g’s warning case, requirement 17g / component 23f in docs/IMPLEMENTATION-PIPELINE-SPEC.md (which currently promise exactly this behaviour — “recovery costs no more than time” — so the spec must move with any fix).
Suggested fix. Add an age or attempt count to the marker body (it already carries ts) and, past a threshold (say N days or M passes), escalate once — file a GitHub issue naming the repo and branch via the existing techdebt_file_issue/issue path, or log a distinct reservation-release-stuck event the dashboard can badge — then either stop retrying or retry at a reduced cadence. A regression test in test/release-pending-reservations.test.sh would assert the escalation fires once past the threshold and not before.
Noticed by the Reviewer on PR #841 (recorded there only as a comment, which nothing sweeps); filed by the Approver so it has a permanent record.
Noticed while the Approver was judging https://github.com/Poetic-Poems/agent-ops/pull/841.
Migrated to https://github.com/Poetic-Poems/agent-ops/issues/1011.