Skip to content

fix: review fixes from the 0.6.14 forward-port (0.6) - #691

Merged
hardbyte merged 11 commits into
release/0.6.6from
brian/forward-port-review-fixes-0.6
Nov 8, 2026
Merged

hardbyte merged 11 commits into
release/0.6.6from
brian/forward-port-review-fixes-0.6

Conversation

@hardbyte

@hardbyte hardbyte commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Fixes for findings from the review of the 0.6.14 forward-port (#687) whose code also lives on 0.6. They reach main with the next forward-port.

Product fixes

  • Rescue of lease-backed attempts reaches attempts behind a batch of ambiguous ones. An attempt whose retained ready bodies are ambiguous stays running, and rescue retried its batch without it, but only within the attempts the pass first selected. Every pass selects the oldest stale attempts first, so 500 ambiguous attempts kept heartbeat, deadline and callback rescue from every attempt behind them. Hydration now reports all of a batch's ambiguous attempts before writing, and the pass sets them aside and selects again; busy retained attempts still only shrink the selection. fix(queue-storage): drain a large abandoned-claim backlog in bounded time (0.6) #647 predates the exclusion logic this changes and does not address it. The receipt path can still pin a slot's cursor on an ambiguous open claim; that is tracked separately.
  • Slot-scoped admin reads stay on their slot's closure partitions. The compact-batch leg of the per-slot open-claim read used the parent closure tables, so admin job lists and kind counts read every slot's closure partitions. Slot discovery and the done_entries and leases reads still use parent tables.
  • Completed events clear the finished attempt's heartbeat_at and deadline_at, matching a read of the completed job. Completion through Completed follow-up specs uses the same snapshot, so the specs receive it too.
  • The hydrate ambiguity error no longer prints job 0 run_lease 0 for an empty attempt list.

Soak harness fixes

  • Budget::reserve replaces a label's earmark instead of counting it twice.
  • Dropping a live ClientHost inside the persona runtime no longer panics.
  • QueueRegistry::get can no longer deadlock against register.
  • Bulk DLQ retry and purge flag only the exhausted jobs on the queue they target.
  • UiOps skips cron actions when Tom is not running; Tom serves at least the queues its cron schedules target.
  • Chaos leaves the shard-ops owner, migrator and admin sessions alone.
  • The unexplained-cancel scan reads every cancellation in its window.
  • The Python runtime uses the heartbeat, staleness and rescue timings the Rust runtimes use.
  • The notify-lock promotion test waits for its own holder's lock and checks it overlaps promotion.

Docs

  • waiter_timed_out describes the waiter's lock wait running out, not a single lane-lock hold.

Validation

Each behaviour change has a test that fails without it: the ambiguous-backlog rescue test rescues nothing without the fix (left: [], right: [501]); the slot-scoped read times out behind a lock on another slot's closure partitions; the Completed event tests, with and without a follow-up spec, see the attempt's timestamps; each harness fix has a unit, database or Python test that fails on the old code. Format, all-target/all-feature Clippy with warnings denied and the workspace build pass. On PostgreSQL 18 the persona soak unit tests (65), the lifecycle hook suite (23), the enqueue-spec suite (23) and the rescue, notify-lock, slot-scoped and admin scope subset of the queue-storage runtime tests pass; on PostgreSQL 17 the queue-storage subset and the completed-event tests pass. The local PostgreSQL 17 run of the soak's database-backed tests failed on No space left on device from the database host's full disk, not on assertions.

- Budget::reserve replaces a label's own earmark instead of counting it twice.
- Dropping a live ClientHost inside the persona runtime shuts its runtime down
  in the background instead of panicking.
- QueueRegistry::get releases the name index before reading the queue list,
  so it cannot deadlock against register.
- Bulk DLQ retry and purge flag only the exhausted jobs on the queue they
  target.
- UiOps skips the cron actions when Tom, which declares the schedules, is not
  running.
- Tom serves at least the queues its cron schedules write to.
- Chaos leaves the shard-ops owner, migrator and admin sessions alone.
- The unexplained-cancel scan reads every cancellation in its window.
- The Python runtime uses the heartbeat, staleness and rescue timings the
  Rust runtimes use.
…artitions

The compact-batch leg of the per-slot open-claim read looked up closure
evidence through the parent closure tables, so it locked every slot's
closure partitions and waited behind claim-ring prune of another slot.
It now reads the selected slot's closure partitions, as the row-local
leg already did.
…uous ones

Rescue leaves an attempt whose retained ready bodies are ambiguous
running and retries its batch without it, but only within the attempts
the pass first selected. Every pass selects the oldest stale attempts
first, so a batch's worth of ambiguous ones kept heartbeat, deadline and
callback rescue from every attempt behind them.

Hydration now reports all of a batch's ambiguous attempts before it
writes anything, and the pass sets them aside and selects again. Busy
retained attempts still only shrink the pass's selection.
…promotion

The readiness check accepted any granted notify-queue lock in the
cluster, so another notifying backend could let the test run without
contention. It now waits for the holder's backend and checks the holder
is still committing when promotion returns.
…events

The event built from the worker's copy kept the finished attempt's
heartbeat_at and deadline_at, which a read of the completed job returns
as None.
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f6a5b4b6-d264-4ef9-9b93-3a3b3fda609b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@hardbyte
hardbyte marked this pull request as ready for review November 8, 2026 12:26
@hardbyte hardbyte added the full-ci Run the full CI matrix (Python build+test, E2E) on this PR label Nov 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 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-08T12:28:51.510849Z 3dc5b47 Draft marked ready
ℹ️ 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.

… the event

Completion through Completed follow-up specs built its own snapshot,
which kept the finished attempt's heartbeat_at and deadline_at in both
the event and the job the specs receive. Both paths now share one
helper.
… error

An empty attempt list printed job 0 run_lease 0, and several attempts
named only the first.
@hardbyte
hardbyte merged commit f572444 into release/0.6.6 Nov 8, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Run the full CI matrix (Python build+test, E2E) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant