Skip to content

The restale sweep re-fires a full critical-tier engagement every cycle when the adjudication verdict is escalate — no state change, no bound

Id: TD-PPagop-26082510 · Status: resolved · Filed: 2026-08-25 · Resolved: 2026-09-17 · Ref: https://github.com/Pullwright/agent-ops/pull/1645

_approver_restale_review (agent-cycle.sh) reports posted whenever run_approver_stage reaches any non-empty verdict, and an adjudication escalate is such a verdict that writes nothing to GitHub: approver_escalate files (or dedups onto) an escalation issue and the standing CHANGES_REQUESTED stays exactly as it was, commit_id still mismatched, a commit still authored since. So the sweep’s trigger state survives the engagement, and the next cycle — on every node — runs another full approver_model_critical engagement (a fresh clone plus the most expensive model this system runs), indefinitely until a human acts on the escalation issue. The rebase-only branch of the same sweep is bounded by approver_restale_escalate_after_hours; this branch has no bound at all. Noticed by the Reviewer of PR #786 (agent-ops#682, concern 3 in its review comment) but recorded nowhere durable until now.

Why it matters: the recurring cost is one critical-tier model call per node per cycle for as long as the escalation sits unactioned — the exact spend profile the tier’s own rarity argument (docs/IMPLEMENTATION-PIPELINE-SPEC.md, approver_model_critical) assumes cannot happen.

Where: _approver_restale_review’s [[ -n "$approver_stage_verdict" ]] && _approver_restale_review_result="posted" (agent-cycle.sh), and _approver_restale_sweep_repo’s genuine-progress branch that calls it.

Suggested fix: run_approver_stage already computes the sharper fact — its approver-verdict log event’s posted field is true only when a review write was attempted and succeeded. Expose that (e.g. an approver_stage_posted global beside approver_stage_verdict), and in the sweep treat a reached-but-unposted verdict as its own third outcome: never dismiss (the adjudicator declined to clear the review), but stop re-engaging — bound it with the same approver_restale_escalate_after_hours measured from the standing review’s submitted_at, reusing the existing per-review-id escalation dedup so the human is summoned once, not billed nightly. Decide it together with TD-PPagop-26082509’s open question of capping the sweep to one re-review per cycle.

Noticed while the Approver was judging https://github.com/Poetic-Poems/agent-ops/pull/786.

Migrated to https://github.com/Poetic-Poems/agent-ops/issues/988.