Skip to content

[miniflare] Fix Durable Object RPC test lock registration race - #17303

Merged
cjol merged 1 commit into
mainfrom
codex/durable-object-rpc-registration
Dec 1, 2026
Merged

cjol merged 1 commit into
mainfrom
codex/durable-object-rpc-registration

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

The Durable Object RPC calls complete when unblocked test could send its release RPC before the blocked operation registered its lock. If release arrived first, it did nothing and the test later timed out. This is a plausible cause of the macOS failure on #17250.

Have the test Durable Object report whether it released the lock, and retry the release within a five-second registration window. Independently assert that the blocked RPC returns the expected result. This only changes the test, not Miniflare runtime behavior or Undici.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this is a test-only change.

Local validation on Node.js 22.23.4: all 15 tests in test/plugins/do/index.spec.ts passed; changed-file formatting and lint passed.

Note

This is a contribution from Codex.


Devin Review

@changeset-bot

changeset-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b2a053c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Nov 30, 2026
@workers-devprod
workers-devprod requested review from a team and cjol and removed request for a team November 30, 2026 21:52
@workers-devprod

workers-devprod commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@ask-bonk

ask-bonk Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

devin-ai-integration[bot]

This comment was marked as resolved.

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Superseded by the review of b2a053c6.

This review, of a6e92b99

✅ Approved — This only changes a test, and it correctly fixes the lock-registration race. No issues found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

Test-only change with no security impact.


📋 Code Quality: ✅ LGTM

No issues found. The retry loop with vi.waitFor and the separate check on the blocked RPC's result together remove the ordering race.


📝 Documentation: ✅ LGTM

No documentation changes needed for a test-only fix.


Reviewed commit: a6e92b99

@pkg-pr-new

pkg-pr-new Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@17303

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@17303

@cloudflare/cli-shared-helpers

npm i https://pkg.pr.new/@cloudflare/cli-shared-helpers@17303

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@17303

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@17303

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@17303

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@17303

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@17303

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@17303

miniflare

npm i https://pkg.pr.new/miniflare@17303

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@17303

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@17303

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@17303

@cloudflare/test-server

npm i https://pkg.pr.new/@cloudflare/test-server@17303

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@17303

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@17303

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@17303

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@17303

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@17303

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@17303

wrangler

npm i https://pkg.pr.new/wrangler@17303

commit: b2a053c

@petebacondarwin petebacondarwin added the ci:no-changeset-required Skip pull request checks for a valid changeset label Nov 30, 2026
@petebacondarwin
petebacondarwin force-pushed the codex/durable-object-rpc-registration branch from a6e92b9 to b2a053c Compare December 1, 2026 11:35

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Approved — This only changes a test, and it correctly fixes the lock-registration race. No issues found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

Test-only change with no security impact.


📋 Code Quality: ✅ LGTM

No issues found. The retry loop with vi.waitFor and the separate check on the blocked RPC's result together remove the ordering race.


📝 Documentation: ✅ LGTM

No documentation changes needed for a test-only fix.


Reviewed commit: b2a053c6 — same changes as a6e92b99, so this is that commit's review (no new review was run; line numbers are as of a6e92b99)

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Dec 1, 2026
@cjol
cjol merged commit 08447f0 into main Dec 1, 2026
88 checks passed
@cjol
cjol deleted the codex/durable-object-rpc-registration branch December 1, 2026 17:20
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:no-changeset-required Skip pull request checks for a valid changeset

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants