fix(heartbeat): escalate a repeated gateway allocation_missing fault instead of retrying forever (BLO-21803) - #1040
Conversation
…instead of retrying forever (BLO-21803) BLO-19879 treats the penstock gateway's 400 allocation_missing as a transient upstream fault so a brief provider-blind-failover window gets one bounded-retry chance to self-heal. Two independent live reproductions (BLO-20725's run chain, BLO-19411 run 9aeeeb45) showed the identical org/provider/node fault recurring on the very next attempt of the same chain, days apart -- a standing BYOS allocation gap, not a routing blip, that no further retry can fix. isGatewayAllocationFault is split out of isHintlessTransientUpstreamFault so the finalize call site can detect a repeat via the just-finished run's own scheduledRetryAttempt and stop re-arming the bounded retry, routing the run to the existing untagged- failure escalation path instead. Co-Authored-By: Paperclip <noreply@paperclip.ing>
1 similar comment
|
Hey @allyblockcast[bot]! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Important Issues (1)
Strengths
Recommended Action
This PR is authored by |
kkroo
left a comment
There was a problem hiding this comment.
Reviewed the heartbeat finalization change. The split gateway allocation matcher preserves the first-attempt transient retry while preventing repeated scheduled-retry allocation_missing faults from rearming the bounded retry chain; focused tests cover the matcher and no-retry terminal code path.
Thinking Path
Linked Issues or Issue Description
Refs: BLO-21803
allocation_missing(BLO-19879's penstock gateway routing fault) was retried indefinitely instead of self-healing once. Two independent live reproductions showed the identicalorg_penstock/anthropic/blockcast-omarfault recurring on the next attempt of the same retry chain, days apart. That is a standing BYOS allocation gap, not a routing blip, so further retries only burn retry budget while leaving the issue looking alive.What Changed
isGatewayAllocationFaultout ofisHintlessTransientUpstreamFaultwithout changing the first-fault transient classification.allocation_missing_standing.stranded_assigned_issue->blocked) instead of scheduling another bounded retry.allocation_missing_standing.Verification
pnpm exec tsc --noEmitinserver/completed with no new errors introduced; existing unbuilt-dependency errors were unchanged.pnpm exec vitest run src/__tests__/heartbeat-hintless-transient-upstream.test.tspassed 26/26, including the new matcher and retry-stop coverage.BLO-21803 allocation_missing; only this PR matched.Risks
Low-to-medium behavioral risk: the first
allocation_missingresponse still gets the same bounded transient retry, but a repeated allocation failure on the scheduled retry now escalates to blocked. If a provider begins returning repeatedallocation_missingduring a longer-lived but recoverable outage, a human may need to unblock after the upstream allocation is repaired.Not in scope / investigated and closed:
contextSnapshotshape that looked like a leak is a frozen run-creation snapshot artifact, and the live reservation gauges did not show the cited long-held reservation.00fb7575is no longer stuck: it ran and failed with a legitimateprovider_throttled_no_progressfault, notallocation_missing, and has a live scheduled successor within its retry budget.paperclip_queued_run_oldest_age_seconds, is not present in the metrics registry and is left for the owner of that acceptance criterion.Model Used
Paperclip agent authored the branch. The exact model/provider was not recorded in the commit metadata. Codex GPT-5 was used for PR description cleanup and CI triage only.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template