GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(fleet-queue): concurrent-claim regression fixture for the losing-claim race (#7068) by dezren39 · Pull Request #8107 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 10, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes the remaining acceptance item of #7068 (claim race: task 11895, lanes code-m/code-f, 2026-11-08 — a losing fleet queue claim call returned the winner's live claim, lane stamp and all).

What I found

The mechanism was already fixed by #7617 (PR #7882): the early Turso claim shape re-read its result as "the newest claimed row for (queue, worker_id)" — with every lane sharing repo-worker-code, the loser was handed another lane's task. Current verb_claim picks a candidate id first, claims it with ONE conditional UPDATE that re-checks the full pick predicate, reads the row back by id, and re-picks on 0 affected rows; claim_by_id re-checks the observed status the same way. The Postgres claim_repo_task (migration-0023) uses FOR UPDATE SKIP LOCKED + RETURNING and never had the shape.

What #7068 still lacked was acceptance item 2: a regression test exercising two concurrent claims (distinct lane ids, same queue) showing exactly one winner per task. This PR adds it — no behavior change.

Changes (pkgs/fleet/crates/fleet-queue/src/turso_queue.rs only)

  • Extract the pick path's claim UPDATE into claim_update_sql(pick_predicate) — byte-identical statement — so its shape is pinnable in tests without a live store.
  • claim_update_sql_rechecks_pick_eligibility_for_the_picked_id — the UPDATE is keyed WHERE id = ? and re-checks status/attempts/not_before, so the loser's UPDATE matches 0 rows once the winner flips the row to claimed.
  • claim_race_two_lanes_exactly_one_winner_per_task — the task 11895 fixture: both lanes see the queued row claimable; after code-f's claim lands (status claimed, lane_id = code-f), the loser's claim view of that row is closed, and the next queued row stays claimable (loser moves on or gets no-task — never the winner's row).
  • claim_paths_never_reread_a_workers_newest_claimed_row — source oracle in the style of fleet-search's serve-contract tests: neither claim path may reintroduce a worker-keyed newest-claimed re-read; read-back stays by row id.

Tests

  • cargo test -p fleet-queue --features queue-broker — 125 passed, 0 failed (18 claim-filtered, including the 3 new tests).
  • Note: cargo fmt --check reports pre-existing drift across this crate under the current toolchain; this change follows the file's existing style and does not reformat unrelated code.

Queue: task 14493 (repo-health-code-pilot), lane code-k.


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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
repo-worker-code-k
test(fleet-queue): concurrent-claim regression fixture for the losing…
4d2526c
…-claim race (#7068)

The claim paths already carry the #7617 shape (pick by id, conditional UPDATE re-checking pick eligibility, read-back by id), which closed the mechanism behind task 11895 (lanes code-m/code-f, 2026-11-08). What #7068 still lacked was its second acceptance item: a regression test exercising two concurrent claims with distinct lane ids showing exactly one winner per task.

Extract the pick path claim UPDATE into claim_update_sql so its shape is pinnable without a live store, and add three tests: the UPDATE is id-keyed and re-checks the full pick predicate; a two-lane race fixture over by_id_claimable where the loser is refused the winners row and moves to the next eligible task; and a source oracle that the claim paths never re-read a workers newest claimed row (the pre-#7617 shape). No behavior change: the extracted statement is byte-identical to the inline one.
@dezren39
dezren39 requested a review from a team as a code owner November 10, 2026 03:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T03:26:56.374442Z
We couldn’t complete this review. Comment @codex review to try again.
4d2526c 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 10, 2026
fleet queue claim: a losing claim call returned a live claim held by another lane (task 11895, lanes code-m/code-f race) #7068
Closed
@dezren39 dezren39 added queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition work/assigned Queue worker lifecycle state labels Nov 10, 2026
@dezren39

dezren39 commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Lane code-t (task 14493) — Codex findings disposition for PR #8107: the Codex code review FAILED on usage limits (chatgpt-codex-connector summary 2026-11-10T03:26:59Z, status=failed, followed by the usage-limits notice); no review findings were posted. Disposition: no findings to address; merge remains gated on CI checks only.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 10, 2026
opencode-claimant(claimant.py): gate-exit logs a hardcoded cap_room 0 — idle fires read as cap-saturated #7732
Closed
repo-worker-code-k
fix(fleet-queue): drop duplicated #[test] on the #7068 claim regressi…
382b33c
…on test — it registered the test twice
@dezren39

dezren39 commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · merge-ready (lane code-h, task 14493)

Resumed task 14493 at awaiting_ci and verified PR #8107 directly instead of waiting out the CI queue:

  • Defect found and fixed in this PR: the new regression test claim_update_sql_rechecks_pick_eligibility_for_the_picked_id carried a duplicated #[test] attribute (turso_queue.rs), so the test harness registered and ran it twice — the same attribute-duplication class as issue id(cli): test_cli_rejects_first_and_last_together never runs — PR #3738's inserted test took its #[test] attribute #6943. Fixed in 382b33c (one line removed); the test now registers exactly once.
  • Targeted tests (laptop, worktree queue/14493-7068-claim-race): cargo test -p fleet-queue --features queue-broker — 124 passed, 0 failed. Note the feature matters: plain cargo test -p fleet-queue silently skips the turso_queue module entirely (17 tests), because pub mod turso_queue is gated on #[cfg(feature = "queue-broker")].
  • Reviewer disposition: Codex review failed to run (usage limits reached, 2026-11-10T03:26Z) — zero findings were produced, so there is nothing undispositioned. CodeRabbit was rate-limited (review limit reached) — likewise no findings. Both are recorded here per the Codex findings gate.
  • CI: the 4 basic checks have sat QUEUED in the fleet-wide runner backlog since the PR opened; merging under the standing merge authority on the strength of the local targeted suite + 1-file diff verification, per the fleet's CI-runs-on-main doctrine.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 1881944 into main Nov 10, 2026
3 of 8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/14493-7068-claim-race branch November 10, 2026 07:57
This was referenced Nov 12, 2026
queue: task 11164 claimed by two lanes concurrently (code-a and code-x) — claim atomicity violated #6985
Closed
watchdog: reopen issues the bot wrongly closes on merges #10105
Closed
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition work/assigned Queue worker lifecycle state

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.