Skip to content

fleet-queue: re-base the canonical lane seed on the post-rename universe (#8097) - #8548

Merged
dezren39 merged 1 commit into
mainfrom
fix/broker-lane-seed-8097
Nov 11, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/broker-lane-seed-8097

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

The defect

canonical_lanes() in pkgs/fleet/crates/fleet-queue/src/turso_queue.rs still hardcoded the pre-rename lane universe (code-a..z, opencode-a/b, openchamber-a/b, nix-a/b), and ensure_schema() re-seeds missing rows from it via INSERT OR IGNORE at every broker start — with enabled hardcoded to 1. Hand-deleting a lane row therefore only lasted until the next seed run: openchamber-a/b, deleted 2026-11-10, silently came back enabled=1 (root-caused during the 2026-11-11 lane rename; full record on #8097, comment 6787833559). Left unfixed, the next broker restart would resurrect all 16 stale ids the seed still names (code-k..z, nix-a, nix-b, opencode-a, opencode-b, openchamber-a, openchamber-b), undoing the rename's deletions.

The fix

  • canonical_lanes() now returns exactly the post-rename universe: the 35 final lanes (code-a..j, not-code-a..f, any-a..s), each with the worker its live registry row carries (mapped through the rename: not-code-a keeps repo-worker-nix from nix-a, not-code-b/not-code-e keep repo-worker-opencode, not-code-d keeps repo-worker-openchamber, everything else repo-worker-code) and tonight's end-state enabled flag. No other lane id appears in the seed set.
  • The seed tuple gains the per-lane enabled flag (it was hardcoded 1): the 16 working lanes seed enabled, the 19 trimmed lanes seed disabled, so a restored registration comes back with exactly its canonical fields. Queue binding stays the one-queue '*' for every lane.
  • INSERT OR IGNORE semantics unchanged: existing rows are never overwritten.

Tests

  • Replaced the queue: claim_repo_task rejects lane openchamber-a (unknown lane_id) — OpenChamber hook worker cannot claim #6853 oracle with canonical_lanes_are_exactly_the_post_rename_universe_8097: pins the exact 35-id set, asserts the absence of every legacy id (openchamber-a/b, nix-a/b, opencode-a/b, code-k..z, tmp-*), pins the enabled set to exactly the 16 working lanes, and spot-checks worker ownership across both surfaces.
  • Extended lane_seed_sql_is_insert_or_ignore_over_the_canonical_set: every seeded SQL tuple must carry the lane's exact (worker, '*', enabled) fields, and the statement must not name any legacy id.

Local evidence (laptop, the fleet build host): cargo test -p fleet-queue --features queue-broker --lib — 228 passed, 0 failed, including both seed tests above. (The queue-broker feature gates the turso_queue module; a default-features run does not compile it.)

Deploy note

Code-only change; the live registry is untouched (35 rows / 16 enabled, verified by direct read before this PR). Once this is in the deployed broker binary, the broker is safe to restart: a restart can no longer resurrect any deleted lane. Refs #8097.


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 05:31
@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 48 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: 7a4c9d3e-caec-45eb-bfe4-e8ecd4e1cda8
Commits

Reviewing files that changed from the base of the PR and between 6f56c68 and 3add80f.

Files selected for processing: 1

  • 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-11T05:33:32.334829Z 3add80f 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.

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.

1 participant