Skip to content

feat(fleet-queue): stack record/list client verbs + owner pair validation (#8582 increment 3) - #8790

Merged
dezren39 merged 2 commits into
mainfrom
queue/14910-8582-stack-client
Nov 12, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/14910-8582-stack-client

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Refs #8582 — increment 3 of task 14910 (fleet unification slice 4: merge-intent queue and local PR stack replay). Deliberately "Refs", not a closing keyword: increments 4–5 remain on #8582 after this lands.

What this does

Client verbs (fleet queue stack record/list) — the client surface for the broker's /stack-record and /stack-list routes landed in increment 2 (PR #8660):

  • stack record builds its body through stack_record_body, which fail-fast validates with the pure core's own validate_append — the one rule set at both the client and the broker, so an ownerless or branchless record is a usage error before it ever reaches the broker.
  • stack list answers the full stack state from the database alone (recorded order, replay-prefix walk, next position/base), positional id or --stack, refusing when the two disagree.

Owner lane/worker pair validation (broker side, verb_stack_record) — the validation deferred from the CodeRabbit round on PR #8660, where the pair originates at the client verbs: a recorded intent's replay conflict is routed to its owner pair, so the pair must be one the lane registry actually holds. Unknown lane, lane owned by a different worker, and disabled lane are all refused with named errors. This mirrors the claim preamble's registry check, minus the queue binding (stack recording is not a claim).

Provenance

Increment-3 implementation was begun by lane any-a in this worktree (uncommitted in client.rs + turso_queue.rs); lane code-b resumed that exact worktree under task 14910 (§10 resume-don't-restart), verified the diff, rebased it onto current main, and is shipping it — no parallel PR.

Tests (laptop, fleet-build-lock, oracle: the #8582 stacking rules)

  • cargo test -p fleet-queue --locked — 46/46 pass
  • cargo test -p fleet-queue --locked --features queue-broker --lib — 265/265 pass, including the new stack_record_body_carries_the_append_shape_8582 (the client record body is exactly the broker's append shape; ownerless/branchless/blank-base records never reach the broker) and the updated stack_storage_wiring_8582 source oracle pinning the registry validation in the record verb.
  • Re-verified after the rebase onto main (head b9285b5).

Remaining on #8582 after this merges

(4) replay executor (push, PR, merge, rebase-next; outcome notes replay in the same pass) → (5) live drill with GitHub writes blocked + forced-conflict routing proof → complete task 14910 and close #8582.


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

@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 22:59
@coderabbitai

coderabbitai Bot commented Nov 11, 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 3 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: de47ac42-dcbf-4663-a74f-f9f39a1b701a
Commits

Reviewing files that changed from the base of the PR and between 83707d5 and 61ceff7.

Files selected for processing: 2

  • pkgs/fleet/crates/fleet-queue/src/client.rs
  • pkgs/fleet/crates/fleet-queue/src/turso_queue.rs
  • 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

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T00:40:43.679777Z 61ceff7 Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9285b55bf

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

repo-worker-tmp-code-b added 2 commits November 11, 2026 18:36
…tion (#8582 increment 3)

Client surface for the broker /stack-record and /stack-list routes landed in increment 2 (PR #8660): fleet queue stack record/list wired through run_broker_op dispatch, with the pure core validate_append as the client fail-fast rule set.

Broker side: verb_stack_record now validates the owner lane/worker pair against the lanes registry (unknown lane, lane owned by a different worker, or disabled lane refused) - the validation deferred from the CodeRabbit round on PR #8660, where the pair originates at the client verbs.

Tests: cargo test -p fleet-queue --locked 46/46; --features queue-broker --lib 265/265, including stack_record_body_carries_the_append_shape_8582 and the updated stack_storage_wiring_8582 source oracle. Work resumed from lane any-a's uncommitted increment-3 worktree state by lane code-b (task 14910).
parse_args_inner consumed the next token unconditionally for value options, so stack record --head-sha --dry-run persisted --dry-run as the head SHA (Codex P1 on PR #8790). A value flag followed by a -- token now errors with expected one argument, per the operator argument contract (AGENTS.md #3352). Regression test flag_token_as_value_is_a_usage_error covers the Codex shape, unknown flag tokens, and ordinary/single-dash values.
@dezren39
dezren39 force-pushed the queue/14910-8582-stack-client branch from b9285b5 to 61ceff7 Compare November 12, 2026 00:38
@dezren39

Copy link
Copy Markdown
Member Author

@codex review

Head 61ceff7c2b fixes the P1 from the previous round (flag tokens consumed as missing values in parse_args_inner) and rebases increment 3 onto current main. Please re-review.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 61ceff7c2b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dezren39
dezren39 merged commit ff50da2 into main Nov 12, 2026
1 of 9 checks passed
@dezren39
dezren39 deleted the queue/14910-8582-stack-client branch November 12, 2026 03:05
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.

Fleet unification slice 4: merge-intent queue and local PR stack replay

1 participant