Repository navigation
Commit 6be7263
authored
fix(cloudflare): route sandbox runtime calls over invocation RPC (#4394)
* fix(cloudflare): route sandbox runtime calls over invocation RPC
Route runtime-owned sandbox operations back to the originating runner using an invocation-scoped RpcTarget, preserving callback identity, async-local DB context, content validation/hooks/translation links, write fencing and invocation settlement. Added runner and real workerd/D1 regressions. Verified root build, package typechecks, format, clean quick lint, 128 sandbox tests and two Worker RPC/D1 tests; independent review findings addressed.
EmDash-Bot-Case: 1198246700-issue-6017545075
EmDash-Bot-Candidate: cand-1-9818720259
* fix(cloudflare): route sandbox runtime calls over invocation RPC
Address review regression by wiring createPluginTestHost content creation through a database-backed handler, preserving slug/status and translation links. Add transport regression and deterministic after-hook guard coverage; document invocation lifetime and callback timing caveats. Verified root build/typecheck, clean quick lint/format, 128 sandbox tests, complete plugin-test suite, 13 settlement tests and two real Worker RPC/D1 tests. Independent follow-up review found all findings addressed or reasonably answered.
EmDash-Bot-Case: 1198246700-issue-6017545075
EmDash-Bot-Candidate: cand-2-c272bbab53
* fix(cloudflare): route sandbox runtime calls over invocation RPC
Expose host.waitForDeferredTasks() through the runtime test host using a built core internal export, replace the private source import, verify after-hook effects without polling, cover disposed-host calls, and document the supported wait in the guide/changeset. Root build/typecheck, clean quick lint/format, docs build, full plugin-test suite and 17 deferred-task/settlement tests pass. Independent review findings are addressed or explicitly documented.
EmDash-Bot-Case: 1198246700-issue-6017545075
EmDash-Bot-Candidate: cand-3-d5a9b2bd40
---------
Co-authored-by: emdash-autofix[bot] <emdash-autofix[bot]@users.noreply.github.com>1 parent a16ab2c commit 6be7263
16 files changed
Lines changed: 1166 additions & 27 deletions
File tree
- .changeset
- docs/src/content/docs/plugins/creating-plugins
- packages
- cloudflare
- src/sandbox
- tests/sandbox
- core
- src
- tests
- integration/runtime
- workerd
- plugin-test
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| 157 | + | |
| 158 | + | |
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
| |||
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| 188 | + | |
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
185 | 192 | | |
| 193 | + | |
186 | 194 | | |
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
| 198 | + | |
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
| |||
262 | 271 | | |
263 | 272 | | |
264 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
265 | 289 | | |
266 | 290 | | |
267 | 291 | | |
| |||
325 | 349 | | |
326 | 350 | | |
327 | 351 | | |
| 352 | + | |
328 | 353 | | |
329 | 354 | | |
330 | 355 | | |
| |||
472 | 497 | | |
473 | 498 | | |
474 | 499 | | |
475 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
476 | 506 | | |
477 | 507 | | |
478 | 508 | | |
| |||
499 | 529 | | |
500 | 530 | | |
501 | 531 | | |
502 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
503 | 539 | | |
504 | 540 | | |
505 | 541 | | |
| |||
520 | 556 | | |
521 | 557 | | |
522 | 558 | | |
523 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
524 | 565 | | |
525 | 566 | | |
526 | 567 | | |
527 | 568 | | |
528 | 569 | | |
| 570 | + | |
529 | 571 | | |
530 | 572 | | |
531 | 573 | | |
| |||
0 commit comments