Repository navigation
fix(mothership): retry a job dispatch whose usage read failed instead of skipping the run - #9366
Conversation
… of skipping the run - a usage outage (`usage_unavailable`) is a failed dispatch attempt, retried and bounded like any other, not a spent limit - a run skipped for billing records billing's own reason - the job lane suite closes open connections before stopping its fake worker
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
[Medium impact] The PR appears safe to merge; no blocking issues remain. SummaryKeeps scheduled runs queued when usage cannot be read, then retries them through the existing five-attempt limit. Billing refusals retain billing’s message.
|
…nd ended at its last attempt
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
Summary
Fixes the review findings on the v0.9.33 release PR (#9339) that hold up in the scheduled-jobs lane.
checkAttributedUsageLimitsalso refuses withreason: 'usage_unavailable'when the payer's usage can't be read. Dispatch closed such an occurrence permanently asskipped_budget("The usage limit was reached."). It now counts it as a failed dispatch attempt through the existing bounded retry (retryDispatch: the reconciler retries, and the last allowed attempt ends the run as failed), the way workflow admission treats the same reason as retryable.afterAll.Type of Change
Testing
bun run test:integration lane.integration(real Postgres and Redis): 20 pass. The new test (an outage leaves the occurrence queued with one counted failure; a blocked account records billing's message) fails on the previous dispatch code.tsc --noEmitis clean; job unit tests pass.Checklist