Repository navigation
feat(fleet-queue): route the coordination verbs through route_for and emit the mode line (#8581) - #12706
Merged
Conversation
…-first) The adapter tests land against a stub mode_line_for that always reports normal/cloud: the degraded selections (gh-read, gh-write, db-degraded on github-markers), the switch envelope mode line, and the /claim-flow verb normalization must fail until the adapter selects through route_for and the outputs are wired.
… emit the mode line (#8581) The client adapter (client/mode_report.rs) fills LegAvailability from what a verb actually observed and selects through work::routing::route_for — the consumer the contract was written for. Claim (single, batch, and every guard outcome), heartbeat, and checkpoint now carry the contract mode line on their printed output under the mode_line key; a failed guard read reports gh-read-degraded on the cloud route. The #6741 fallback switch envelope carries the same mode line (db-degraded on github-markers), so every work verb reports its route on the primary-store failure path too. Client-side only: no broker-served behavior changes — the broker is untouched, and the verbs keep their existing serving paths. The client holds no local replica yet, so a dead store honestly reports github-markers, the route the switch hands the work to; wiring SqliteReplica into the client is #8583's remaining work, ahead of the live drill.
Codex Review Summary: ✅ CompletedThis 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 31 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. |
This was referenced Nov 22, 2026
Open
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.
Verb adapter for the #8581 routing contract — #8581 remainder 1 and #8583 remainder 1, one slice serving both (packet #12538).
What landed
crates/fleet-queue/src/client/mode_report.rs: fillsLegAvailabilityfrom what a verb actually observed and selects throughwork::routing::route_for— the consumer the contract was written for ("adapters callroute_for"). It performs no I/O and attempts no route; the verbs keep their existing serving paths.mode_linekey ({verb, mode, route}fromModeLine::json_value()), following the client's existing additive-key precedent (guard_warning,claim_flow_partial). A claim whose Turso replacement for the queue core: dedicated muse-queue DB + fleet queue-broker Turso backend #6741 fallback-guard read of GitHub fails reportsgh-read-degradedon thecloudroute; the batch output degrades on its worst guard outcome.fallback_switch_json) carries the samemode_line—db-degradedongithub-markers, selected throughroute_forfrom the store-down legs — so every work verb (claim, heartbeat, checkpoint, complete, health) reports its mode and route on the primary-store failure path too, in the envelope worker loops already branch on./claim-flowreports asclaim.Client-side only — no broker redeploy
The diff touches only
fleet-queue's client module (src/client/,src/client.rs). No broker-served code (queue_broker.rs,turso_queue/, the verb handlers) changes, and wire behavior toward the broker is unchanged: same requests, same exit codes; the only output change is the additivemode_linekey. No queue-broker redeploy is needed for this slice.Leg honesty: this client holds no local replica yet, so a dead store reports
github-markers— the route the fallback switch actually hands the work to — rather than claiminglocal-replicano verb took. WiringSqliteReplicainto the client is #8583's remaining adapter work, ahead of its live drill.Verification
4a9ac56, laptop,nix develop .#fleetunderfleet-build-lock, filtermode_line): 3 passed, 2 failed —mode_line_reports_the_route_the_verb_actually_used(stub reportednormal/cloudwheregh-read-degraded/cloudwas required) andfallback_switch_json_carries_the_contract_mode_line(nomode_linekey in the envelope). The two contract tests and the attach test passed, pinning the oracle base.0ed1186): laptop run of the AGENTS.md commandcargo test --locked -p fleet-queue --lib --features client,queue-brokerinnix develop .#fleet→ 480 passed, 0 failed (477 baseline + 3 new), with 143turso_queuetest lines confirming the feature-gated suite actually ran rather than being silently skipped.Remainders after this slice (recorded on the issues)
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.