fix(review): bound the render-failure capture-retry chain with a durable per-head budget - #10151
Conversation
…ble per-head budget scheduleVisualCaptureRetry was bounding its retry chain on args.previewPollAttempt, the recapture-preview job chain's own payload field. Every other trigger that reaches it (CI-completion, deployment_status, the maintenance sweep) calls it without threading that field, so it always read back 0 and never bounded anything for them -- a sustained renderer outage produced an unbounded number of retries and kept re-stamping the visual-capture retry latch, defeating its age bound. Add a second durable, headSha-keyed budget in preview-poll-budget.ts under its own R2 namespace (mirroring the existing preview-poll budget's marker shape, key derivation, and CAS write loop) so a previewPending retry never double-charges it and vice versa. scheduleVisualCaptureRetry now consults that budget instead of the payload field and increments it on every retry it actually enqueues.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 09:58:00 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10151 +/- ##
==========================================
+ Coverage 80.13% 80.94% +0.81%
==========================================
Files 282 284 +2
Lines 58742 62246 +3504
Branches 6963 8250 +1287
==========================================
+ Hits 47070 50387 +3317
- Misses 11381 11447 +66
- Partials 291 412 +121
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fix(review): bound the render-failure capture-retry chain with a durable per-head budget
scheduleVisualCaptureRetry was bounding its retry chain on args.previewPollAttempt, the
recapture-preview job chain's own payload field. Every other trigger that reaches it
(CI-completion, deployment_status, the maintenance sweep) calls it without threading that
field, so it always read back 0 and never bounded anything for them -- a sustained
renderer outage produced an unbounded number of retries and kept re-stamping the
visual-capture retry latch, defeating its age bound.
Add a second durable, headSha-keyed budget in preview-poll-budget.ts under its own R2
namespace (mirroring the existing preview-poll budget's marker shape, key derivation, and
CAS write loop) so a previewPending retry never double-charges it and vice versa.
scheduleVisualCaptureRetry now consults that budget instead of the payload field and
increments it on every retry it actually enqueues.
Closes #10061