Skip to content

fix(worker): bound finalization backlog and key metadata completions (0.6) - #686

Closed
JosiahBull wants to merge 2 commits into
hardbyte:release/0.6.6from
JosiahBull:fix/bounded-finalization-0.6
Closed

JosiahBull wants to merge 2 commits into
hardbyte:release/0.6.6from
JosiahBull:fix/bounded-finalization-0.6

Conversation

@JosiahBull

@JosiahBull JosiahBull commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Supersedes #648 with its complete fix rebased onto the current release/0.6.6 branch.

When handlers finish faster than durable completion, detached finalizers can accumulate without bound while retaining job payloads. Bound finalizer admission to max(runtime worker capacity, 2 × completion batch size × completion shards) and keep worker capacity while waiting. Preserve the release branch's attempt heartbeats, finalization retries and graceful shutdown behavior.

Also carry #648's compact metadata completion optimization: address the exact claim batch and item index, validate the job/run lease/receipt, and avoid locking or expanding unrelated immutable claim batches.

Regression coverage includes stalled finalization, shutdown with a saturated finalizer budget for both storage engines, and compact metadata completion. The ready-segment bind-limit regression now uses explicit distinct timestamps through the same private batch writer, preserving its 9,000-row insertion, segment-count and claim checks without relying on host clock resolution.

Validation:

  • Workspace formatting, offline all-target/all-feature Clippy with warnings denied, and workspace build pass.
  • Full fork CI is green for the exact PR head 9bd988b4: all 31 jobs passed. https://github.com/JosiahBull/awa/actions/runs/42470362191
  • Coverage includes the full Rust matrix on PostgreSQL 17 and 18, Python 3.14 and 3.15, TLA+ models, both upgrade rehearsals, frontend tests, AlloyDB prune tests, telemetry, CLI and mixed-language smoke checks.
  • The upstream fork workflow still requires maintainer approval; the linked fork run tests the same commit.

@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: c144bb11-0f92-44c3-9d3e-ecd9e9a0c37f

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

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

JosiahBull and others added 2 commits November 8, 2026 10:10
Carry the complete fix from hardbyte#648 onto the current 0.6 release branch, preserving heartbeat ownership and lock-contention retries. Add coverage for shutdown while finalizer capacity is saturated.

Co-authored-by: Brian Thorne <brian@hardbyte.nz>
…stic

Exercise the same batch writer from its private test module with explicit distinct microsecond run_at values. Preserve the 9,000-row insertion, segment-count and claim assertions without relying on host clock resolution.
@hardbyte

hardbyte commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Superseded by #695, which carries these two commits unchanged onto the current release/0.6.6, plus a shutdown fix and a lease-path stall test.

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.

2 participants