Skip to content

fix: a failing blockConcurrencyWhile breaks the event like workerd (#267) - #271

Merged
ryuzdev merged 5 commits into
mainfrom
fix/nested-block-throw
Nov 24, 2026
Merged

ryuzdev merged 5 commits into
mainfrom
fix/nested-block-throw

Conversation

@ryuzdev

@ryuzdev ryuzdev commented Nov 24, 2026

Copy link
Copy Markdown
Member

A throw or reject in a top-level or nested block, the 64-level limit and the 30 s limit break the event the way workerd breaks it: the executing cell is terminated, so a catch around the block never runs, the stub caller receives the value the block threw, and the object resets. A stub that observed an aborted object stays broken while a fresh stub works. The deferred nested start gives its reserved depth back when cancelled.

Gate cases do/block-fail-top, do/block-fail-nested and do/block-fail-limit fail before and agree after; the block-limit conformance test asserts the 500 and the reset. Full gate (245 cases), cargo test, clippy, fmt and check-docs all green.

Closes #267

@coderabbitai

coderabbitai Bot commented Nov 24, 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 37 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: 86fdf6f5-e35b-402b-b015-aa03cceb9016
Commits

Reviewing files that changed from the base of the PR and between 4385913 and c9d3d4a.

Files selected for processing: 11

  • crates/cello/engine_api.rs
  • crates/cello/js.rs
  • crates/cello/js/harness.js
  • crates/cello/main.rs
  • crates/cello/tests/do_block_limit_conformance.rs
  • crates/cello/tests/fixtures/do-block-limit/worker.js
  • docs/changelog.md
  • docs/services/durable-objects.md
  • scripts/workerd-diff/cases.mjs
  • scripts/workerd-diff/corpus/do/index.js
  • scripts/workerd-diff/corpus/do/wrangler.json
  • 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

ryuzdev added a commit that referenced this pull request Nov 24, 2026
…; replay broken stubs without remote (#271)

- P1: op_actor_fail rolls back the cell's open savepoint host-side before terminating.
- P2: local + peer RPC encode handler failures as marked bytes; harness rebuilds class/shape, sets brokenFailure on abort.
- P3: broken stubs replay via __cellHandlerReplay (no remote marker).
- Tests: limit-over-open-tx conformance; gate Rpc class + block-fail-rpc + broken string repeats (wrangler/cases entries still to add).
- NOT YET VERIFIED: gate agree/fail-before, full gate, suite, clippy, fmt, docs, rebase, push.
ryuzdev added a commit that referenced this pull request Nov 24, 2026
- wrangler RPCDO binding plus the v3 Rpc migration.
- Probe /block-fail-open-tx + /block-tx-state and the default-export orchestration route.
- cases.mjs entries for do/block-fail-rpc and do/block-fail-open-tx; TypeError repeat pair in do/block-fail-nested.
- New cases agree on the PR binary; rpc/open-tx diverge on feed759, open-tx diverges on origin/main.
@ryuzdev
ryuzdev force-pushed the fix/nested-block-throw branch from feed759 to 8af79a0 Compare November 24, 2026 18:25
ryuzdev added a commit that referenced this pull request Nov 24, 2026
- blockConcurrencyWhile bullet now true for fetch and RPC: class-preserving rejections, remote marker rules, broken-stub replay, open-tx rollback.
- Limits row: a block failure over an open transaction resets and rolls back.
- Changelog #267 entry gains the P1-P3 paragraphs and the two new gate cases.
ryuzdev added a commit that referenced this pull request Nov 24, 2026
- Whitespace-only: rustfmt layout for the RPC failure match and the open-tx assertion.
- A throw or reject in a top-level or nested block, the 64-level limit and the 30 s limit terminate the executing cell: a catch around the block never runs, the stub caller receives the value the block threw, and the object resets.
- A stub that observed an aborted object stays broken while a fresh stub works; the event answer waits for the sections it opened.
- The deferred nested start gives its reserved depth back when cancelled; pinned by a CELLO_TEST_FAIL_BLOCK_TURN seam.
- Gate cases do/block-fail-top, do/block-fail-nested and do/block-fail-limit fail before and agree after; the block-limit test asserts the 500 and the reset.
…; replay broken stubs without remote (#271)

- P1: op_actor_fail rolls back the cell's open savepoint host-side before terminating.
- P2: local + peer RPC encode handler failures as marked bytes; harness rebuilds class/shape, sets brokenFailure on abort.
- P3: broken stubs replay via __cellHandlerReplay (no remote marker).
- Tests: limit-over-open-tx conformance; gate Rpc class + block-fail-rpc + broken string repeats (wrangler/cases entries still to add).
- NOT YET VERIFIED: gate agree/fail-before, full gate, suite, clippy, fmt, docs, rebase, push.
- wrangler RPCDO binding plus the v3 Rpc migration.
- Probe /block-fail-open-tx + /block-tx-state and the default-export orchestration route.
- cases.mjs entries for do/block-fail-rpc and do/block-fail-open-tx; TypeError repeat pair in do/block-fail-nested.
- New cases agree on the PR binary; rpc/open-tx diverge on feed759, open-tx diverges on origin/main.
- blockConcurrencyWhile bullet now true for fetch and RPC: class-preserving rejections, remote marker rules, broken-stub replay, open-tx rollback.
- Limits row: a block failure over an open transaction resets and rolls back.
- Changelog #267 entry gains the P1-P3 paragraphs and the two new gate cases.
- Whitespace-only: rustfmt layout for the RPC failure match and the open-tx assertion.
@ryuzdev
ryuzdev force-pushed the fix/nested-block-throw branch from 8af79a0 to c9d3d4a Compare November 24, 2026 18:44
@ryuzdev
ryuzdev merged commit 5cc93f7 into main Nov 24, 2026
9 checks passed
ryuzdev added a commit that referenced this pull request Nov 24, 2026
…; replay broken stubs without remote (#271)

- P1: op_actor_fail rolls back the cell's open savepoint host-side before terminating.
- P2: local + peer RPC encode handler failures as marked bytes; harness rebuilds class/shape, sets brokenFailure on abort.
- P3: broken stubs replay via __cellHandlerReplay (no remote marker).
- Tests: limit-over-open-tx conformance; gate Rpc class + block-fail-rpc + broken string repeats (wrangler/cases entries still to add).
- NOT YET VERIFIED: gate agree/fail-before, full gate, suite, clippy, fmt, docs, rebase, push.
ryuzdev added a commit that referenced this pull request Nov 24, 2026
- wrangler RPCDO binding plus the v3 Rpc migration.
- Probe /block-fail-open-tx + /block-tx-state and the default-export orchestration route.
- cases.mjs entries for do/block-fail-rpc and do/block-fail-open-tx; TypeError repeat pair in do/block-fail-nested.
- New cases agree on the PR binary; rpc/open-tx diverge on feed759, open-tx diverges on origin/main.
ryuzdev added a commit that referenced this pull request Nov 24, 2026
- blockConcurrencyWhile bullet now true for fetch and RPC: class-preserving rejections, remote marker rules, broken-stub replay, open-tx rollback.
- Limits row: a block failure over an open transaction resets and rolls back.
- Changelog #267 entry gains the P1-P3 paragraphs and the two new gate cases.
@ryuzdev
ryuzdev deleted the fix/nested-block-throw branch November 24, 2026 18:55
ryuzdev added a commit that referenced this pull request Nov 24, 2026
- Rebase onto #271 left a stray indent and blank line in the list.
ryuzdev added a commit that referenced this pull request Nov 24, 2026
- Rebase onto #271 left a stray indent and blank line in the list.
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.

workerd diff: a throw, the 64-level limit or the 30 s limit in blockConcurrencyWhile breaks the event on workerd

1 participant