Repository navigation
fleet-queue: budget-aware claiming (#3418) - #10731
Conversation
…/packets, remaining-budget match on claim (#3418)
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Budget-aware claiming for #3418 (Drew's 2026-11-01 design), Turso
broker + client:
park-stamped
required_budget_minutescolumn (new, additivemigration) or the packet's own declared
payload.required_budget_minutes. No requirement = behavesexactly as before.
parkacceptsrequired_budget_minutes(
--required-budget-minutes). A capacity wait (ready-conditionkind
capacity) without an explicit value defaults therequirement from the packet's
timebox_minutes— the sketch'snatural default source. The parked event records the value.
claimacceptsremaining_budget_minutes(
--remaining-budget-minutes). The default pick predicatebudget-gates both the queued and parked branches: a
requirement-bearing row matches only a claim declaring at least
that many minutes (an undeclared budget proves no fit and skips
requirement-bearing rows). A requirement-bearing capacity
park may be taken before its timer by a fitting claim — the
5256 shape: the work flows to the first full-budget shift with
no clock wait. Requirement-free capacity parks (quota-reset
waits) keep their timer; external-wait parks are untouched
unless a parker explicitly sets a requirement, in which case
the two conditions compose (timer AND budget).
now passes
--remaining-budget-minuteson every claim andparks capacity waits as kind
capacity. Lane cron bodiesgenerated from the runbook pick this up on their next refresh;
the flag is additive, so un-refreshed lanes keep working
(they simply can't take requirement-bearing rows).
Out of scope by design: by-id/transfer claims (the deliberate
named-task paths) are not budget-gated, and the legacy Postgres
dispatch is untouched (the live broker is the Turso backend).
Tests
cargo test -p fleet-queue --features queue-broker— 327passed, 0 failed, including two new design(queue): budget-aware claiming — parks carry a minimum required time budget, claim matches the claimer's remaining shift budget #3418 tests
(
budget_gate_3418_predicate_shape,park_required_budget_3418_defaults) and updated fix(queue): single-session by default — launch-on-handoff, lane works, inline triage (reverses #8097 Rule 3) #8187/feat(queue): batch claim (--count N) + per-item dedicated sub-task dispatch #8217predicate-shape oracles (placeholder counts 2 → 4 in the pick
predicate, 11 → 13 in the claim UPDATE).
SQLite with the acceptance matrix: requirement 120 → skipped
at 60 and undeclared, claimable at 120 (queued packet and
capacity park alike); a due external-wait park and a plain
queued row claimable at every budget; a future external-wait
park never budget-bypassed.
Queue task 17446 (lane code-b). Closes #3418 on merge.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.