Repository navigation
fix(queue): single-session by default — direct lane assignment, sink drain (#8187) - #8189
Merged
Merged
Conversation
…drain (#8187) verb_lane (Turso): remove the 1:1 opencode/direct balancing. A fresh assignment is direct by default (reason=default_direct); opencode requires a specific recorded reason via the new --opencode-reason (new ledger column opencode_reason, additive migration), and --exclusion-reason still forces direct (and wins over opencode-reason). The lane_assigned event records reason (default_direct|exclusion|opencode_reason) instead of balancing counts. tasks.platform is a claim-side family filter (openchamber|muse, never a lane), so it does not drive assignment. Reassignment: an existing unbound opencode ledger row flips to direct when the caller passes --exclusion-reason (update + progress.lane re-sync + lane_assigned event with reassignment=true); session-bound rows never flip; no exclusion = assignment kept. Sink drain: default_pick_predicate gains a third branch admitting parked handoff sink rows (PARKED_HANDOFF_SQL) with no not_before gate and no new placeholders, so lanes can claim the stranded sink tasks (+0 attempts as parked claims) and work them direct; the claimant parked_handoff pick and by-id claim are unchanged. Audit: enqueue stamps no lane/assignment (progress {}, no ledger row, platform defaults NULL); the opencode claimant only reads progress.lane, never assigns. verb_lane was the only assignment producer. Tests: 5 new #8187 regression tests; cargo test -p fleet-queue --all-features: 149 lib + 2 integration passed, 0 failed.
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. |
…vents (#8187 amendments) Per Drew on #8187 (6776183066, 6776188930): mark the platform, lane, pool and model looking at an item - plus task and session id - but never filter or require. - Claim demotion: platform_allows deleted; the pick SELECT and claim_update_sql no longer filter on platform, and by_id_claimable takes no platform input. A claim whose platform mismatches an item claims it; a claim with no platform works identically. The declared platform is stamped on the claimed row via platform = COALESCE(?, platform) in both claim UPDATEs and carried on the claimed event. verb_lane door unchanged: opencode only via --opencode-reason; platform is never a routing reason. - Audit marks: new audit_marks/with_marks helpers fill task_id, queue, pool (=queue), platform, lane_id, model (claim_provider/model/variant) and session_id (progress binding / explicit claim --session-id, new client flag) into event payloads. Events extended: claimed (pick + by-id), lane_assigned (fresh + reassignment flip), lane_session_bound, parked, woken, completed, failed. Events table stays append-only; no update/delete path added. - Tests: platform_is_a_mark_not_a_claim_filter_8187 (mismatch claims, no-platform claims, mark stamped, no filter survives) and claim_event_carries_lane_pool_model_session_marks_8187 (marks content, explicit-wins, null-when-absent, with_marks source oracle). Suite: 149 lib + 2 integration passed, 0 failed.
This was referenced Nov 10, 2026
fix(queue): handoff sink gets its own status (handed_off) and the fake expiry timer is deleted
#8234
Closed
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 #8187 (broker side, incl. Drews amendments 6776133945 / 6776183066 / 6776188930): no task is assigned to opencode or a specific lane by default and without a specific recorded reason; platform/lane/pool/model/task/session are MARKS — recorded, never a filter or a requirement.
Changes (Turso backend, pkgs/fleet/crates/fleet-queue)
fleet queue lane --opencode-reason <text>, recorded on the new ledger columnopencode_reason(schema + additive migration). --exclusion-reason forces direct and wins over --opencode-reason. Platform is NEVER a routing reason (no platform door).claim --platform openchamber --handoffpath included). The declared platform is stamped on the claimed row viaplatform = COALESCE(?, platform)in both claim UPDATEs and carried on the claimed event. New client flagclaim --session-idrecords the claiming sessions id as a mark.Audit (per #8187 sharpening)
Tests
7 #8187 regression tests (default direct; opencode-reason door + recording; flip matrix incl. session-bound never flips; sink branch + placeholder count; platform-not-a-lane-input; platform-not-a-claim-filter: mismatch claims / no-platform claims / mark stamped; claim event carries lane/pool/model/session marks).
cargo test -p fleet-queue --all-features: 149 lib + 2 integration passed, 0 failed (laptop-verified).Review disposition
Codex review hit its usage limit with zero findings (verified: no inline comments, no reviews on the PR). CodeRabbit likewise rate-limited. Basic checks queue for hours and required checks are disabled; merging on laptop-verified targeted tests per the standing #8185 pattern.
Refs #8187