Repository navigation
feat(queue): #8097 Rules 1+2 — no-id handoff pick, optional platform selector - #8100
Merged
Merged
Conversation
added 2 commits
November 9, 2026 20:38
…selector Rule 1: lanes never need to block/claim by task id in the default flow. The broker gains a pick mode (pick=parked_handoff, CLI claim --handoff): the BROKER picks the next parked recorded opencode handoff; the caller names no id. The opencode claimant collects parked handoffs exclusively through it. claim --task stays as the explicit special-case verb (one-off revivals). Rule 2: tasks gain an optional platform column (additive ALTER in ensure_schema; existing rows NULL = unset). Enqueue accepts it optionally (CLI --platform, or the packet field); every claim path enforces it: a set item is claimable only by a claim declaring the same family (openchamber|muse); undeclared claims keep exactly their old reach (unset items only). By-id claims honor the selector too. The selector names a family, never a lane, and is never required.
The previous commit also carried a cargo fmt pass over turso_queue.rs/client.rs; the package is not rustfmt-clean at main under this toolchain, so that pass churned unrelated lines. This restores the original formatting everywhere except the #8097 changes themselves — the net PR diff is now exactly the semantic change. No behavior difference.
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Rules 1 and 2 of #8097 (Drew, 2026-11-09 20:25 CST: "implement now"). Rule 3 is a separate lane; Rule 4 noted on the issue.
Rule 1 — no blocking/claiming by ID by default
pick="parked_handoff"(CLI:repo-queue claim --handoff). The BROKER picks the next parked recorded opencode handoff (SQL predicate mirroringis_parked_handoff: progress laneopencode, yield stagehanded_off/launch_failedincl. the last-checkpoint lift, no session binding; the park timer does not gate it). The caller names no task id.claimant.pycollects parked handoffs per queue via--handoffclaims (grouped up front inlaunch_step);claim --taskno longer appears in any default flow.prompt.mdupdated to match.claim --task <id>stays as the explicit special-case verb (one-off revivals, e.g. task 11214) — not removed, and now also honors Rule 2's selector.--laneoptional; lane-less claims work), queue-capture enqueue, and claimant discovery (/list) required no ID before and require none now. The only default-path ID dependence was the claimant's parked-handoff collection — removed. Verbs that act on an already-owned task (bind/heartbeat/checkpoint/park/fail/complete) are addressed by id by nature; they are not work acquisition.Rule 2 — platform optional, coarse selector only
tasks.platformcolumn added: in the CREATE TABLE for fresh DBs and via an additiveALTER TABLEinensure_schemafor the live DB (existing 370+ rows read NULL = unset; no backfill, nothing destructive).--platformor the packet'splatformfield (request wins). Validated: exactlyopenchamberormuse; anything else is an error, so a typo can't silently widen/narrow reach. Never required; never a lane name.--platform); a claim declaring NO family only ever takes unset items, so existing claimants keep exactly their old reach. The claimant declaresopenchamber.platform.Tests
cargo test -p fleet-queue --all-features(new: platform parse matrix,platform_allowsmatrix, by-id selector gate, CLI flag validation).--taskanywhere in argv; collection drains broker picks until{"task": null}).Deploy + live proofs (regular no-ID claim cycle; three selector test items; parked-handoff discovery + collection) are commented on #8097 after the fleet binary/claimant deploy.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.