Skip to content

Implement #4712 budget remainder: schema, enqueue stamp, impossible-fit, dispatch emit - #10837

Merged
dezren39 merged 1 commit into
mainfrom
queue/6693-4712-budget-remainder
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/6693-4712-budget-remainder

Conversation

@dezren39

@dezren39 dezren39 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Closes the remainder delta verified by lane code-j on #4712 (code-j note 2026-11-16): core budget-aware claiming merged in PR #10731; this lands the schema, enqueue column stamp, impossible-fit surfacing, and dispatch emit.

Closes #4712.

Changes:

  • validate.rs: optional required_budget_minutes validation (packet + payload) and task_from_packet selection/mirror. No timebox default at enqueue (deployment-lag safety, documented inline).
  • turso_queue.rs: enqueue INSERTs stamp the queryable column; empty default-pick claims carry budget_skipped + max_required_budget_minutes.
  • client.rs: no-claim marker surfaces the summary + stderr note.
  • repo-task/v1.schema.json: optional property.
  • dispatch: required_budget_minutes request field through to payload + self-check.

Tests: 347 Rust lib pass (4 new); dispatch packet+validate 61 pass; full dispatch 223 pass with 2 pre-existing network failures (verified on main).

Task 6693, lane code-f.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…it surfacing, dispatch emit

Core claim/park budget admission merged in PR #10731 (task 17446).
This remainder closes the verified gaps (lane code-j note, #4712):

- validate.rs: accept + validate optional required_budget_minutes
  (positive integer, packet and payload levels); task_from_packet
  selects packet > payload and mirrors into the payload copy
  (#10648 shape). No default from timebox_minutes at enqueue:
  stamping a default would make every new task requirement-bearing
  while deployed helpers predate --remaining-budget-minutes.
- turso_queue.rs: enqueue INSERTs (main + triage follow-on) stamp
  the queryable required_budget_minutes column from the effective
  value (NULL when undeclared = legacy claim behavior).
- turso_queue.rs + client.rs: empty default-pick claims carry
  budget_skipped + max_required_budget_minutes (scope applies),
  printed on the no-claim marker with a stderr note — the
  design's impossible-fit surfacing instead of silent skipping.
- repo-task/v1 schema: optional required_budget_minutes property.
- dispatch: optional required_budget_minutes request field through
  parseTaskRequest -> buildPacket -> payload + self-check; emitted
  only when provided (payload rides wholesale to the PG RPC).

Tests: 347 Rust lib tests pass (4 new), dispatch packet+validate
61 pass; full dispatch suite 223 pass + 2 pre-existing
network-dependent github.test.ts failures (also fail on main).
@dezren39
dezren39 requested a review from a team as a code owner November 16, 2026 17:08
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T17:08:40.561388Z
We couldn’t complete this review. Comment @codex review to try again.
1106712 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 96fde55d-0a05-4cc8-98ad-283a87257d69
Commits

Reviewing files that changed from the base of the PR and between d9ffc26 and 1106712.

Files selected for processing: 9

  • pkgs/fleet/crates/fleet-queue/src/client.rs
  • pkgs/fleet/crates/fleet-queue/src/turso_queue.rs
  • pkgs/fleet/crates/fleet-queue/src/validate.rs
  • pkgs/fleet/repo-task-v1.schema.json
  • pm-stack/dispatch/src/packet.ts
  • pm-stack/dispatch/src/server.ts
  • pm-stack/dispatch/src/validate.ts
  • pm-stack/dispatch/test/packet.test.ts
  • pm-stack/dispatch/test/validate.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit fc61b09 into main Nov 17, 2026
1 check passed
@dezren39
dezren39 deleted the queue/6693-4712-budget-remainder branch November 17, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(queue): enforce remaining-budget admission in claim and park

1 participant