@waffle-os/runtime 0.0.145 → 0.0.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/browser/command-input.ts +83 -0
- package/browser/command-owner.ts +5 -0
- package/browser/display/guest.ts +2 -18
- package/browser/display/surface-info.ts +19 -0
- package/browser/filesystem-backend.ts +4 -2
- package/browser/fs-worker.ts +1 -1
- package/browser/operations/cells.ts +90 -0
- package/browser/operations/guest.ts +94 -0
- package/browser/operations/owner.ts +201 -0
- package/browser/operations/protocol.ts +16 -0
- package/browser/operations/types.ts +41 -0
- package/browser/operations/writer.ts +106 -0
- package/browser/preview1-worker.ts +8 -1
- package/browser/process-broker.ts +376 -22
- package/browser/process-start.ts +5 -2
- package/browser/run-command.ts +388 -0
- package/browser/shared-fs.ts +31 -18
- package/browser/worker-memory.ts +6 -0
- package/browser/worker.ts +139 -39
- package/browser/yield-task.ts +25 -0
- package/build.ts +4 -4
- package/core/fd-reopen.ts +223 -77
- package/core/filesystem.ts +9 -1
- package/core/wasi.ts +108 -48
- package/dist/browser/command-input.js +80 -0
- package/dist/browser/command-owner.js +2 -0
- package/dist/browser/display/guest.js +2 -18
- package/dist/browser/display/surface-info.js +18 -0
- package/dist/browser/filesystem-backend.js +4 -1
- package/dist/browser/fs-worker.js +1 -1
- package/dist/browser/operations/cells.js +80 -0
- package/dist/browser/operations/guest.js +67 -0
- package/dist/browser/operations/owner.js +175 -0
- package/dist/browser/operations/protocol.js +0 -0
- package/dist/browser/operations/types.js +0 -0
- package/dist/browser/operations/writer.js +98 -0
- package/dist/browser/preview1-worker.js +4 -0
- package/dist/browser/process-broker.js +320 -19
- package/dist/browser/process-start.js +3 -0
- package/dist/browser/run-command.js +377 -0
- package/dist/browser/shared-fs.js +17 -15
- package/dist/browser/worker-memory.js +10 -1
- package/dist/browser/worker.js +107 -37
- package/dist/browser/yield-task.js +21 -0
- package/dist/core/fd-reopen.js +201 -84
- package/dist/core/wasi.js +92 -36
- package/dist/fs/backend.js +29 -38
- package/dist/fs/client.js +100 -40
- package/dist/fs/cold-read-cache.js +69 -0
- package/dist/fs/directory-pages.js +49 -20
- package/dist/fs/epoch-cache.js +48 -0
- package/dist/fs/indexeddb.js +5 -0
- package/dist/fs/memory.js +30 -8
- package/dist/fs/opfs.js +5 -0
- package/dist/fs/persistent.js +36 -11
- package/dist/fs/protocol.js +56 -19
- package/dist/fs/request-memory.js +49 -21
- package/dist/fs/resolve-observation.js +11 -0
- package/dist/fs/service.js +105 -28
- package/dist/fs/shared.js +7 -5
- package/dist/interrupt/diagnostics.js +8 -0
- package/dist/interrupt/index.js +5 -1
- package/dist/interrupt/loader-internal.js +147 -25
- package/dist/interrupt/loader.js +7 -3
- package/dist/interrupt/symbols.js +382 -0
- package/dist/proc/command-transfer.js +72 -0
- package/dist/proc/control.js +3 -0
- package/dist/proc/directory.js +9 -1
- package/dist/proc/intrinsics/host.js +49 -1
- package/dist/proc/intrinsics.js +6 -0
- package/dist/proc/pipes.js +907 -190
- package/dist/proc/registry.js +25 -14
- package/dist/proc/signals.js +21 -0
- package/dist/proc/start-command.js +101 -0
- package/dist/proc/supervisor.js +34 -10
- package/dist/proc/worker-broker.js +86 -31
- package/dist/proc/worker-client.js +67 -31
- package/dist/proc/worker-pipes.js +1 -0
- package/dist/programs/collection.js +2 -0
- package/dist/runtime.js +14 -1
- package/dist/{tests → testing}/page-runner/framework-host.js +1 -1
- package/dist/thread/service.js +2 -2
- package/dist/tooling/program/program-build-tools.js +43 -5
- package/dist/tooling/program/program-build-tools.ts +62 -3
- package/dist/tooling/program/program-derivation.js +24 -4
- package/dist/tooling/program/program-derivation.ts +43 -3
- package/dist/tooling/program/program-symbols.js +155 -0
- package/dist/tooling/program/program-symbols.ts +200 -0
- package/dist/tooling/program/program-transformer.json +1 -1
- package/fs/backend.ts +35 -34
- package/fs/client.ts +141 -37
- package/fs/cold-read-cache.ts +76 -0
- package/fs/directory-pages.ts +51 -23
- package/fs/epoch-cache.ts +52 -0
- package/fs/indexeddb.ts +6 -0
- package/fs/memory.ts +41 -6
- package/fs/opfs.ts +5 -0
- package/fs/persistent.ts +46 -9
- package/fs/protocol.ts +55 -23
- package/fs/request-memory.ts +65 -27
- package/fs/resolve-observation.ts +25 -0
- package/fs/service.ts +138 -38
- package/fs/shared.ts +8 -4
- package/fs/storage.ts +4 -0
- package/index.ts +5 -0
- package/interrupt/diagnostics.ts +29 -0
- package/interrupt/index.ts +8 -1
- package/interrupt/loader-internal.ts +178 -20
- package/interrupt/loader.ts +13 -2
- package/interrupt/symbols.ts +542 -0
- package/package.json +56 -27
- package/proc/command-transfer.ts +96 -0
- package/proc/control.ts +4 -0
- package/proc/directory.ts +10 -1
- package/proc/intrinsics/host.ts +87 -1
- package/proc/intrinsics.ts +6 -0
- package/proc/pipes.ts +1128 -247
- package/proc/registry.ts +52 -17
- package/proc/signals.ts +23 -0
- package/proc/start-command.ts +157 -0
- package/proc/supervisor.ts +34 -9
- package/proc/worker-broker.ts +100 -38
- package/proc/worker-client.ts +84 -31
- package/proc/worker-pipes.ts +5 -1
- package/programs/collection.ts +4 -0
- package/runtime.ts +44 -3
- package/{tests → testing}/browser-runner-lifecycle.ts +50 -25
- package/testing/fixtures/rooted-symlinks-storage.ts +48 -0
- package/{tests → testing}/indexeddb-storage-browser.ts +49 -1
- package/{tests → testing}/page-runner/driver.ts +2 -0
- package/{tests → testing}/page-runner/framework-host.ts +1 -1
- package/{tests → testing}/page-runner/playwright-driver.ts +1 -1
- package/{tests → testing}/page-runner/suite-host.ts +26 -1
- package/testing/webkit-diagnostics.ts +125 -0
- package/thread/service.ts +2 -2
- package/tooling/program/program-build-tools.ts +62 -3
- package/tooling/program/program-derivation.ts +43 -3
- package/tooling/program/program-symbols.ts +200 -0
- package/tooling/program/program-transformer.json +1 -1
- package/tooling/program-tools-package.ts +1 -0
- package/browser/gpu/method-coverage.json +0 -1933
- package/browser/gpu/stream.json +0 -4175
- package/browser/gpu/upstream/webgpu.h +0 -6774
- package/browser/gpu/upstream/webgpu.yml +0 -5532
- package/scripts/browser-command.ts +0 -34
- package/scripts/browser-supervisor.ts +0 -158
- package/scripts/build-c-thread-fixture.ts +0 -430
- package/scripts/build-gpu-fixture.ts +0 -279
- package/scripts/build-memory-group-fixture.ts +0 -147
- package/scripts/build-thread-fixture.ts +0 -205
- package/scripts/c-threads-fixture-producer.test.ts +0 -86
- package/scripts/owned-command.ts +0 -89
- package/scripts/test-browser.ts +0 -109
- package/scripts/test-wasi-libc.ts +0 -108
- package/scripts/threads-fixture-producer.test.ts +0 -177
- package/tests/aggregate-memory-contract.test.ts +0 -620
- package/tests/asset-load-recovery-browser-runner.ts +0 -179
- package/tests/asset-load-recovery.test.ts +0 -117
- package/tests/blocking-read-lock-contention.test.ts +0 -305
- package/tests/bootstrap-arrival-browser-runner.ts +0 -19
- package/tests/bootstrap-arrival-runner.test.ts +0 -89
- package/tests/browser-command-real.test.ts +0 -124
- package/tests/browser-command.test.ts +0 -342
- package/tests/browser-controls-discovery.test.ts +0 -64
- package/tests/browser-filesystem-cancel.test.ts +0 -248
- package/tests/browser-filesystem-disposal.test.ts +0 -469
- package/tests/browser-filesystem-failure.test.ts +0 -74
- package/tests/browser-filesystem-options.test.ts +0 -190
- package/tests/browser-filesystem-service-port.test.ts +0 -239
- package/tests/browser-matrix.test.ts +0 -559
- package/tests/browser-navigation-browser-runner.ts +0 -121
- package/tests/browser-navigation.test.ts +0 -106
- package/tests/browser-net-services.test.ts +0 -472
- package/tests/browser-net.test.ts +0 -310
- package/tests/browser-process-broker.test.ts +0 -4172
- package/tests/browser-runner-lifecycle.test.ts +0 -200
- package/tests/browser-worker.test.ts +0 -2736
- package/tests/buffer-boundaries.test.ts +0 -52
- package/tests/c-threads-embedding-runner.ts +0 -84
- package/tests/c-threads-fixture-inspect.ts +0 -23
- package/tests/c-threads-fixture.test.ts +0 -142
- package/tests/c-threads-packet-runner.ts +0 -6
- package/tests/c-threads-packet.ts +0 -132
- package/tests/c-threads-paths.test.ts +0 -83
- package/tests/c-threads-positive-worker.ts +0 -5
- package/tests/c-threads-runtime-browser-runner.ts +0 -122
- package/tests/c-threads-runtime-browser.ts +0 -334
- package/tests/c-threads-runtime-guest.ts +0 -14
- package/tests/c-threads-runtime.test.ts +0 -68
- package/tests/c-threads-safari-runner.ts +0 -178
- package/tests/checkpoint-pressure.test.ts +0 -602
- package/tests/child-diagnostic-browser.ts +0 -166
- package/tests/child-diagnostic-worker.ts +0 -25
- package/tests/child-diagnostics.test.ts +0 -114
- package/tests/ci-browser-install.test.ts +0 -244
- package/tests/cold-descriptor-lifecycle.test.ts +0 -170
- package/tests/cold-descriptor-read.test.ts +0 -245
- package/tests/core-import-boundaries.test.ts +0 -92
- package/tests/core-size-contract.test.ts +0 -327
- package/tests/default-allocation-parity.test.ts +0 -184
- package/tests/descendant-preparation.test.ts +0 -726
- package/tests/descendant-real-worker.test.ts +0 -505
- package/tests/descriptors.test.ts +0 -71
- package/tests/dev-null.test.ts +0 -157
- package/tests/diagnostic-drain.test.ts +0 -62
- package/tests/dirty-admission.test.ts +0 -572
- package/tests/durable-file-identity.test.ts +0 -586
- package/tests/durable-identity-storage.test.ts +0 -112
- package/tests/error-serialization.test.ts +0 -94
- package/tests/exec-integration.test.ts +0 -94
- package/tests/fd-reopen.test.ts +0 -4
- package/tests/file-offset-contention.test.ts +0 -186
- package/tests/file-times.test.ts +0 -353
- package/tests/filesystem-allocation-context.test.ts +0 -198
- package/tests/filesystem-atomic.test.ts +0 -564
- package/tests/filesystem-capacity.test.ts +0 -34
- package/tests/filesystem-client-intrinsics.test.ts +0 -286
- package/tests/filesystem-codec.test.ts +0 -227
- package/tests/filesystem-conditional-remove.test.ts +0 -200
- package/tests/filesystem-endpoint-observer.test.ts +0 -371
- package/tests/filesystem-glob.test.ts +0 -38
- package/tests/filesystem-io-fastpath.test.ts +0 -339
- package/tests/filesystem-large-file.test.ts +0 -61
- package/tests/filesystem-lazy-backing.test.ts +0 -440
- package/tests/filesystem-nonblocking.test.ts +0 -339
- package/tests/filesystem-permissions.test.ts +0 -348
- package/tests/filesystem-persistence-shared.test.ts +0 -375
- package/tests/filesystem-port-transport.test.ts +0 -275
- package/tests/filesystem-private-input.test.ts +0 -1155
- package/tests/filesystem-publication-grant.test.ts +0 -674
- package/tests/filesystem-publication-workspace.test.ts +0 -2105
- package/tests/filesystem-publication.test.ts +0 -1774
- package/tests/filesystem-quiescence-rearm.test.ts +0 -76
- package/tests/filesystem-quiescence.test.ts +0 -522
- package/tests/filesystem-readlink-shared.test.ts +0 -311
- package/tests/filesystem-ready-disposal-browser-runner.ts +0 -243
- package/tests/filesystem-refcount.test.ts +0 -550
- package/tests/filesystem-request-memory.test.ts +0 -202
- package/tests/filesystem-request-pool.test.ts +0 -408
- package/tests/filesystem-retired-release.test.ts +0 -37
- package/tests/filesystem-review.test.ts +0 -284
- package/tests/filesystem-segment.test.ts +0 -339
- package/tests/filesystem-shared.test.ts +0 -304
- package/tests/filesystem-shutdown-browser-debt.ts +0 -267
- package/tests/filesystem-shutdown-browser-runner.ts +0 -524
- package/tests/filesystem-shutdown-browser.ts +0 -290
- package/tests/filesystem-shutdown-close-observation.test.ts +0 -437
- package/tests/filesystem-shutdown-close-observation.ts +0 -206
- package/tests/filesystem-shutdown-observer.test.ts +0 -93
- package/tests/filesystem-shutdown.test.ts +0 -893
- package/tests/filesystem-staged-write.test.ts +0 -909
- package/tests/filesystem-stop-observer.ts +0 -50
- package/tests/filesystem-storage-geometry.test.ts +0 -404
- package/tests/filesystem-transfer.test.ts +0 -135
- package/tests/filesystem-transport-browser-driver.ts +0 -28
- package/tests/filesystem-transport-browser-runner.ts +0 -134
- package/tests/filesystem-transport-browser.ts +0 -179
- package/tests/filesystem-transport-codec.test.ts +0 -96
- package/tests/filesystem-walk.test.ts +0 -524
- package/tests/filesystem-worker.test.ts +0 -676
- package/tests/first-worker-import.ts +0 -118
- package/tests/fixtures/asset-load-recovery-page.ts +0 -95
- package/tests/fixtures/bigint-hooks.ts +0 -28
- package/tests/fixtures/browser-cell-clone.ts +0 -100
- package/tests/fixtures/browser-process-child.ts +0 -25
- package/tests/fixtures/buffer-boundaries.ts +0 -65
- package/tests/fixtures/cold-descriptor-guest.ts +0 -58
- package/tests/fixtures/cold-descriptor.ts +0 -162
- package/tests/fixtures/cold-range-proof-lifecycle.ts +0 -136
- package/tests/fixtures/default-allocation-capture.ts +0 -239
- package/tests/fixtures/descendant-real-worker.ts +0 -121
- package/tests/fixtures/diagnostic-public.ts +0 -14
- package/tests/fixtures/documented-startup-control.ts +0 -33
- package/tests/fixtures/durable-identity-opfs.ts +0 -123
- package/tests/fixtures/exec-browser-worker.ts +0 -5
- package/tests/fixtures/exec-guest.ts +0 -279
- package/tests/fixtures/exec-integration.ts +0 -305
- package/tests/fixtures/exec-node-control.ts +0 -22
- package/tests/fixtures/exec-node-host.ts +0 -31
- package/tests/fixtures/exec-node-worker.ts +0 -11
- package/tests/fixtures/exec-worker.ts +0 -33
- package/tests/fixtures/fd-kind-cases.ts +0 -81
- package/tests/fixtures/fd-reopen-cases.ts +0 -489
- package/tests/fixtures/file-offset-contention.ts +0 -110
- package/tests/fixtures/file-only-abi.ts +0 -48
- package/tests/fixtures/file-times-guest.ts +0 -151
- package/tests/fixtures/file-times-worker.ts +0 -16
- package/tests/fixtures/filesystem-atomic-guest.ts +0 -94
- package/tests/fixtures/filesystem-default-service.ts +0 -3
- package/tests/fixtures/filesystem-diagnostic-transfer-failure.ts +0 -15
- package/tests/fixtures/filesystem-endpoint-observer.ts +0 -159
- package/tests/fixtures/filesystem-endpoint-service.ts +0 -53
- package/tests/fixtures/filesystem-file.ts +0 -23
- package/tests/fixtures/filesystem-guest.ts +0 -119
- package/tests/fixtures/filesystem-offset-guest.ts +0 -48
- package/tests/fixtures/filesystem-permissions-worker.ts +0 -44
- package/tests/fixtures/filesystem-port-service.ts +0 -32
- package/tests/fixtures/filesystem-port-worker.ts +0 -71
- package/tests/fixtures/filesystem-proc-guest.ts +0 -59
- package/tests/fixtures/filesystem-quiescence-guest.ts +0 -23
- package/tests/fixtures/filesystem-refcount-guest.ts +0 -75
- package/tests/fixtures/filesystem-request-release-worker.ts +0 -32
- package/tests/fixtures/filesystem-segment-guest.ts +0 -46
- package/tests/fixtures/filesystem-service.ts +0 -17
- package/tests/fixtures/filesystem-shutdown-debt-page.ts +0 -178
- package/tests/fixtures/filesystem-shutdown-debt-worker.ts +0 -116
- package/tests/fixtures/filesystem-shutdown-page.ts +0 -288
- package/tests/fixtures/filesystem-shutdown-worker.ts +0 -168
- package/tests/fixtures/filesystem-startup-failure.ts +0 -24
- package/tests/fixtures/filesystem-transport-observation-worker.ts +0 -5
- package/tests/fixtures/filesystem-walk-worker.ts +0 -45
- package/tests/fixtures/generic-memory-node-worker.ts +0 -16
- package/tests/fixtures/global-lock-holder.ts +0 -55
- package/tests/fixtures/gpu/async-expected.json +0 -506
- package/tests/fixtures/gpu/async-host.ts +0 -263
- package/tests/fixtures/gpu/async-native.ts +0 -507
- package/tests/fixtures/gpu/async-page.ts +0 -193
- package/tests/fixtures/gpu/async.c +0 -463
- package/tests/fixtures/gpu/async_encode.h +0 -170
- package/tests/fixtures/gpu/bootstrap-cleanup-worker.ts +0 -135
- package/tests/fixtures/gpu/bundle-query-expected.json +0 -400
- package/tests/fixtures/gpu/bundle-query-fixture.ts +0 -121
- package/tests/fixtures/gpu/bundle-query-native.ts +0 -674
- package/tests/fixtures/gpu/compute-expected.json +0 -187
- package/tests/fixtures/gpu/compute-native.ts +0 -418
- package/tests/fixtures/gpu/copy-draw-expected.json +0 -372
- package/tests/fixtures/gpu/copy-draw-fixture.ts +0 -82
- package/tests/fixtures/gpu/copy-draw-native.ts +0 -690
- package/tests/fixtures/gpu/core-fixture.ts +0 -202
- package/tests/fixtures/gpu/core-transport-worker.ts +0 -76
- package/tests/fixtures/gpu/desktop-arm-contract.ts +0 -180
- package/tests/fixtures/gpu/desktop-fairness-contract.ts +0 -99
- package/tests/fixtures/gpu/desktop-fairness-observation.ts +0 -79
- package/tests/fixtures/gpu/disposal-retirement.ts +0 -21
- package/tests/fixtures/gpu/enums.json +0 -46
- package/tests/fixtures/gpu/expected.json +0 -251
- package/tests/fixtures/gpu/fairness-observer.ts +0 -504
- package/tests/fixtures/gpu/fairness-test-data.ts +0 -164
- package/tests/fixtures/gpu/fairness-validation.ts +0 -325
- package/tests/fixtures/gpu/fixture-runtime.ts +0 -48
- package/tests/fixtures/gpu/gpu_encode.h +0 -236
- package/tests/fixtures/gpu/gpu_fixture.h +0 -237
- package/tests/fixtures/gpu/import-unwind.ts +0 -12
- package/tests/fixtures/gpu/integration-guest.ts +0 -244
- package/tests/fixtures/gpu/integration-page.ts +0 -805
- package/tests/fixtures/gpu/integration-service-worker.ts +0 -113
- package/tests/fixtures/gpu/label-expected.json +0 -219
- package/tests/fixtures/gpu/label-native.ts +0 -280
- package/tests/fixtures/gpu/lazy-page.ts +0 -39
- package/tests/fixtures/gpu/measurement-contract.ts +0 -148
- package/tests/fixtures/gpu/measurement-desktop.ts +0 -121
- package/tests/fixtures/gpu/measurement-page.ts +0 -347
- package/tests/fixtures/gpu/measurement-runtime.ts +0 -82
- package/tests/fixtures/gpu/measurement-worker.ts +0 -310
- package/tests/fixtures/gpu/ownership-reader-terminal-worker.ts +0 -42
- package/tests/fixtures/gpu/ownership-service-worker.ts +0 -920
- package/tests/fixtures/gpu/peer-input.ts +0 -6
- package/tests/fixtures/gpu/qualification-contract.ts +0 -42
- package/tests/fixtures/gpu/qualification-page.ts +0 -67
- package/tests/fixtures/gpu/qualification-webgpu.ts +0 -199
- package/tests/fixtures/gpu/qualification-worker.ts +0 -97
- package/tests/fixtures/gpu/ring-snapshot.ts +0 -25
- package/tests/fixtures/gpu/ring-worker.ts +0 -227
- package/tests/fixtures/gpu/runtime-display-fence-launcher.ts +0 -16
- package/tests/fixtures/gpu/runtime-display-fence.ts +0 -193
- package/tests/fixtures/gpu/runtime-disposal-signal-order.ts +0 -195
- package/tests/fixtures/gpu/runtime-disposal-signal-worker.ts +0 -79
- package/tests/fixtures/gpu/scene-expected.json +0 -360
- package/tests/fixtures/gpu/scene-fixture.ts +0 -73
- package/tests/fixtures/gpu/scene-native.ts +0 -473
- package/tests/fixtures/gpu/scene.c +0 -73
- package/tests/fixtures/gpu/scene_encode.h +0 -302
- package/tests/fixtures/gpu/service-access.ts +0 -39
- package/tests/fixtures/gpu/service-bootstrap-worker.ts +0 -10
- package/tests/fixtures/gpu/service-reader-worker.ts +0 -29
- package/tests/fixtures/gpu/thrown-observation.ts +0 -120
- package/tests/fixtures/gpu/triangle.c +0 -480
- package/tests/fixtures/gpu/waffle_gpu_stream.h +0 -2046
- package/tests/fixtures/group-futex-worker.ts +0 -102
- package/tests/fixtures/group-link-program.ts +0 -18
- package/tests/fixtures/guarded-nonblock-worker.ts +0 -37
- package/tests/fixtures/guest-watch-runtime-worker.ts +0 -115
- package/tests/fixtures/guest-watch-worker.ts +0 -41
- package/tests/fixtures/guest-watch-writer-worker.ts +0 -46
- package/tests/fixtures/host-failure-worker.ts +0 -17
- package/tests/fixtures/indexeddb-background-confirmation.ts +0 -33
- package/tests/fixtures/indexeddb-caller-delivery.ts +0 -100
- package/tests/fixtures/installer-symlinks-support.ts +0 -25
- package/tests/fixtures/interrupt-browser-loops.ts +0 -78
- package/tests/fixtures/interrupt-browser-worker.ts +0 -104
- package/tests/fixtures/interrupt-browser-workload.ts +0 -17
- package/tests/fixtures/interrupt-dom-consumer.ts +0 -9
- package/tests/fixtures/interrupt-wait-wasm.ts +0 -108
- package/tests/fixtures/interrupt-wait-worker.ts +0 -61
- package/tests/fixtures/intrinsics.ts +0 -114
- package/tests/fixtures/isolated-process.ts +0 -98
- package/tests/fixtures/lazy-backing-constructions.ts +0 -117
- package/tests/fixtures/lazy-backing-guest.ts +0 -219
- package/tests/fixtures/lazy-backing.ts +0 -226
- package/tests/fixtures/link-initialization-worker.ts +0 -112
- package/tests/fixtures/link-initialization.ts +0 -169
- package/tests/fixtures/link-member-workers.ts +0 -73
- package/tests/fixtures/link-relay-program.ts +0 -76
- package/tests/fixtures/link-relay-worker.ts +0 -77
- package/tests/fixtures/linked-nested-node-worker.ts +0 -50
- package/tests/fixtures/logical-process-context-guest.ts +0 -37
- package/tests/fixtures/memory-group-abi-worker.ts +0 -108
- package/tests/fixtures/memory-group-member.c +0 -215
- package/tests/fixtures/memory-group-pie.ts +0 -46
- package/tests/fixtures/memory-group-wake-worker.ts +0 -14
- package/tests/fixtures/memory-group-worker.ts +0 -18
- package/tests/fixtures/memory-observation-guest.ts +0 -90
- package/tests/fixtures/metadata-completion-observer-worker.ts +0 -13
- package/tests/fixtures/metadata-enumeration-r173-service.ts +0 -71
- package/tests/fixtures/metadata-enumeration-r173-store.ts +0 -51
- package/tests/fixtures/metadata-enumeration-r173-wasi.ts +0 -168
- package/tests/fixtures/metadata-enumeration-r173-worker.ts +0 -68
- package/tests/fixtures/navigation-wire-child.ts +0 -134
- package/tests/fixtures/nested-wasi.ts +0 -260
- package/tests/fixtures/network-fence-script.ts +0 -46
- package/tests/fixtures/network-hook-positions.json +0 -16
- package/tests/fixtures/network-original-nodes.json +0 -149
- package/tests/fixtures/node-wasi-descriptors.ts +0 -203
- package/tests/fixtures/node-worker-transfers.ts +0 -11
- package/tests/fixtures/notification-collecting-worker.ts +0 -7
- package/tests/fixtures/notification-controlled-relay.ts +0 -57
- package/tests/fixtures/notification-deadline-worker.ts +0 -128
- package/tests/fixtures/notification-mixed-worker.ts +0 -215
- package/tests/fixtures/notification-probed-worker.ts +0 -53
- package/tests/fixtures/notification-reject-worker.ts +0 -7
- package/tests/fixtures/notification-runtime-worker.ts +0 -55
- package/tests/fixtures/notification-send-failure-worker.ts +0 -60
- package/tests/fixtures/notification-stalled-worker.ts +0 -5
- package/tests/fixtures/notification-traffic-worker.ts +0 -71
- package/tests/fixtures/opfs-close-page.ts +0 -94
- package/tests/fixtures/opfs-close-worker.ts +0 -565
- package/tests/fixtures/opfs-range-storage.ts +0 -285
- package/tests/fixtures/owned-job-root-worker.ts +0 -84
- package/tests/fixtures/owned-job-wait-worker.ts +0 -56
- package/tests/fixtures/owner-freeze-guest.ts +0 -81
- package/tests/fixtures/owner-freeze-owner.ts +0 -77
- package/tests/fixtures/page-root-client.ts +0 -33
- package/tests/fixtures/permissions-guest.ts +0 -55
- package/tests/fixtures/persistent-authority-observer.ts +0 -27
- package/tests/fixtures/persistent-lifecycle-r2-owner.ts +0 -149
- package/tests/fixtures/persistent-ready.ts +0 -34
- package/tests/fixtures/pipe-filestat-guest.ts +0 -101
- package/tests/fixtures/pipe-filestat-worker.ts +0 -36
- package/tests/fixtures/pipe-reuse-worker.ts +0 -41
- package/tests/fixtures/pipes-intrinsics.ts +0 -63
- package/tests/fixtures/preopen-guest.c +0 -44
- package/tests/fixtures/preopen-node-host.ts +0 -13
- package/tests/fixtures/prepared-program-loading-control.ts +0 -42
- package/tests/fixtures/prepared-runtime-control.ts +0 -80
- package/tests/fixtures/preview-wire-headers-page.ts +0 -84
- package/tests/fixtures/preview1-entry.ts +0 -1
- package/tests/fixtures/preview1-listener.wat +0 -44
- package/tests/fixtures/preview1-relay.wat +0 -24
- package/tests/fixtures/preview1-socket-imports.wat +0 -36
- package/tests/fixtures/preview1-socket-unknown.wat +0 -4
- package/tests/fixtures/preview1-socket-worker.ts +0 -72
- package/tests/fixtures/preview1-socket.c +0 -58
- package/tests/fixtures/preview1-socket.wat +0 -19
- package/tests/fixtures/private-authority-cases.ts +0 -260
- package/tests/fixtures/process-abi-guest.ts +0 -67
- package/tests/fixtures/process-abi-poll-guest.ts +0 -84
- package/tests/fixtures/process-cell-clone.ts +0 -520
- package/tests/fixtures/process-context-guest.ts +0 -22
- package/tests/fixtures/process-filesystem.ts +0 -34
- package/tests/fixtures/process-intrinsics.ts +0 -360
- package/tests/fixtures/process-lookup.ts +0 -6
- package/tests/fixtures/process-observation-acquisition-worker.ts +0 -68
- package/tests/fixtures/process-observation-controls.ts +0 -15
- package/tests/fixtures/process-observation-worker.ts +0 -72
- package/tests/fixtures/process-poll-start-failure.ts +0 -68
- package/tests/fixtures/process-root-navigation-original-bun-lock.txt +0 -333
- package/tests/fixtures/process-root-navigation-original-runner.txt +0 -378
- package/tests/fixtures/program-shell.ts +0 -86
- package/tests/fixtures/publication-channel-observer.ts +0 -144
- package/tests/fixtures/publication-cleanup-failure.ts +0 -16
- package/tests/fixtures/publication-guest.ts +0 -296
- package/tests/fixtures/publication-launch-close.ts +0 -61
- package/tests/fixtures/publication-resident-authority.ts +0 -464
- package/tests/fixtures/publication-resident-guest.ts +0 -331
- package/tests/fixtures/publication-storage.ts +0 -30
- package/tests/fixtures/publication-wasm.ts +0 -103
- package/tests/fixtures/readlink-service.ts +0 -19
- package/tests/fixtures/recovery-r42-owner.ts +0 -49
- package/tests/fixtures/recovery-r42-page.ts +0 -67
- package/tests/fixtures/reservation-waste-worker.ts +0 -16
- package/tests/fixtures/resident-memory.ts +0 -11
- package/tests/fixtures/retained-client.ts +0 -26
- package/tests/fixtures/root-return-gc.ts +0 -121
- package/tests/fixtures/running-member-wasm.ts +0 -55
- package/tests/fixtures/running-member-worker.ts +0 -50
- package/tests/fixtures/runtime-filesystem-close-debt.ts +0 -142
- package/tests/fixtures/runtime-stop-control.ts +0 -229
- package/tests/fixtures/search-count-worker.ts +0 -265
- package/tests/fixtures/search-fault-shard.ts +0 -21
- package/tests/fixtures/search-program-fs-worker.ts +0 -34
- package/tests/fixtures/shared-caller-debt-control.ts +0 -13
- package/tests/fixtures/shared-caller-exec-worker.ts +0 -119
- package/tests/fixtures/shared-caller-exec.ts +0 -597
- package/tests/fixtures/shared-caller-host-failure-control.ts +0 -92
- package/tests/fixtures/shared-memory-platform.ts +0 -6
- package/tests/fixtures/socket-admission-relay.ts +0 -114
- package/tests/fixtures/spawn-diagnostic-guest.ts +0 -44
- package/tests/fixtures/spawn-request.ts +0 -14
- package/tests/fixtures/stable-memory-grow-worker.ts +0 -10
- package/tests/fixtures/stable-memory-reader.ts +0 -253
- package/tests/fixtures/standalone-runtime-process.ts +0 -19
- package/tests/fixtures/start-failure-public.ts +0 -8
- package/tests/fixtures/start-failure-quiet-worker.ts +0 -54
- package/tests/fixtures/startup-diagnostic-request.ts +0 -8
- package/tests/fixtures/startup-diagnostic-worker.ts +0 -62
- package/tests/fixtures/startup-pool-worker.ts +0 -19
- package/tests/fixtures/stop-order-wasm.ts +0 -60
- package/tests/fixtures/stop-order-worker.ts +0 -11
- package/tests/fixtures/storage-lock-startup.ts +0 -70
- package/tests/fixtures/storage-maintenance.ts +0 -16
- package/tests/fixtures/symlink-sizing-probe.ts +0 -59
- package/tests/fixtures/terminal-control-worker.ts +0 -150
- package/tests/fixtures/terminal-input-pause.ts +0 -30
- package/tests/fixtures/terminal-input-producer.ts +0 -18
- package/tests/fixtures/terminal-mode-worker.ts +0 -58
- package/tests/fixtures/terminal-resolver-worker.ts +0 -92
- package/tests/fixtures/thread-admission-control.ts +0 -294
- package/tests/fixtures/threads-c.c +0 -117
- package/tests/fixtures/threads.rs +0 -140
- package/tests/fixtures/truncate-page-work.ts +0 -32
- package/tests/fixtures/wasi-atomic-host.ts +0 -92
- package/tests/fixtures/wasi-cat.ts +0 -177
- package/tests/fixtures/wasi-nonblock-inherited-worker.ts +0 -34
- package/tests/fixtures/wasi-nonblock-worker.ts +0 -33
- package/tests/fixtures/wasi-nonblock.ts +0 -48
- package/tests/fixtures/wasi-poll-guest.ts +0 -45
- package/tests/fixtures/wasi-write.ts +0 -72
- package/tests/fixtures/wasm-start-section.ts +0 -88
- package/tests/fixtures/watch-delivery-error-worker.ts +0 -4
- package/tests/fixtures/watch-guest.ts +0 -141
- package/tests/fixtures/watch-lifecycle-worker.ts +0 -2
- package/tests/fixtures/watch-startup-error-worker.ts +0 -1
- package/tests/fixtures/worker-pipe-transfer-guest.ts +0 -58
- package/tests/fixtures/workspace-endurance.ts +0 -113
- package/tests/fixtures/workspace-read-claim.ts +0 -41
- package/tests/fixtures/workspace-read.ts +0 -104
- package/tests/fs-socket-attachment-browser.ts +0 -184
- package/tests/fs-socket-browser-runner.ts +0 -35
- package/tests/fs-socket-node.test.ts +0 -123
- package/tests/fs-socket-owner.test.ts +0 -106
- package/tests/fs-socket-scope.test.ts +0 -285
- package/tests/gated-indexeddb.test.ts +0 -16
- package/tests/git-install.test.ts +0 -25
- package/tests/gpu-admission-browser.ts +0 -763
- package/tests/gpu-admission-controls.test.ts +0 -592
- package/tests/gpu-asset-paths.test.ts +0 -107
- package/tests/gpu-async-assets.ts +0 -29
- package/tests/gpu-async-browser-runner.ts +0 -20
- package/tests/gpu-async-command.test.ts +0 -249
- package/tests/gpu-async-command.ts +0 -272
- package/tests/gpu-async-desktop.ts +0 -78
- package/tests/gpu-async-fixture.test.ts +0 -252
- package/tests/gpu-async-native.test.ts +0 -38
- package/tests/gpu-async-native.ts +0 -70
- package/tests/gpu-async-output.test.ts +0 -49
- package/tests/gpu-async-payload.test.ts +0 -537
- package/tests/gpu-async-replay.test.ts +0 -656
- package/tests/gpu-async-stream.test.ts +0 -166
- package/tests/gpu-bootstrap-cleanup.test.ts +0 -185
- package/tests/gpu-browser-controls.test.ts +0 -64
- package/tests/gpu-browser-qualification.test.ts +0 -102
- package/tests/gpu-browser-qualification.ts +0 -432
- package/tests/gpu-browser-runner.ts +0 -554
- package/tests/gpu-browser-shared.ts +0 -59
- package/tests/gpu-bundle-query-native.test.ts +0 -8
- package/tests/gpu-bundle-query-native.ts +0 -55
- package/tests/gpu-bundle-query-replay.test.ts +0 -406
- package/tests/gpu-bundle-query-stream.test.ts +0 -97
- package/tests/gpu-ci.test.ts +0 -244
- package/tests/gpu-completions.test.ts +0 -404
- package/tests/gpu-compute-native.test.ts +0 -9
- package/tests/gpu-compute-native.ts +0 -47
- package/tests/gpu-compute-replay.test.ts +0 -363
- package/tests/gpu-compute-stream.test.ts +0 -53
- package/tests/gpu-control-retention.test.ts +0 -202
- package/tests/gpu-copy-draw-native.test.ts +0 -9
- package/tests/gpu-copy-draw-native.ts +0 -71
- package/tests/gpu-copy-draw-replay.test.ts +0 -350
- package/tests/gpu-copy-draw-stream.test.ts +0 -78
- package/tests/gpu-coverage.test.ts +0 -250
- package/tests/gpu-desktop-measure.test.ts +0 -344
- package/tests/gpu-display-retirement.test.ts +0 -213
- package/tests/gpu-display-shutdown.test.ts +0 -180
- package/tests/gpu-disposal-browser.ts +0 -685
- package/tests/gpu-disposal-controls.test.ts +0 -738
- package/tests/gpu-disposal-retirement.test.ts +0 -108
- package/tests/gpu-fairness-browser.ts +0 -273
- package/tests/gpu-fairness-fixture.test.ts +0 -202
- package/tests/gpu-fairness.test.ts +0 -203
- package/tests/gpu-fixture-closed.test.ts +0 -232
- package/tests/gpu-fixture-host.ts +0 -253
- package/tests/gpu-fixture.test.ts +0 -569
- package/tests/gpu-grant-quota-browser.ts +0 -767
- package/tests/gpu-grant-quota-controls.test.ts +0 -525
- package/tests/gpu-grant-retirement.test.ts +0 -413
- package/tests/gpu-import-observation.test.ts +0 -472
- package/tests/gpu-integration.test.ts +0 -479
- package/tests/gpu-label-native.test.ts +0 -8
- package/tests/gpu-label-native.ts +0 -37
- package/tests/gpu-label-replay.test.ts +0 -313
- package/tests/gpu-label-stream.test.ts +0 -135
- package/tests/gpu-launch-retention.test.ts +0 -134
- package/tests/gpu-loading-browser.ts +0 -54
- package/tests/gpu-loading.test.ts +0 -97
- package/tests/gpu-malformed-browser.ts +0 -522
- package/tests/gpu-malformed-controls.test.ts +0 -720
- package/tests/gpu-measure.test.ts +0 -281
- package/tests/gpu-native-browser-runner.ts +0 -48
- package/tests/gpu-native-controls.test.ts +0 -181
- package/tests/gpu-native-controls.ts +0 -117
- package/tests/gpu-ownership-browser.ts +0 -642
- package/tests/gpu-ownership-controls.test.ts +0 -373
- package/tests/gpu-payload-pressure-browser.ts +0 -1142
- package/tests/gpu-payload-pressure-controls.test.ts +0 -974
- package/tests/gpu-payload-settlement.test.ts +0 -323
- package/tests/gpu-peer-input.test.ts +0 -98
- package/tests/gpu-reader-terminal.test.ts +0 -194
- package/tests/gpu-regrant-browser.ts +0 -861
- package/tests/gpu-regrant-controls.test.ts +0 -680
- package/tests/gpu-replay.test.ts +0 -511
- package/tests/gpu-ring-snapshot.test.ts +0 -53
- package/tests/gpu-ring.test.ts +0 -497
- package/tests/gpu-scene-fixture.test.ts +0 -272
- package/tests/gpu-scene-native.test.ts +0 -14
- package/tests/gpu-scene-native.ts +0 -36
- package/tests/gpu-scene-replay.test.ts +0 -678
- package/tests/gpu-scene-stream.test.ts +0 -112
- package/tests/gpu-service-bootstrap.test.ts +0 -61
- package/tests/gpu-service-failure-browser.ts +0 -792
- package/tests/gpu-service-failure-controls.test.ts +0 -1035
- package/tests/gpu-service-failure-ordering.test.ts +0 -105
- package/tests/gpu-service-readers.test.ts +0 -247
- package/tests/gpu-stream.test.ts +0 -338
- package/tests/gpu-surface-transfer.test.ts +0 -855
- package/tests/gpu-transport.test.ts +0 -311
- package/tests/gpu-worker-bundle.test.ts +0 -31
- package/tests/group-futex-browser-runner.ts +0 -150
- package/tests/group-futex-browser.ts +0 -141
- package/tests/group-futex.test.ts +0 -798
- package/tests/guarded-stream-nonblock.test.ts +0 -130
- package/tests/guest-watch-browser-cases.test.ts +0 -24
- package/tests/guest-watch-browser-cases.ts +0 -271
- package/tests/guest-watch-browser-runner.ts +0 -66
- package/tests/host-interface.test.ts +0 -115
- package/tests/host.test.ts +0 -349
- package/tests/http1-buffer-boundaries.test.ts +0 -102
- package/tests/http1-framing-limits.test.ts +0 -419
- package/tests/imports.test.ts +0 -92
- package/tests/indexeddb-checkpoint-decode-browser.ts +0 -232
- package/tests/indexeddb-checkpoint-decode.test.ts +0 -32
- package/tests/indexeddb-chunks-browser-runner.ts +0 -39
- package/tests/indexeddb-chunks-browser.ts +0 -841
- package/tests/indexeddb-chunks.test.ts +0 -57
- package/tests/indexeddb-publication-browser.ts +0 -458
- package/tests/indexeddb-publication.test.ts +0 -89
- package/tests/inherited-fd-review.test.ts +0 -362
- package/tests/inherited-fd.test.ts +0 -82
- package/tests/installer-symlinks-alias.test.ts +0 -266
- package/tests/installer-symlinks-borrow.test.ts +0 -451
- package/tests/installer-symlinks-codec.test.ts +0 -117
- package/tests/installer-symlinks-creation.test.ts +0 -369
- package/tests/installer-symlinks-final-components.test.ts +0 -392
- package/tests/installer-symlinks-history.test.ts +0 -155
- package/tests/installer-symlinks-metadata-types.ts +0 -32
- package/tests/installer-symlinks-metadata.test.ts +0 -140
- package/tests/installer-symlinks-persistence.test.ts +0 -120
- package/tests/installer-symlinks-readlink.test.ts +0 -444
- package/tests/installer-symlinks-service.test.ts +0 -125
- package/tests/installer-symlinks-tree.test.ts +0 -88
- package/tests/installer-symlinks.test.ts +0 -251
- package/tests/interrupt-admitted-browser-runner.ts +0 -290
- package/tests/interrupt-admitted-browser.ts +0 -167
- package/tests/interrupt-admitted-fixture.ts +0 -44
- package/tests/interrupt-admitted-loader.test.ts +0 -324
- package/tests/interrupt-admitted-store.test.ts +0 -195
- package/tests/interrupt-browser-benchmark.ts +0 -208
- package/tests/interrupt-browser-control.ts +0 -55
- package/tests/interrupt-browser-fixtures.test.ts +0 -40
- package/tests/interrupt-browser-runner.test.ts +0 -125
- package/tests/interrupt-browser.ts +0 -251
- package/tests/interrupt-cache-storage-fixture.ts +0 -58
- package/tests/interrupt-check.test.ts +0 -47
- package/tests/interrupt-loader-cache.test.ts +0 -383
- package/tests/interrupt-loader.test.ts +0 -111
- package/tests/interrupt-rewriter-exports.test.ts +0 -11
- package/tests/interrupt-rewriter.test.ts +0 -740
- package/tests/interrupt-standard-eh.test.ts +0 -293
- package/tests/interrupt-transform-pin.test.ts +0 -16
- package/tests/interrupt-wait-profile.test.ts +0 -126
- package/tests/interrupt-wait.test.ts +0 -328
- package/tests/intrinsics-boundary.test.ts +0 -377
- package/tests/isolated-page-runner.ts +0 -186
- package/tests/libc-tooling.test.ts +0 -313
- package/tests/link-browser-runner.ts +0 -94
- package/tests/link-browser.ts +0 -61
- package/tests/link-initialization.test.ts +0 -344
- package/tests/link-member-workers.test.ts +0 -83
- package/tests/link-program.test.ts +0 -1642
- package/tests/link-quickjs-worker.ts +0 -140
- package/tests/link-quickjs.test.ts +0 -83
- package/tests/link-relay-browser.ts +0 -94
- package/tests/link-shared-basic512-fixture.ts +0 -48
- package/tests/link-shared-basic512.test.ts +0 -129
- package/tests/loopback-fetch-bun-consumer.test.ts +0 -121
- package/tests/loopback-fetch-compression.test.ts +0 -204
- package/tests/loopback-fetch-fixture.ts +0 -128
- package/tests/loopback-fetch-redirect.test.ts +0 -321
- package/tests/loopback-fetch-worker.ts +0 -115
- package/tests/memory-budget.test.ts +0 -952
- package/tests/memory-group-browser-runner.ts +0 -123
- package/tests/memory-group-browser.ts +0 -649
- package/tests/memory-group-cap.test.ts +0 -200
- package/tests/memory-group-exit-lock.test.ts +0 -325
- package/tests/memory-group-grow.test.ts +0 -151
- package/tests/memory-group-link.test.ts +0 -485
- package/tests/memory-group-pin-port.test.ts +0 -170
- package/tests/memory-group-pin.test.ts +0 -275
- package/tests/memory-group-review.test.ts +0 -286
- package/tests/memory-group-stack-worker.ts +0 -94
- package/tests/memory-group-state.test.ts +0 -537
- package/tests/memory-reservations.test.ts +0 -804
- package/tests/memory-views.test.ts +0 -168
- package/tests/metadata-directory-contract-r173.test.ts +0 -307
- package/tests/metadata-nlink-r173.test.ts +0 -201
- package/tests/metadata-readdir-r173.test.ts +0 -126
- package/tests/metadata-worker-completion.test.ts +0 -29
- package/tests/namespace-cursor.test.ts +0 -470
- package/tests/namespace-projection-memory-budget.test.ts +0 -250
- package/tests/namespace-projection-owner.test.ts +0 -880
- package/tests/namespace-projection-table.test.ts +0 -1598
- package/tests/nested-wasi.test.ts +0 -7
- package/tests/net-host-watch.test.ts +0 -236
- package/tests/net-transport-metadata.test.ts +0 -81
- package/tests/network-activation-browser.ts +0 -71
- package/tests/network-address.test.ts +0 -412
- package/tests/network-browser-runner.ts +0 -21
- package/tests/network-browser-service-worker.ts +0 -19
- package/tests/network-browser-worker.ts +0 -147
- package/tests/network-browser.test.ts +0 -22
- package/tests/network-browser.ts +0 -679
- package/tests/network-budget.test.ts +0 -103
- package/tests/network-command-controls.ts +0 -87
- package/tests/network-command.test.ts +0 -253
- package/tests/network-command.ts +0 -274
- package/tests/network-control-page.ts +0 -32
- package/tests/network-desktop-driver.ts +0 -66
- package/tests/network-failure-control.ts +0 -332
- package/tests/network-failure.test.ts +0 -14
- package/tests/network-finalizer.test.ts +0 -61
- package/tests/network-finalizer.ts +0 -17
- package/tests/network-flow-cases.ts +0 -146
- package/tests/network-flow-control.test.ts +0 -43
- package/tests/network-growth-control.ts +0 -18
- package/tests/network-growth.test.ts +0 -27
- package/tests/network-lazy.test.ts +0 -260
- package/tests/network-lookup-consumer.test.ts +0 -193
- package/tests/network-lookup-handles.test.ts +0 -527
- package/tests/network-lookup-node.test.ts +0 -32
- package/tests/network-lookup-worker.ts +0 -83
- package/tests/network-lookup.test.ts +0 -134
- package/tests/network-module-host.test.ts +0 -263
- package/tests/network-module.test.ts +0 -76
- package/tests/network-namespace.test.ts +0 -562
- package/tests/network-outbound.test.ts +0 -786
- package/tests/network-page-contract.ts +0 -24
- package/tests/network-page-inputs.ts +0 -79
- package/tests/network-page-suite.ts +0 -183
- package/tests/network-page.ts +0 -14
- package/tests/network-path-scope.test.ts +0 -93
- package/tests/network-relay-browser-runner.ts +0 -10
- package/tests/network-relay-browser.ts +0 -384
- package/tests/network-relay-contract.ts +0 -35
- package/tests/network-relay-fixture.ts +0 -249
- package/tests/network-relay-modules.ts +0 -21
- package/tests/network-relay-page.ts +0 -10
- package/tests/network-relay-runner.test.ts +0 -171
- package/tests/network-relay-worker.ts +0 -137
- package/tests/network-resource-control.ts +0 -73
- package/tests/network-ring-wake.test.ts +0 -186
- package/tests/network-safari-websocket.test.ts +0 -272
- package/tests/network-sentinel-assets.ts +0 -6
- package/tests/network-signal-control.test.ts +0 -8
- package/tests/network-signal-control.ts +0 -101
- package/tests/network-signal-controls.ts +0 -52
- package/tests/network-size.test.ts +0 -22
- package/tests/network-source-parity.test.ts +0 -95
- package/tests/network-source-parity.ts +0 -240
- package/tests/network-unix-fs.test.ts +0 -297
- package/tests/network-unix-guest.ts +0 -41
- package/tests/network-unix-races.test.ts +0 -370
- package/tests/network-unix-support.ts +0 -93
- package/tests/network-unix.test.ts +0 -600
- package/tests/network-wire.test.ts +0 -198
- package/tests/network-worker-peer.ts +0 -88
- package/tests/node-exports.test.ts +0 -229
- package/tests/node-wasi-descriptors.test.ts +0 -32
- package/tests/notification-admission.test.ts +0 -51
- package/tests/notification-browser-runner.ts +0 -92
- package/tests/notification-command.test.ts +0 -130
- package/tests/notification-command.ts +0 -230
- package/tests/notification-fairness-browser-runner.ts +0 -66
- package/tests/notification-fairness-cases.ts +0 -327
- package/tests/notification-lifetime-cases.ts +0 -457
- package/tests/notification-mixed-cases.ts +0 -220
- package/tests/notification-race-browser-runner.ts +0 -26
- package/tests/notification-race-cases.ts +0 -54
- package/tests/notification-relay-retention.test.ts +0 -133
- package/tests/notification-wait.test.ts +0 -100
- package/tests/opfs-close-browser-observer.test.ts +0 -319
- package/tests/opfs-close-browser-runner.ts +0 -434
- package/tests/opfs-close-browser.ts +0 -113
- package/tests/opfs-close.test.ts +0 -504
- package/tests/opfs-range-browser-runner.ts +0 -86
- package/tests/opfs-range-browser.ts +0 -202
- package/tests/opfs-range.test.ts +0 -331
- package/tests/opfs-snapshot.test.ts +0 -224
- package/tests/owned-job-cleanup.test.ts +0 -1167
- package/tests/owner-freeze-browser-runner.ts +0 -571
- package/tests/owner-freeze-browser.ts +0 -226
- package/tests/packaging.test.ts +0 -278
- package/tests/page-runner/aggregate-error-fixture.ts +0 -18
- package/tests/page-runner/asset-hold-control-page.ts +0 -7
- package/tests/page-runner/asset-hold-controls.ts +0 -132
- package/tests/page-runner/asset-owner.test.ts +0 -635
- package/tests/page-runner/bootstrap-arrival-browser.test.ts +0 -139
- package/tests/page-runner/bootstrap-arrival.test.ts +0 -344
- package/tests/page-runner/bootstrap-control.ts +0 -19
- package/tests/page-runner/bootstrap-diagnostics.test.ts +0 -133
- package/tests/page-runner/browser-controls-process-fixture.ts +0 -88
- package/tests/page-runner/browser-controls-runner.test.ts +0 -360
- package/tests/page-runner/browser-controls-runner.ts +0 -129
- package/tests/page-runner/browser-controls-suite.ts +0 -426
- package/tests/page-runner/browser-observation.test.ts +0 -448
- package/tests/page-runner/collector-policy.test.ts +0 -216
- package/tests/page-runner/collector.test.ts +0 -429
- package/tests/page-runner/command-controls.ts +0 -334
- package/tests/page-runner/command-fixtures.ts +0 -46
- package/tests/page-runner/command-host.test.ts +0 -167
- package/tests/page-runner/command-observation.test.ts +0 -358
- package/tests/page-runner/command-page.ts +0 -21
- package/tests/page-runner/command-suites.ts +0 -142
- package/tests/page-runner/console-control-page.ts +0 -33
- package/tests/page-runner/console-control-worker.ts +0 -14
- package/tests/page-runner/console-controls.ts +0 -174
- package/tests/page-runner/console-first-line-worker.ts +0 -2
- package/tests/page-runner/console-late-control-page.ts +0 -25
- package/tests/page-runner/console-late-control.test.ts +0 -214
- package/tests/page-runner/console-late-control.ts +0 -398
- package/tests/page-runner/console-lifecycle.test.ts +0 -139
- package/tests/page-runner/console-observation.test.ts +0 -73
- package/tests/page-runner/consumer-control-chunk.ts +0 -1
- package/tests/page-runner/consumer-control-page.ts +0 -147
- package/tests/page-runner/consumer-control-worker.ts +0 -4
- package/tests/page-runner/consumer-controls.ts +0 -345
- package/tests/page-runner/consumer-entry.test.ts +0 -856
- package/tests/page-runner/continuity-lock-browser.test.ts +0 -29
- package/tests/page-runner/continuity-lock-control-page.ts +0 -430
- package/tests/page-runner/continuity-lock-diagnostic.test.ts +0 -122
- package/tests/page-runner/control-run.test.ts +0 -112
- package/tests/page-runner/control-run.ts +0 -36
- package/tests/page-runner/cross-tab-evaluator.ts +0 -162
- package/tests/page-runner/cross-tab-value.ts +0 -59
- package/tests/page-runner/document-retirement.test.ts +0 -288
- package/tests/page-runner/driver-observation-cleanup.test.ts +0 -63
- package/tests/page-runner/driver-observation-diagnostics.test.ts +0 -93
- package/tests/page-runner/error-context.test.ts +0 -95
- package/tests/page-runner/fake-driver.ts +0 -192
- package/tests/page-runner/filesystem-transport-browser.test.ts +0 -75
- package/tests/page-runner/filesystem-transport-native.ts +0 -13
- package/tests/page-runner/filesystem-transport-observation.ts +0 -65
- package/tests/page-runner/filesystem-transport-page.ts +0 -48
- package/tests/page-runner/filesystem-transport-suite.test.ts +0 -310
- package/tests/page-runner/filesystem-transport-suite.ts +0 -127
- package/tests/page-runner/fixture-admission.test.ts +0 -167
- package/tests/page-runner/fixture-capability-control-page.ts +0 -24
- package/tests/page-runner/fixture-capability-controls.ts +0 -189
- package/tests/page-runner/fixture-host.test.ts +0 -524
- package/tests/page-runner/fixture-owner.test.ts +0 -176
- package/tests/page-runner/fixtures/large-assertion.ts +0 -21
- package/tests/page-runner/framework-collector.test.ts +0 -277
- package/tests/page-runner/framework-controls/installed.ts +0 -433
- package/tests/page-runner/framework-dom-controls.ts +0 -685
- package/tests/page-runner/framework-dom-page.ts +0 -136
- package/tests/page-runner/framework-final-ack.test.ts +0 -79
- package/tests/page-runner/framework-host.test.ts +0 -443
- package/tests/page-runner/framework-middleware.test.ts +0 -85
- package/tests/page-runner/framework-queue.test.ts +0 -405
- package/tests/page-runner/framework-reporting.test.ts +0 -451
- package/tests/page-runner/framework-trace-host.test.ts +0 -106
- package/tests/page-runner/framework-trace-regression.test.ts +0 -300
- package/tests/page-runner/framework-trace.test.ts +0 -793
- package/tests/page-runner/framework-validation.test.ts +0 -52
- package/tests/page-runner/framework-verdict.test.ts +0 -259
- package/tests/page-runner/gpu-async-controls-runner.ts +0 -108
- package/tests/page-runner/gpu-async-failure-controls.ts +0 -93
- package/tests/page-runner/gpu-async-native.ts +0 -6
- package/tests/page-runner/gpu-async-operations.ts +0 -49
- package/tests/page-runner/gpu-async-page.ts +0 -14
- package/tests/page-runner/gpu-async-request.ts +0 -3
- package/tests/page-runner/gpu-async-suite.test.ts +0 -189
- package/tests/page-runner/gpu-async-suite.ts +0 -120
- package/tests/page-runner/guest-watch-command.ts +0 -11
- package/tests/page-runner/guest-watch-control-phases.ts +0 -20
- package/tests/page-runner/guest-watch-controls-runner.ts +0 -134
- package/tests/page-runner/guest-watch-stalled-helper.ts +0 -5
- package/tests/page-runner/host-drive-control-page.ts +0 -90
- package/tests/page-runner/host-drive-controls.test.ts +0 -91
- package/tests/page-runner/host-drive-controls.ts +0 -318
- package/tests/page-runner/host-drive.test.ts +0 -2222
- package/tests/page-runner/host-page.test.ts +0 -58
- package/tests/page-runner/host-storage-control-page.ts +0 -182
- package/tests/page-runner/host-storage-control-worker.ts +0 -11
- package/tests/page-runner/host-storage-controls.ts +0 -313
- package/tests/page-runner/host.test.ts +0 -133
- package/tests/page-runner/inspector-endpoint.test.ts +0 -236
- package/tests/page-runner/inspector-stream.test.ts +0 -149
- package/tests/page-runner/key-press-control-page.ts +0 -17
- package/tests/page-runner/key-press-controls-native.ts +0 -7
- package/tests/page-runner/key-press-controls.ts +0 -78
- package/tests/page-runner/key-press-fixture.ts +0 -109
- package/tests/page-runner/key-press-observation.ts +0 -129
- package/tests/page-runner/key-press-suite.ts +0 -138
- package/tests/page-runner/large-reporting.test.ts +0 -351
- package/tests/page-runner/lifecycle-queue.test.ts +0 -186
- package/tests/page-runner/memory-group-command.test.ts +0 -227
- package/tests/page-runner/memory-group-command.ts +0 -80
- package/tests/page-runner/memory-group-control-page.ts +0 -7
- package/tests/page-runner/memory-group-controls-runner.ts +0 -126
- package/tests/page-runner/native-cli.test.ts +0 -86
- package/tests/page-runner/native-failure.test.ts +0 -396
- package/tests/page-runner/notification-host.test.ts +0 -264
- package/tests/page-runner/notification-native.ts +0 -6
- package/tests/page-runner/peer-collector.test.ts +0 -356
- package/tests/page-runner/peer-control-page.ts +0 -33
- package/tests/page-runner/peer-controls.ts +0 -249
- package/tests/page-runner/peer-driver-fixture.test.ts +0 -219
- package/tests/page-runner/peer-driver-fixture.ts +0 -257
- package/tests/page-runner/peer-host.test.ts +0 -248
- package/tests/page-runner/peer-probe.test.ts +0 -131
- package/tests/page-runner/peer-storage-control-page.ts +0 -51
- package/tests/page-runner/peer-storage-controls.ts +0 -116
- package/tests/page-runner/playwright-driver.test.ts +0 -270
- package/tests/page-runner/prepared-assets.test.ts +0 -91
- package/tests/page-runner/process-recycling-assets.ts +0 -34
- package/tests/page-runner/process-recycling-controls-page.ts +0 -27
- package/tests/page-runner/process-recycling-controls.test.ts +0 -70
- package/tests/page-runner/process-recycling-controls.ts +0 -134
- package/tests/page-runner/process-recycling-error-control-worker.ts +0 -2
- package/tests/page-runner/process-recycling-fs-control-worker.ts +0 -3
- package/tests/page-runner/process-recycling-native.ts +0 -46
- package/tests/page-runner/process-recycling-page.ts +0 -24
- package/tests/page-runner/process-recycling-storage-control.ts +0 -11
- package/tests/page-runner/process-recycling-suite.test.ts +0 -202
- package/tests/page-runner/process-recycling-suite.ts +0 -38
- package/tests/page-runner/publication-bootstrap.ts +0 -65
- package/tests/page-runner/publication-cross-tab-browser.test.ts +0 -68
- package/tests/page-runner/publication-cross-tab-host.ts +0 -211
- package/tests/page-runner/publication-cross-tab-native.ts +0 -6
- package/tests/page-runner/publication-cross-tab-page.ts +0 -24
- package/tests/page-runner/publication-cross-tab-suite.test.ts +0 -181
- package/tests/page-runner/publication-cross-tab-suite.ts +0 -87
- package/tests/page-runner/publication-native.ts +0 -11
- package/tests/page-runner/publication-page.ts +0 -46
- package/tests/page-runner/publication-suite.test.ts +0 -100
- package/tests/page-runner/publication-suite.ts +0 -99
- package/tests/page-runner/report-chunks.test.ts +0 -295
- package/tests/page-runner/reporter-control-failure.test.ts +0 -119
- package/tests/page-runner/reporter-control-page.ts +0 -101
- package/tests/page-runner/reporter.test.ts +0 -237
- package/tests/page-runner/reporting-cleanup.test.ts +0 -118
- package/tests/page-runner/reporting-contract.test.ts +0 -242
- package/tests/page-runner/reporting-fixture.ts +0 -130
- package/tests/page-runner/reporting-host.test.ts +0 -149
- package/tests/page-runner/reporting-realm.ts +0 -4
- package/tests/page-runner/reporting-types.ts +0 -22
- package/tests/page-runner/retained-worker-control-page.ts +0 -23
- package/tests/page-runner/retained-worker-controls.ts +0 -107
- package/tests/page-runner/root-continuity-allocation.ts +0 -21
- package/tests/page-runner/root-continuity-control-fixture.ts +0 -11
- package/tests/page-runner/root-continuity-controls.ts +0 -237
- package/tests/page-runner/root-continuity-gate-page.ts +0 -94
- package/tests/page-runner/root-continuity-page.ts +0 -48
- package/tests/page-runner/root-continuity-suite.test.ts +0 -290
- package/tests/page-runner/root-continuity-suite.ts +0 -102
- package/tests/page-runner/safari-driver-log.test.ts +0 -202
- package/tests/page-runner/safari-driver.test.ts +0 -474
- package/tests/page-runner/safari-error.test.ts +0 -61
- package/tests/page-runner/safari-navigation.test.ts +0 -220
- package/tests/page-runner/safari-observer.test.ts +0 -868
- package/tests/page-runner/safari-session-startup.test.ts +0 -139
- package/tests/page-runner/safe-staging-allocation.ts +0 -19
- package/tests/page-runner/safe-staging-control-page.ts +0 -58
- package/tests/page-runner/safe-staging-controls-runner.ts +0 -53
- package/tests/page-runner/safe-staging-page.ts +0 -27
- package/tests/page-runner/safe-staging-suite.ts +0 -70
- package/tests/page-runner/safe-staging.test.ts +0 -145
- package/tests/page-runner/stall-diagnostics.test.ts +0 -380
- package/tests/page-runner/storage-control-page.ts +0 -124
- package/tests/page-runner/storage-control-worker.ts +0 -36
- package/tests/page-runner/storage-page-control-worker.ts +0 -15
- package/tests/page-runner/storage-worker.test.ts +0 -30
- package/tests/page-runner/suite-query.test.ts +0 -164
- package/tests/page-runner/suite-startup.test.ts +0 -63
- package/tests/page-runner/threads-runtime-browser.test.ts +0 -70
- package/tests/page-runner/threads-runtime-native.ts +0 -31
- package/tests/page-runner/threads-runtime-page.ts +0 -19
- package/tests/page-runner/threads-runtime-suite.test.ts +0 -236
- package/tests/page-runner/threads-runtime-suite.ts +0 -162
- package/tests/page-runner/worker-allocation.test.ts +0 -161
- package/tests/page-runner/worker-capability-control-page.ts +0 -91
- package/tests/page-runner/worker-capability-controls.ts +0 -235
- package/tests/page-runner/worker-close-query.test.ts +0 -229
- package/tests/page-runner/worker-lifecycle-browser.test.ts +0 -104
- package/tests/page-runner/worker-lifecycle-control-page.ts +0 -18
- package/tests/persistence-close.test.ts +0 -359
- package/tests/persistence-durability.test.ts +0 -588
- package/tests/persistence-queue.test.ts +0 -324
- package/tests/persistence.test.ts +0 -788
- package/tests/persistent-authority-browser-runner.ts +0 -518
- package/tests/persistent-authority-browser.ts +0 -25
- package/tests/persistent-authority-report.test.ts +0 -216
- package/tests/persistent-authority-report.ts +0 -81
- package/tests/persistent-lifecycle-r2-browser-runner.ts +0 -503
- package/tests/persistent-lifecycle-r2-page.ts +0 -248
- package/tests/persistent-lifecycle-r2.test.ts +0 -114
- package/tests/persistent-native-inspection.test.ts +0 -254
- package/tests/persistent-native-inspection.ts +0 -179
- package/tests/persistent-ready.test.ts +0 -54
- package/tests/persistent-resident-owner.test.ts +0 -612
- package/tests/pinned-truncate.test.ts +0 -137
- package/tests/pipe-description-flags.test.ts +0 -29
- package/tests/pipe-filestat-browser.ts +0 -182
- package/tests/pipe-filestat.test.ts +0 -157
- package/tests/pipe-persistent-lifetime.test.ts +0 -134
- package/tests/pipe-reader-lifetime.test.ts +0 -46
- package/tests/pipe-reader-reuse-races.test.ts +0 -184
- package/tests/pipe-registry-allocator.test.ts +0 -35
- package/tests/pipe-reuse-worker.test.ts +0 -112
- package/tests/pipe-shared-allocator.test.ts +0 -170
- package/tests/pipe-slot-reuse.test.ts +0 -500
- package/tests/pipes.test.ts +0 -1669
- package/tests/preopen-placement.test.ts +0 -236
- package/tests/prepared-platform-boundary.test.ts +0 -26
- package/tests/preview-host-reference.test.ts +0 -51
- package/tests/preview-host-reference.ts +0 -155
- package/tests/preview-host.test.ts +0 -875
- package/tests/preview-network-fixture.ts +0 -150
- package/tests/preview-upgrade-lifetime.test.ts +0 -123
- package/tests/preview-upgrade.test.ts +0 -277
- package/tests/preview-vite.test.ts +0 -296
- package/tests/preview.test.ts +0 -406
- package/tests/preview1-listener-browser.ts +0 -136
- package/tests/preview1-listener-lifecycle.test.ts +0 -55
- package/tests/preview1-listener-module.ts +0 -12
- package/tests/preview1-listener.test.ts +0 -430
- package/tests/preview1-network-launch.test.ts +0 -251
- package/tests/preview1-network-lifetime.test.ts +0 -71
- package/tests/preview1-socket-libc.test.ts +0 -65
- package/tests/preview1-socket-support.ts +0 -213
- package/tests/preview1-socket.test.ts +0 -506
- package/tests/preview1-worker-entry.test.ts +0 -42
- package/tests/preview1-worker-startup.test.ts +0 -74
- package/tests/process-abi.test.ts +0 -1568
- package/tests/process-access.test.ts +0 -653
- package/tests/process-admission.test.ts +0 -413
- package/tests/process-cell-clone-browser.test.ts +0 -24
- package/tests/process-cell-clone-browser.ts +0 -239
- package/tests/process-cell-clone.test.ts +0 -39
- package/tests/process-control.test.ts +0 -166
- package/tests/process-core.test.ts +0 -1528
- package/tests/process-cwd.test.ts +0 -237
- package/tests/process-directory-rejection.test.ts +0 -149
- package/tests/process-entry.test.ts +0 -12
- package/tests/process-execve.test.ts +0 -677
- package/tests/process-host-failure.test.ts +0 -149
- package/tests/process-identity.test.ts +0 -482
- package/tests/process-job.test.ts +0 -504
- package/tests/process-linux-signals.test.ts +0 -535
- package/tests/process-loader-retry.test.ts +0 -137
- package/tests/process-lookup.test.ts +0 -408
- package/tests/process-memory-admission-rollback.test.ts +0 -218
- package/tests/process-navigation-observer.test.ts +0 -362
- package/tests/process-navigation-observer.ts +0 -707
- package/tests/process-observation-boundary.test.ts +0 -103
- package/tests/process-observation-lifecycle.test.ts +0 -279
- package/tests/process-observation-root.test.ts +0 -498
- package/tests/process-observation-standalone.test.ts +0 -236
- package/tests/process-observation.test.ts +0 -243
- package/tests/process-outcome.test.ts +0 -222
- package/tests/process-pipe-recycling.test.ts +0 -336
- package/tests/process-poll-idle.test.ts +0 -345
- package/tests/process-quiescence.test.ts +0 -317
- package/tests/process-recycling-browser-runner.test.ts +0 -385
- package/tests/process-recycling-browser-runner.ts +0 -410
- package/tests/process-recycling-browser.ts +0 -1720
- package/tests/process-replacement.test.ts +0 -1950
- package/tests/process-root-navigation-diagnostic.test.ts +0 -1146
- package/tests/process-root-navigation-diagnostic.ts +0 -1291
- package/tests/process-signal-poll.test.ts +0 -168
- package/tests/process-spawn-diagnostic.test.ts +0 -388
- package/tests/process-spawn-errno.test.ts +0 -265
- package/tests/process-start-browser-runner.ts +0 -82
- package/tests/process-start-browser.ts +0 -120
- package/tests/process-start-diagnostics.test.ts +0 -301
- package/tests/process-start-failed.test.ts +0 -336
- package/tests/process-start-status.test.ts +0 -512
- package/tests/process-startup-review.test.ts +0 -507
- package/tests/process-worker-lifetime.test.ts +0 -125
- package/tests/process-worker-ownership.test.ts +0 -3153
- package/tests/program-admission-metadata.test.ts +0 -131
- package/tests/program-build-tools.test.ts +0 -271
- package/tests/program-host-command-debt.ts +0 -48
- package/tests/program-host-command-fixture.ts +0 -108
- package/tests/program-host-command-signals.test.ts +0 -271
- package/tests/program-host-command-types.test.ts +0 -46
- package/tests/program-host-command.test.ts +0 -688
- package/tests/program-loading-api.test.ts +0 -475
- package/tests/program-manifest-lookup.test.ts +0 -129
- package/tests/program-script-loading.test.ts +0 -174
- package/tests/program-session-example.test.ts +0 -313
- package/tests/program-url-download.test.ts +0 -380
- package/tests/programs-install-termination-debt.ts +0 -146
- package/tests/programs-install-termination.test.ts +0 -51
- package/tests/programs-install.test.ts +0 -388
- package/tests/public-workspace-endurance.test.ts +0 -244
- package/tests/publication-browser-runner.test.ts +0 -27
- package/tests/publication-browser-runner.ts +0 -96
- package/tests/publication-browser.ts +0 -913
- package/tests/publication-channel-observer.test.ts +0 -92
- package/tests/publication-checkpoint-contract.test.ts +0 -306
- package/tests/publication-command.ts +0 -35
- package/tests/publication-cross-tab-assets.ts +0 -38
- package/tests/publication-cross-tab-browser-runner.ts +0 -37
- package/tests/publication-cross-tab-browser.ts +0 -966
- package/tests/publication-cross-tab-command.ts +0 -1003
- package/tests/publication-cross-tab-host.ts +0 -89
- package/tests/publication-cross-tab-inventory.ts +0 -53
- package/tests/publication-durable-metadata.test.ts +0 -507
- package/tests/publication-limits-contract.test.ts +0 -106
- package/tests/publication-memory-accounting.test.ts +0 -575
- package/tests/readiness-stream.test.ts +0 -405
- package/tests/readiness.test.ts +0 -90
- package/tests/recovery-r42-browser-runner.ts +0 -330
- package/tests/recovery-r42.test.ts +0 -23
- package/tests/reservation-waste.test.ts +0 -243
- package/tests/resident-construction.test.ts +0 -663
- package/tests/root-continuity-browser-runner.ts +0 -62
- package/tests/root-continuity-browser.ts +0 -269
- package/tests/root-continuity-command.ts +0 -23
- package/tests/root-continuity-source-parity.test.ts +0 -77
- package/tests/root-continuity.test.ts +0 -196
- package/tests/root-return-gc.test.ts +0 -36
- package/tests/running-member-reuse-browser-runner.ts +0 -123
- package/tests/running-member-reuse-browser.ts +0 -383
- package/tests/runtime-budget-ownership.test.ts +0 -38
- package/tests/runtime-display-fence.test.ts +0 -20
- package/tests/runtime-disposal-signal-order.test.ts +0 -25
- package/tests/runtime-facade.test.ts +0 -1999
- package/tests/runtime-filesystem-close-debt.test.ts +0 -38
- package/tests/runtime-network-fence.test.ts +0 -8
- package/tests/runtime-network.test.ts +0 -456
- package/tests/runtime-process-context.test.ts +0 -349
- package/tests/runtime-request-pool.test.ts +0 -83
- package/tests/runtime-size.test.ts +0 -102
- package/tests/runtime-startup-proof.test.ts +0 -86
- package/tests/runtime-startup.test.ts +0 -299
- package/tests/runtime-terminals.test.ts +0 -496
- package/tests/safe-staging-browser-runner.ts +0 -22
- package/tests/safe-staging-browser.ts +0 -1224
- package/tests/safe-staging-fixture-hooks.test.ts +0 -63
- package/tests/safe-staging-native.test.ts +0 -29
- package/tests/safe-staging-native.ts +0 -32
- package/tests/safe-staging-runner-contract.test.ts +0 -30
- package/tests/safe-staging.test.ts +0 -96
- package/tests/search-executor-browser-runner.ts +0 -34
- package/tests/search-executor-browser.ts +0 -614
- package/tests/search-file-reader.test.ts +0 -58
- package/tests/search-grep-plan.test.ts +0 -364
- package/tests/search-matcher-differential.test.ts +0 -187
- package/tests/search-matcher.test.ts +0 -173
- package/tests/search-operand-plan.test.ts +0 -30
- package/tests/search-program-browser-runner.ts +0 -146
- package/tests/search-program-browser.ts +0 -388
- package/tests/search-rg-plan.test.ts +0 -407
- package/tests/search-run.test.ts +0 -366
- package/tests/search-source.test.ts +0 -129
- package/tests/sender-admission.test.ts +0 -251
- package/tests/shared-caller-admission.test.ts +0 -121
- package/tests/shared-caller-host-exec.test.ts +0 -119
- package/tests/shared-control-pipes.test.ts +0 -37
- package/tests/shared-guest-backing.test.ts +0 -746
- package/tests/shared-memory-admission.test.ts +0 -203
- package/tests/shared-memory-browser-bundle.test.ts +0 -62
- package/tests/shared-memory-input.test.ts +0 -79
- package/tests/shared-reservation-coverage.test.ts +0 -15
- package/tests/spawn-error-context.test.ts +0 -38
- package/tests/stable-memory-reader.test.ts +0 -26
- package/tests/start-failure-quiet-browser.ts +0 -333
- package/tests/start-failure-quiet.test.ts +0 -24
- package/tests/startup-diagnostic-browser.ts +0 -192
- package/tests/startup-diagnostic.test.ts +0 -43
- package/tests/startup-pool-browser.ts +0 -173
- package/tests/stop-order-browser-runner.ts +0 -135
- package/tests/stop-order-browser.ts +0 -166
- package/tests/storage-caller-release.test.ts +0 -82
- package/tests/storage-crash-r2-browser.ts +0 -7
- package/tests/storage-crash-r2-indexeddb.ts +0 -307
- package/tests/storage-crash-r2-opfs.ts +0 -224
- package/tests/storage-crash-r2-scheduler.ts +0 -88
- package/tests/storage-crash-r2-state.ts +0 -132
- package/tests/storage-crash-r2.test.ts +0 -109
- package/tests/storage-lock-adapter.test.ts +0 -82
- package/tests/storage-lock-browser-runner.ts +0 -1033
- package/tests/storage-lock-browser.ts +0 -321
- package/tests/storage-lock-cases.ts +0 -157
- package/tests/storage-lock-host.ts +0 -103
- package/tests/storage-lock-observation.ts +0 -60
- package/tests/storage-lock-page.ts +0 -18
- package/tests/storage-lock-peer.ts +0 -132
- package/tests/storage-lock-recovery-worker.ts +0 -60
- package/tests/storage-lock-schedules.ts +0 -375
- package/tests/storage-lock-startup.test.ts +0 -73
- package/tests/storage-navigation-diagnostics.test.ts +0 -548
- package/tests/storage-quota-r2-browser.ts +0 -548
- package/tests/storage-quota-r2-probes.ts +0 -393
- package/tests/storage-quota-r2.test.ts +0 -17
- package/tests/storage-release.test.ts +0 -442
- package/tests/storage-suite-contract.test.ts +0 -15
- package/tests/storage.test.ts +0 -520
- package/tests/symlink-sizing.test.ts +0 -226
- package/tests/terminal-control.test.ts +0 -639
- package/tests/terminal-deadholder.test.ts +0 -631
- package/tests/terminal-gate-wake.test.ts +0 -360
- package/tests/terminal-handoff.test.ts +0 -86
- package/tests/terminal-input.test.ts +0 -332
- package/tests/terminal-interrupt-flush.test.ts +0 -554
- package/tests/terminal-output.test.ts +0 -711
- package/tests/terminal-read-fds.test.ts +0 -153
- package/tests/terminal-resolver-worker.test.ts +0 -125
- package/tests/terminal-session.test.ts +0 -1794
- package/tests/thread-admission.test.ts +0 -151
- package/tests/threads-browser-contract.ts +0 -32
- package/tests/threads-browser-guest-worker.ts +0 -12
- package/tests/threads-browser-page.ts +0 -552
- package/tests/threads-browser-runner.test.ts +0 -83
- package/tests/threads-browser-runner.ts +0 -120
- package/tests/threads-browser-service-worker.ts +0 -116
- package/tests/threads-fdstat-admission.test.ts +0 -64
- package/tests/threads-fdstat-authority-worker.ts +0 -65
- package/tests/threads-fdstat-authority.test.ts +0 -81
- package/tests/threads-fdstat.test.ts +0 -304
- package/tests/threads-fixture-inspect.ts +0 -179
- package/tests/threads-fixture-producer.test.ts +0 -97
- package/tests/threads-guest-fixture.ts +0 -204
- package/tests/threads-guest-lane.test.ts +0 -64
- package/tests/threads-guest-memory.test.ts +0 -283
- package/tests/threads-guest-module.ts +0 -92
- package/tests/threads-guest-rust-runner.test.ts +0 -52
- package/tests/threads-guest-rust-runner.ts +0 -142
- package/tests/threads-guest-worker.ts +0 -50
- package/tests/threads-guest.test.ts +0 -280
- package/tests/threads-lifecycle-module.ts +0 -41
- package/tests/threads-lifecycle-waiter.ts +0 -38
- package/tests/threads-lifecycle.test.ts +0 -416
- package/tests/threads-memory-growth.test.ts +0 -188
- package/tests/threads-random-control.ts +0 -170
- package/tests/threads-random.test.ts +0 -23
- package/tests/threads-runtime-authority-worker.ts +0 -63
- package/tests/threads-runtime-browser-runner.ts +0 -96
- package/tests/threads-runtime-browser.ts +0 -483
- package/tests/threads-runtime-cases.ts +0 -21
- package/tests/threads-runtime-cleanup.test.ts +0 -58
- package/tests/threads-runtime-cleanup.ts +0 -42
- package/tests/threads-runtime-control.ts +0 -13
- package/tests/threads-runtime-failure-control.ts +0 -338
- package/tests/threads-runtime-failures.test.ts +0 -116
- package/tests/threads-runtime-fault-bootstrap.ts +0 -1
- package/tests/threads-runtime-fault-conditions.test.ts +0 -35
- package/tests/threads-runtime-fault-control.ts +0 -394
- package/tests/threads-runtime-fault-service.ts +0 -56
- package/tests/threads-runtime-fd-control.ts +0 -388
- package/tests/threads-runtime-fd-descriptors.test.ts +0 -43
- package/tests/threads-runtime-fd-filesystem.ts +0 -41
- package/tests/threads-runtime-fd-module.ts +0 -91
- package/tests/threads-runtime-fd-service.ts +0 -54
- package/tests/threads-runtime-host.ts +0 -19
- package/tests/threads-runtime-late-read-service.ts +0 -46
- package/tests/threads-runtime-modules.ts +0 -114
- package/tests/threads-runtime-safari-packet.ts +0 -285
- package/tests/threads-runtime-safari-runner.test.ts +0 -173
- package/tests/threads-runtime-safari-runner.ts +0 -270
- package/tests/threads-runtime-service-barrier.ts +0 -49
- package/tests/threads-runtime.test.ts +0 -143
- package/tests/threads-safari-runner.ts +0 -159
- package/tests/threads-service-edge.test.ts +0 -93
- package/tests/threads-service-fixture.ts +0 -117
- package/tests/threads-service-host.ts +0 -103
- package/tests/threads-service.test.ts +0 -305
- package/tests/threads-wait-owner.test.ts +0 -169
- package/tests/vfs-continuation.test.ts +0 -337
- package/tests/vfs-guest-buffer.test.ts +0 -31
- package/tests/vfs-harness.test.ts +0 -414
- package/tests/vfs.test.ts +0 -167
- package/tests/wasi-clocks.test.ts +0 -152
- package/tests/wasi-exit.test.ts +0 -74
- package/tests/wasi-libc.test.ts +0 -272
- package/tests/wasi-nonblock-inheritance.test.ts +0 -109
- package/tests/wasi-nonblock.test.ts +0 -181
- package/tests/wasi-path-memory.test.ts +0 -225
- package/tests/wasi-size-admission.test.ts +0 -227
- package/tests/wasm-start-section.test.ts +0 -39
- package/tests/watch-account.test.ts +0 -603
- package/tests/watch-admission.test.ts +0 -211
- package/tests/watch-committed.test.ts +0 -1068
- package/tests/watch-direct-worker.ts +0 -35
- package/tests/watch-registration-reap.test.ts +0 -129
- package/tests/watch-root-runtime.test.ts +0 -313
- package/tests/worker-access.test.ts +0 -331
- package/tests/worker-final-completion.test.ts +0 -434
- package/tests/worker-memory-bootstrap.test.ts +0 -219
- package/tests/worker-memory-broker.test.ts +0 -658
- package/tests/worker-memory.test.ts +0 -210
- package/tests/worker-pipes.test.ts +0 -993
- package/tests/worker-pool.test.ts +0 -88
- package/tests/worker-selected-signal.test.ts +0 -429
- package/tests/workspace-archive-pulls.test.ts +0 -501
- package/tests/workspace-archive.test.ts +0 -1281
- package/tests/workspace-browser.ts +0 -444
- package/tests/workspace-capacity.test.ts +0 -627
- package/tests/workspace-continuity-browser-runner.ts +0 -664
- package/tests/workspace-continuity-checkpoint.test.ts +0 -101
- package/tests/workspace-continuity.test.ts +0 -196
- package/tests/workspace-export-public.test.ts +0 -154
- package/tests/workspace-export.test.ts +0 -1709
- package/tests/workspace-import-admission.test.ts +0 -409
- package/tests/workspace-root-release.test.ts +0 -112
- package/tests/workspace-safari-browser.ts +0 -239
- package/tests/workspace-safari-guest.ts +0 -38
- package/tests/workspace-safari-local.ts +0 -33
- package/tests/workspace-safari-runner.test.ts +0 -298
- package/tests/workspace-search.test.ts +0 -892
- package/tests/workspace-vfs-read-browser.ts +0 -388
- package/tests/workspace-vfs-read-cold-lifecycle.test.ts +0 -236
- package/tests/workspace-vfs-read-cold-readiness.test.ts +0 -97
- package/tests/workspace-vfs-read-dirty.test.ts +0 -119
- package/tests/workspace-vfs-read-races.test.ts +0 -863
- package/tests/workspace-vfs-read-serials.test.ts +0 -124
- package/tests/workspace-vfs-read-shutdown.test.ts +0 -217
- package/tests/workspace-vfs-read-stream.test.ts +0 -878
- package/tests/workspace-vfs-read.test.ts +0 -758
- package/tests/workspace-vfs.test.ts +0 -785
- package/tooling/check-network-rust.ts +0 -59
- package/tooling/ci-paths.test.ts +0 -1636
- package/tooling/fixtures/page-runner-error-consumer.ts +0 -124
- package/tooling/gpu-coverage.ts +0 -177
- package/tooling/gpu-desktop-measure.ts +0 -100
- package/tooling/gpu-measure-host.ts +0 -59
- package/tooling/gpu-measure.ts +0 -512
- package/tooling/gpu-size.ts +0 -38
- package/tooling/gpu-stream-layout.ts +0 -268
- package/tooling/gpu-stream.ts +0 -951
- package/tooling/network-size.ts +0 -73
- package/tooling/network-source-smoke.ts +0 -86
- package/tooling/network-translator.test.ts +0 -117
- package/tooling/package-inputs.ts +0 -25
- package/tooling/prepare-allocation-reference.ts +0 -32
- package/tooling/private-authority.ts +0 -1431
- package/tooling/quality-probes.ts +0 -101
- package/tooling/runtime-size.ts +0 -42
- package/tooling/shared-reservations.ts +0 -57
- package/tooling/storage-crash-r2-mutations.ts +0 -59
- package/tooling/storage-crash-r2.ts +0 -89
- package/tooling/storage-quota-r2.ts +0 -141
- package/tooling/tarball-smoke.ts +0 -554
- package/tooling/typescript-source.test.ts +0 -38
- package/tooling/typescript-source.ts +0 -47
- package/tooling/vfs-benchmark.ts +0 -903
- package/tooling/vfs-browser.ts +0 -320
- package/tooling/vfs-continuation.ts +0 -313
- package/tooling/vfs-guest.ts +0 -235
- package/tooling/vfs-score-config.ts +0 -64
- package/tooling/vfs-score.ts +0 -406
- package/tooling/vfs-startup.ts +0 -21
- package/tooling/vfs-workloads.ts +0 -382
- package/tooling/workspace-safari-runner.ts +0 -313
- /package/dist/{tests → testing}/error-serialization.js +0 -0
- /package/dist/{tests → testing}/page-runner/bootstrap-diagnostics.js +0 -0
- /package/dist/{tests → testing}/page-runner/bootstrap-navigation.js +0 -0
- /package/dist/{tests → testing}/page-runner/browser-observation.js +0 -0
- /package/dist/{tests → testing}/page-runner/collector-fetch.js +0 -0
- /package/dist/{tests → testing}/page-runner/collector.js +0 -0
- /package/dist/{tests → testing}/page-runner/console-observation.js +0 -0
- /package/dist/{tests → testing}/page-runner/continuity-lock-diagnostic.js +0 -0
- /package/dist/{tests → testing}/page-runner/driver.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-bootstrap.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-collector.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-http-body.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-middleware.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-page.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-queue.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-trace.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework-validation.js +0 -0
- /package/dist/{tests → testing}/page-runner/framework.js +0 -0
- /package/dist/{tests → testing}/page-runner/inspector-endpoint-receipt.js +0 -0
- /package/dist/{tests → testing}/page-runner/inspector-endpoint.js +0 -0
- /package/dist/{tests → testing}/page-runner/inspector-plist.js +0 -0
- /package/dist/{tests → testing}/page-runner/inspector-stream.js +0 -0
- /package/dist/{tests → testing}/page-runner/owned-consumers.js +0 -0
- /package/dist/{tests → testing}/page-runner/protocol.js +0 -0
- /package/dist/{tests → testing}/page-runner/report-chunks.js +0 -0
- /package/dist/{tests → testing}/page-runner/report-control.js +0 -0
- /package/dist/{tests → testing}/page-runner/report-stream.js +0 -0
- /package/dist/{tests → testing}/page-runner/result-file.js +0 -0
- /package/dist/{tests → testing}/page-runner/safari-console.js +0 -0
- /package/dist/{tests → testing}/page-runner/safari-driver.js +0 -0
- /package/dist/{tests → testing}/page-runner/safari-observer.js +0 -0
- /package/dist/{tests → testing}/page-runner/service-worker-page.js +0 -0
- /package/dist/{tests → testing}/page-runner/stall-diagnostics.js +0 -0
- /package/{tests → testing}/browser-navigation.ts +0 -0
- /package/{tests → testing}/checkpoint-failure-browser.ts +0 -0
- /package/{tests → testing}/error-serialization.ts +0 -0
- /package/{tests → testing}/fixtures/file-times-storage.ts +0 -0
- /package/{tests → testing}/fixtures/file-times.ts +0 -0
- /package/{tests → testing}/fixtures/filesystem-host.ts +0 -0
- /package/{tests → testing}/fixtures/permissions-storage.ts +0 -0
- /package/{tests → testing}/fixtures/storage-lifecycle-fs-prelude.ts +0 -0
- /package/{tests → testing}/fixtures/storage-lifecycle-fs-worker.ts +0 -0
- /package/{tests → testing}/fixtures/workspace-recovery.ts +0 -0
- /package/{tests → testing}/gated-indexeddb.ts +0 -0
- /package/{tests → testing}/idle-workspace-browser.ts +0 -0
- /package/{tests → testing}/idle-workspace-cancellation-browser.ts +0 -0
- /package/{tests → testing}/idle-workspace-fixtures.ts +0 -0
- /package/{tests → testing}/idle-workspace-maintenance-browser.ts +0 -0
- /package/{tests → testing}/idle-workspace-metadata-browser.ts +0 -0
- /package/{tests → testing}/interrupt-browser-runner-control.ts +0 -0
- /package/{tests → testing}/opfs-qualification-browser.ts +0 -0
- /package/{tests → testing}/opfs-storage-browser.ts +0 -0
- /package/{tests → testing}/page-runner/asset-owner.ts +0 -0
- /package/{tests → testing}/page-runner/bootstrap-diagnostics.ts +0 -0
- /package/{tests → testing}/page-runner/bootstrap-navigation.ts +0 -0
- /package/{tests → testing}/page-runner/browser-observation.ts +0 -0
- /package/{tests → testing}/page-runner/collector-fetch.ts +0 -0
- /package/{tests → testing}/page-runner/collector.ts +0 -0
- /package/{tests → testing}/page-runner/console-observation.ts +0 -0
- /package/{tests → testing}/page-runner/consumer-page.ts +0 -0
- /package/{tests → testing}/page-runner/consumer.ts +0 -0
- /package/{tests → testing}/page-runner/continuity-lock-diagnostic.ts +0 -0
- /package/{tests → testing}/page-runner/fixture-owner.ts +0 -0
- /package/{tests → testing}/page-runner/framework-bootstrap-main.ts +0 -0
- /package/{tests → testing}/page-runner/framework-bootstrap.ts +0 -0
- /package/{tests → testing}/page-runner/framework-collector.ts +0 -0
- /package/{tests → testing}/page-runner/framework-http-body.ts +0 -0
- /package/{tests → testing}/page-runner/framework-middleware.ts +0 -0
- /package/{tests → testing}/page-runner/framework-page.ts +0 -0
- /package/{tests → testing}/page-runner/framework-queue.ts +0 -0
- /package/{tests → testing}/page-runner/framework-trace-page.ts +0 -0
- /package/{tests → testing}/page-runner/framework-trace.ts +0 -0
- /package/{tests → testing}/page-runner/framework-types.ts +0 -0
- /package/{tests → testing}/page-runner/framework-validation.ts +0 -0
- /package/{tests → testing}/page-runner/framework.ts +0 -0
- /package/{tests → testing}/page-runner/host-drive.ts +0 -0
- /package/{tests → testing}/page-runner/host-page.ts +0 -0
- /package/{tests → testing}/page-runner/inspector-endpoint-receipt.ts +0 -0
- /package/{tests → testing}/page-runner/inspector-endpoint.ts +0 -0
- /package/{tests → testing}/page-runner/inspector-plist.ts +0 -0
- /package/{tests → testing}/page-runner/inspector-stream.ts +0 -0
- /package/{tests → testing}/page-runner/json-snapshot.ts +0 -0
- /package/{tests → testing}/page-runner/native.ts +0 -0
- /package/{tests → testing}/page-runner/ordered-reporter.ts +0 -0
- /package/{tests → testing}/page-runner/owned-consumers.ts +0 -0
- /package/{tests → testing}/page-runner/page-main.ts +0 -0
- /package/{tests → testing}/page-runner/playwright-observer.ts +0 -0
- /package/{tests → testing}/page-runner/protocol.ts +0 -0
- /package/{tests → testing}/page-runner/report-chunks.ts +0 -0
- /package/{tests → testing}/page-runner/report-control.ts +0 -0
- /package/{tests → testing}/page-runner/report-stream.ts +0 -0
- /package/{tests → testing}/page-runner/reporter.ts +0 -0
- /package/{tests → testing}/page-runner/result-file.ts +0 -0
- /package/{tests → testing}/page-runner/safari-console.ts +0 -0
- /package/{tests → testing}/page-runner/safari-driver.ts +0 -0
- /package/{tests → testing}/page-runner/safari-observer.ts +0 -0
- /package/{tests → testing}/page-runner/service-worker-page.ts +0 -0
- /package/{tests → testing}/page-runner/stall-diagnostics.ts +0 -0
- /package/{tests → testing}/page-runner/storage-cleanup.ts +0 -0
- /package/{tests → testing}/page-runner/storage-host.ts +0 -0
- /package/{tests → testing}/page-runner/storage-page.ts +0 -0
- /package/{tests → testing}/page-runner/storage-policy.ts +0 -0
- /package/{tests → testing}/page-runner/storage-worker.ts +0 -0
- /package/{tests → testing}/process-recycling-browser-runner-control.ts +0 -0
- /package/{tests → testing}/runtime-startup-proof.ts +0 -0
- /package/{tests → testing}/storage-allocation.ts +0 -0
- /package/{tests → testing}/storage-browser-helpers.ts +0 -0
- /package/{tests → testing}/storage-browser-runner.ts +0 -0
- /package/{tests → testing}/storage-browser.ts +0 -0
- /package/{tests → testing}/storage-lifecycle-marker.ts +0 -0
- /package/{tests → testing}/storage-lifecycle-observer.ts +0 -0
- /package/{tests → testing}/storage-navigation-diagnostics.ts +0 -0
- /package/{tests → testing}/storage-open-worker.ts +0 -0
- /package/{tests → testing}/storage-quota-control.ts +0 -0
- /package/{tests → testing}/storage-release-browser.ts +0 -0
|
@@ -1,1224 +0,0 @@
|
|
|
1
|
-
import { IdentityAllocator } from "../fs/file-identity.js";
|
|
2
|
-
import { storedTimes } from "./fixtures/file-times.js";
|
|
3
|
-
import {
|
|
4
|
-
checkpointDecodeControl,
|
|
5
|
-
type StagingDatabaseName,
|
|
6
|
-
} from "./indexeddb-checkpoint-decode-browser.js";
|
|
7
|
-
import {
|
|
8
|
-
PublicationDomain,
|
|
9
|
-
createPublicationBuffers,
|
|
10
|
-
snapshotPublicationCheckpoint,
|
|
11
|
-
} from "../fs/publication.js";
|
|
12
|
-
import { IndexedDBStorage } from "../fs/indexeddb.js";
|
|
13
|
-
import { getVfsDescriptor, VfsError } from "../fs/vfs.js";
|
|
14
|
-
import {
|
|
15
|
-
StagedCommitDriver,
|
|
16
|
-
StagingCapacity,
|
|
17
|
-
STAGED_FORMAT,
|
|
18
|
-
decodeCommit,
|
|
19
|
-
encodeCommit,
|
|
20
|
-
operationKey,
|
|
21
|
-
prepareDurableGroup,
|
|
22
|
-
lookupReceipt,
|
|
23
|
-
type CommittedStorage,
|
|
24
|
-
type CompleteStage,
|
|
25
|
-
type DurableReceipt,
|
|
26
|
-
type NativeOutcome,
|
|
27
|
-
type StagingOutcome,
|
|
28
|
-
} from "../fs/safe-staging.js";
|
|
29
|
-
import {
|
|
30
|
-
decodeRecord,
|
|
31
|
-
encodeRecord,
|
|
32
|
-
type CheckpointPublication,
|
|
33
|
-
type PersistenceBatch,
|
|
34
|
-
} from "../fs/storage.js";
|
|
35
|
-
|
|
36
|
-
function assert(value: unknown, message: string): asserts value {
|
|
37
|
-
if (!value) throw new Error(message);
|
|
38
|
-
}
|
|
39
|
-
const bytes = (value: string) => new TextEncoder().encode(value);
|
|
40
|
-
const request = { digest: "a".repeat(64), length: 1 };
|
|
41
|
-
function batch(generation: number, text = `v${generation}`): PersistenceBatch {
|
|
42
|
-
return {
|
|
43
|
-
generation,
|
|
44
|
-
root: 1,
|
|
45
|
-
removes: [],
|
|
46
|
-
upserts: [
|
|
47
|
-
{
|
|
48
|
-
ino: 1,
|
|
49
|
-
kind: "dir",
|
|
50
|
-
size: 0,
|
|
51
|
-
...storedTimes(generation),
|
|
52
|
-
children: [
|
|
53
|
-
["a", 2],
|
|
54
|
-
["b", 3],
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
ino: 2,
|
|
59
|
-
kind: "file",
|
|
60
|
-
size: text.length,
|
|
61
|
-
...storedTimes(generation),
|
|
62
|
-
data: `a:${generation}`,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
ino: 3,
|
|
66
|
-
kind: "file",
|
|
67
|
-
size: text.length,
|
|
68
|
-
...storedTimes(generation),
|
|
69
|
-
data: `b:${generation}`,
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
data: new Map([
|
|
73
|
-
[`a:${generation}`, bytes(text)],
|
|
74
|
-
[`b:${generation}`, bytes(text)],
|
|
75
|
-
]),
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function stage(
|
|
79
|
-
generation: number,
|
|
80
|
-
publish: (receipt: DurableReceipt) => void = () => {},
|
|
81
|
-
): CompleteStage {
|
|
82
|
-
return {
|
|
83
|
-
batch: batch(generation),
|
|
84
|
-
cut: { history: "original-cut", generation },
|
|
85
|
-
result: { kind: "append", written: 1, offset: generation + 7 },
|
|
86
|
-
retained: [],
|
|
87
|
-
orphans: [],
|
|
88
|
-
publish,
|
|
89
|
-
release() {},
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
async function group(storage: CommittedStorage, generation: number, selected = stage(generation)) {
|
|
93
|
-
return prepareDurableGroup(
|
|
94
|
-
await storage.recoverCommitted(),
|
|
95
|
-
operationKey(1n, BigInt(generation)),
|
|
96
|
-
request,
|
|
97
|
-
selected,
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
async function commit(
|
|
101
|
-
storage: CommittedStorage,
|
|
102
|
-
generation: number,
|
|
103
|
-
selected?: CompleteStage,
|
|
104
|
-
): Promise<DurableReceipt> {
|
|
105
|
-
const outcome = await storage.beginCommit(await group(storage, generation, selected)).terminal;
|
|
106
|
-
assert(outcome.kind === "committed", "complete group commits");
|
|
107
|
-
return outcome.receipt;
|
|
108
|
-
}
|
|
109
|
-
function idbRequest<T>(request: IDBRequest<T>): Promise<T> {
|
|
110
|
-
return new Promise((resolve, reject) => {
|
|
111
|
-
request.onsuccess = () => resolve(request.result);
|
|
112
|
-
request.onerror = () => reject(request.error);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
async function raw<T>(name: string, work: (database: IDBDatabase) => Promise<T>): Promise<T> {
|
|
116
|
-
const database = await idbRequest(indexedDB.open(name));
|
|
117
|
-
try {
|
|
118
|
-
return await work(database);
|
|
119
|
-
} finally {
|
|
120
|
-
database.close();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
async function readRaw(name: string, store: string, key: IDBValidKey): Promise<unknown> {
|
|
124
|
-
return raw(name, (db) => idbRequest(db.transaction(store).objectStore(store).get(key)));
|
|
125
|
-
}
|
|
126
|
-
async function change(
|
|
127
|
-
name: string,
|
|
128
|
-
store: string,
|
|
129
|
-
key: IDBValidKey,
|
|
130
|
-
value?: unknown,
|
|
131
|
-
): Promise<void> {
|
|
132
|
-
await raw(
|
|
133
|
-
name,
|
|
134
|
-
(db) =>
|
|
135
|
-
new Promise<void>((resolve, reject) => {
|
|
136
|
-
const tx = db.transaction(store, "readwrite", { durability: "strict" });
|
|
137
|
-
if (value === undefined) tx.objectStore(store).delete(key);
|
|
138
|
-
else tx.objectStore(store).put(value, key);
|
|
139
|
-
tx.oncomplete = () => resolve();
|
|
140
|
-
tx.onabort = () => reject(tx.error);
|
|
141
|
-
}),
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
async function formatFailure(action: Promise<unknown>): Promise<void> {
|
|
145
|
-
try {
|
|
146
|
-
await action;
|
|
147
|
-
} catch (error) {
|
|
148
|
-
assert(
|
|
149
|
-
error instanceof VfsError && error.code === "INVALID_VFS_FORMAT",
|
|
150
|
-
`format failure, got ${error}`,
|
|
151
|
-
);
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
throw new Error("Expected fail-closed required-head recovery");
|
|
155
|
-
}
|
|
156
|
-
function invokeTerminal(
|
|
157
|
-
callback: IDBTransaction["oncomplete"],
|
|
158
|
-
transaction: IDBTransaction,
|
|
159
|
-
event: Event,
|
|
160
|
-
): () => void {
|
|
161
|
-
return () => callback?.call(transaction, event);
|
|
162
|
-
}
|
|
163
|
-
function equal(actual: number, expected: number): boolean {
|
|
164
|
-
return actual === expected;
|
|
165
|
-
}
|
|
166
|
-
function terminalGate(kind: "complete" | "abort") {
|
|
167
|
-
const descriptor = Object.getOwnPropertyDescriptor(IDBTransaction.prototype, `on${kind}`)!;
|
|
168
|
-
const seen = Promise.withResolvers<void>();
|
|
169
|
-
let delivery: (() => void) | undefined;
|
|
170
|
-
Object.defineProperty(IDBTransaction.prototype, `on${kind}`, {
|
|
171
|
-
...descriptor,
|
|
172
|
-
set(callback: IDBTransaction["oncomplete"]) {
|
|
173
|
-
if (this.mode !== "readwrite" || !this.objectStoreNames.contains("journal")) {
|
|
174
|
-
descriptor.set!.call(this, callback);
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
descriptor.set!.call(this, (event: Event) => {
|
|
178
|
-
delivery = invokeTerminal(callback, this, event);
|
|
179
|
-
seen.resolve();
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
});
|
|
183
|
-
return {
|
|
184
|
-
seen: seen.promise,
|
|
185
|
-
release() {
|
|
186
|
-
delivery?.();
|
|
187
|
-
},
|
|
188
|
-
restore() {
|
|
189
|
-
Object.defineProperty(IDBTransaction.prototype, `on${kind}`, descriptor);
|
|
190
|
-
},
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
function failureOnReceipt(cause: unknown) {
|
|
194
|
-
const original = IDBObjectStore.prototype.put;
|
|
195
|
-
let payloadPuts = 0;
|
|
196
|
-
IDBObjectStore.prototype.put = function (value: unknown, key?: IDBValidKey) {
|
|
197
|
-
if (this.name === "data") payloadPuts++;
|
|
198
|
-
if (this.name === "metadata" && key === "commit") throw cause;
|
|
199
|
-
return original.call(this, value, key);
|
|
200
|
-
};
|
|
201
|
-
return {
|
|
202
|
-
get payloadPuts() {
|
|
203
|
-
return payloadPuts;
|
|
204
|
-
},
|
|
205
|
-
restore() {
|
|
206
|
-
IDBObjectStore.prototype.put = original;
|
|
207
|
-
},
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
async function fixture(
|
|
211
|
-
run: (
|
|
212
|
-
name: string,
|
|
213
|
-
open: () => Promise<CommittedStorage>,
|
|
214
|
-
databaseName?: StagingDatabaseName,
|
|
215
|
-
) => Promise<void>,
|
|
216
|
-
databaseName?: StagingDatabaseName,
|
|
217
|
-
): Promise<void> {
|
|
218
|
-
const name = databaseName
|
|
219
|
-
? await databaseName("waffle-staged-test")
|
|
220
|
-
: `waffle-staged-test-${crypto.randomUUID()}`,
|
|
221
|
-
stores: CommittedStorage[] = [];
|
|
222
|
-
const open = async () => {
|
|
223
|
-
const storage = await IndexedDBStorage.openCommitted(name, { compactEvery: 1 });
|
|
224
|
-
stores.push(storage);
|
|
225
|
-
return storage;
|
|
226
|
-
};
|
|
227
|
-
try {
|
|
228
|
-
await run(name, open, databaseName);
|
|
229
|
-
} finally {
|
|
230
|
-
for (const storage of stores) await storage.close();
|
|
231
|
-
await idbRequest(indexedDB.deleteDatabase(name));
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
async function abortAtomic(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
235
|
-
const storage = await open();
|
|
236
|
-
await commit(storage, 1);
|
|
237
|
-
const prepared = await group(storage, 2),
|
|
238
|
-
cause = { exact: "quota sentinel" };
|
|
239
|
-
const gate = terminalGate("abort"),
|
|
240
|
-
injection = failureOnReceipt(cause);
|
|
241
|
-
let outcome: NativeOutcome | undefined;
|
|
242
|
-
let closing = false;
|
|
243
|
-
try {
|
|
244
|
-
const pending = storage.beginCommit(prepared).terminal.then((value) => {
|
|
245
|
-
outcome = value;
|
|
246
|
-
return value;
|
|
247
|
-
});
|
|
248
|
-
await gate.seen;
|
|
249
|
-
const close = storage.close().then(() => {
|
|
250
|
-
closing = true;
|
|
251
|
-
});
|
|
252
|
-
await Promise.resolve();
|
|
253
|
-
assert(
|
|
254
|
-
!outcome && !closing && injection.payloadPuts === 4,
|
|
255
|
-
"abort requests keep native and close debt after four actual payload puts",
|
|
256
|
-
);
|
|
257
|
-
gate.release();
|
|
258
|
-
const terminal = await pending;
|
|
259
|
-
await close;
|
|
260
|
-
assert(
|
|
261
|
-
terminal.kind === "aborted" && terminal.cause === cause,
|
|
262
|
-
"native abort preserves exact cause",
|
|
263
|
-
);
|
|
264
|
-
} finally {
|
|
265
|
-
gate.release();
|
|
266
|
-
gate.restore();
|
|
267
|
-
injection.restore();
|
|
268
|
-
}
|
|
269
|
-
const reopened = await open(),
|
|
270
|
-
recovered = await reopened.recoverCommitted();
|
|
271
|
-
assert(
|
|
272
|
-
recovered.index?.generation === 1 && recovered.envelope.head.sequence === 1n,
|
|
273
|
-
"root and receipt both rolled back",
|
|
274
|
-
);
|
|
275
|
-
assert(
|
|
276
|
-
(await readRaw(name, "data", "a:2")) === undefined &&
|
|
277
|
-
(await readRaw(name, "data", "b:2")) === undefined,
|
|
278
|
-
"both new payloads rolled back",
|
|
279
|
-
);
|
|
280
|
-
}
|
|
281
|
-
async function nullAbortCauses(
|
|
282
|
-
_name: string,
|
|
283
|
-
open: () => Promise<CommittedStorage>,
|
|
284
|
-
): Promise<void> {
|
|
285
|
-
const storage = await open();
|
|
286
|
-
await commit(storage, 1);
|
|
287
|
-
for (const cause of [undefined, null]) {
|
|
288
|
-
const prepared = await group(storage, 2),
|
|
289
|
-
injection = failureOnReceipt(cause);
|
|
290
|
-
try {
|
|
291
|
-
const outcome = await storage.beginCommit(prepared).terminal;
|
|
292
|
-
assert(
|
|
293
|
-
outcome.kind === "aborted" && outcome.cause === cause,
|
|
294
|
-
"explicit nullish throw stays exact",
|
|
295
|
-
);
|
|
296
|
-
} finally {
|
|
297
|
-
injection.restore();
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
async function nativeAbortRequest(
|
|
302
|
-
_name: string,
|
|
303
|
-
open: () => Promise<CommittedStorage>,
|
|
304
|
-
): Promise<void> {
|
|
305
|
-
const storage = await open();
|
|
306
|
-
await commit(storage, 1);
|
|
307
|
-
const prepared = await group(storage, 2),
|
|
308
|
-
gate = terminalGate("abort");
|
|
309
|
-
const original = IDBObjectStore.prototype.put;
|
|
310
|
-
let handle: ReturnType<CommittedStorage["beginCommit"]> | undefined;
|
|
311
|
-
let settled = false;
|
|
312
|
-
IDBObjectStore.prototype.put = function (value: unknown, key?: IDBValidKey) {
|
|
313
|
-
const result = original.call(this, value, key);
|
|
314
|
-
if (this.name === "metadata" && key === "commit") handle?.requestAbort();
|
|
315
|
-
return result;
|
|
316
|
-
};
|
|
317
|
-
try {
|
|
318
|
-
handle = storage.beginCommit(prepared);
|
|
319
|
-
const terminal = handle.terminal.then((value) => {
|
|
320
|
-
settled = true;
|
|
321
|
-
return value;
|
|
322
|
-
});
|
|
323
|
-
await gate.seen;
|
|
324
|
-
assert(!settled, "requestAbort cannot settle before native abort event delivery");
|
|
325
|
-
gate.release();
|
|
326
|
-
const outcome = await terminal;
|
|
327
|
-
assert(
|
|
328
|
-
outcome.kind === "aborted" &&
|
|
329
|
-
outcome.cause instanceof DOMException &&
|
|
330
|
-
outcome.cause.name === "AbortError",
|
|
331
|
-
"native abort request returns AbortError",
|
|
332
|
-
);
|
|
333
|
-
assert(
|
|
334
|
-
(await storage.recoverCommitted()).envelope.head.sequence === 1n,
|
|
335
|
-
"native abort keeps prior receipt head",
|
|
336
|
-
);
|
|
337
|
-
} finally {
|
|
338
|
-
gate.release();
|
|
339
|
-
gate.restore();
|
|
340
|
-
IDBObjectStore.prototype.put = original;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
async function commitBeforeReply(
|
|
344
|
-
name: string,
|
|
345
|
-
open: () => Promise<CommittedStorage>,
|
|
346
|
-
): Promise<void> {
|
|
347
|
-
const storage = await open(),
|
|
348
|
-
driver = await StagedCommitDriver.open(storage);
|
|
349
|
-
const gate = terminalGate("complete"),
|
|
350
|
-
observer = new AbortController(),
|
|
351
|
-
lost = { exact: "reply lost" };
|
|
352
|
-
let publishes = 0,
|
|
353
|
-
releases = 0,
|
|
354
|
-
drained = false;
|
|
355
|
-
try {
|
|
356
|
-
const selected = stage(1, () => {
|
|
357
|
-
publishes++;
|
|
358
|
-
throw lost;
|
|
359
|
-
});
|
|
360
|
-
const observed = driver.submit({
|
|
361
|
-
key: operationKey(1n, 1n),
|
|
362
|
-
request,
|
|
363
|
-
charge: { inputBytes: 1, payloadBytes: 4, metadataBytes: 4096, publicationBytes: 64 },
|
|
364
|
-
signal: observer.signal,
|
|
365
|
-
async prepare() {
|
|
366
|
-
return {
|
|
367
|
-
...selected,
|
|
368
|
-
release() {
|
|
369
|
-
releases++;
|
|
370
|
-
},
|
|
371
|
-
};
|
|
372
|
-
},
|
|
373
|
-
});
|
|
374
|
-
await gate.seen;
|
|
375
|
-
const duplicate = driver.submit({
|
|
376
|
-
key: operationKey(1n, 1n),
|
|
377
|
-
request,
|
|
378
|
-
charge: { inputBytes: 0, payloadBytes: 0, metadataBytes: 0, publicationBytes: 0 },
|
|
379
|
-
async prepare() {
|
|
380
|
-
throw new Error("pending duplicate cannot stage");
|
|
381
|
-
},
|
|
382
|
-
});
|
|
383
|
-
const refused = await driver.submit({
|
|
384
|
-
key: operationKey(1n, 2n),
|
|
385
|
-
request,
|
|
386
|
-
charge: { inputBytes: 0, payloadBytes: 0, metadataBytes: 0, publicationBytes: 0 },
|
|
387
|
-
async prepare() {
|
|
388
|
-
throw new Error("busy driver cannot queue input");
|
|
389
|
-
},
|
|
390
|
-
});
|
|
391
|
-
assert(refused.kind === "not-admitted", "busy driver refuses another complete group");
|
|
392
|
-
assert(
|
|
393
|
-
(await readRaw(name, "metadata", "active")) === 1,
|
|
394
|
-
"real database has committed before terminal delivery",
|
|
395
|
-
);
|
|
396
|
-
const durable = await decodeCommit(await readRaw(name, "metadata", "commit"));
|
|
397
|
-
assert(
|
|
398
|
-
durable.head.sequence === 1n &&
|
|
399
|
-
lookupReceipt(durable, operationKey(1n, 1n), request).kind === "retained",
|
|
400
|
-
"receipt and required head are durable before reply",
|
|
401
|
-
);
|
|
402
|
-
const debt = driver.resources();
|
|
403
|
-
assert(
|
|
404
|
-
debt.nativeDebt === 1 && debt.debtBytes >= 4 * 6 && publishes === 0,
|
|
405
|
-
"ACK and reserved publication wait for native complete delivery",
|
|
406
|
-
);
|
|
407
|
-
observer.abort(lost);
|
|
408
|
-
const observedOutcome = await observed;
|
|
409
|
-
assert(
|
|
410
|
-
observedOutcome.kind === "indeterminate" && observedOutcome.cause === lost,
|
|
411
|
-
"cancelled observer is not native abort",
|
|
412
|
-
);
|
|
413
|
-
const drain = driver.drain().then(
|
|
414
|
-
() => {
|
|
415
|
-
drained = true;
|
|
416
|
-
},
|
|
417
|
-
(error: unknown) => {
|
|
418
|
-
assert(error === lost, "publish error stays exact");
|
|
419
|
-
drained = true;
|
|
420
|
-
},
|
|
421
|
-
);
|
|
422
|
-
await Promise.resolve();
|
|
423
|
-
assert(
|
|
424
|
-
!drained && releases === 0 && driver.resources().nativeDebt === 1,
|
|
425
|
-
"observer cannot free native stage debt",
|
|
426
|
-
);
|
|
427
|
-
gate.release();
|
|
428
|
-
await drain;
|
|
429
|
-
const joined = await duplicate;
|
|
430
|
-
assert(
|
|
431
|
-
joined.kind === "indeterminate" && joined.cause === lost,
|
|
432
|
-
"pending duplicate joins exact terminal outcome",
|
|
433
|
-
);
|
|
434
|
-
assert(
|
|
435
|
-
equal(publishes, 1) &&
|
|
436
|
-
equal(releases, 1) &&
|
|
437
|
-
driver.resources().state === "stopped" &&
|
|
438
|
-
driver.resources().debtBytes === 0,
|
|
439
|
-
"post-commit publish failure stops root without rollback",
|
|
440
|
-
);
|
|
441
|
-
} finally {
|
|
442
|
-
gate.release();
|
|
443
|
-
gate.restore();
|
|
444
|
-
}
|
|
445
|
-
await storage.close();
|
|
446
|
-
const reopened = await open(),
|
|
447
|
-
fresh = await StagedCommitDriver.open(reopened);
|
|
448
|
-
const replay = await fresh.submit({
|
|
449
|
-
key: operationKey(1n, 1n),
|
|
450
|
-
request,
|
|
451
|
-
charge: { inputBytes: 0, payloadBytes: 0, metadataBytes: 0, publicationBytes: 0 },
|
|
452
|
-
async prepare() {
|
|
453
|
-
throw new Error("replay must not run producer");
|
|
454
|
-
},
|
|
455
|
-
});
|
|
456
|
-
assert(
|
|
457
|
-
replay.kind === "committed" &&
|
|
458
|
-
replay.receipt.result.kind === "append" &&
|
|
459
|
-
replay.receipt.result.offset === 8 &&
|
|
460
|
-
replay.receipt.cut.history === "original-cut",
|
|
461
|
-
"reopen returns exact result and original cut",
|
|
462
|
-
);
|
|
463
|
-
assert(
|
|
464
|
-
(await reopened.recoverCommitted()).envelope.head.sequence === 1n,
|
|
465
|
-
"replay never executes a second append",
|
|
466
|
-
);
|
|
467
|
-
}
|
|
468
|
-
async function postCommitInstallFailure(
|
|
469
|
-
name: string,
|
|
470
|
-
open: () => Promise<CommittedStorage>,
|
|
471
|
-
): Promise<void> {
|
|
472
|
-
const storage = await open();
|
|
473
|
-
await commit(storage, 1);
|
|
474
|
-
const prepared = await group(storage, 2),
|
|
475
|
-
install = { exact: "adapter install" },
|
|
476
|
-
observed = { exact: "ownership observer" };
|
|
477
|
-
let notified = 0;
|
|
478
|
-
Object.defineProperty(storage, "installCommit", {
|
|
479
|
-
configurable: true,
|
|
480
|
-
value() {
|
|
481
|
-
throw install;
|
|
482
|
-
},
|
|
483
|
-
});
|
|
484
|
-
Object.defineProperty(storage, "onOwnershipLost", {
|
|
485
|
-
configurable: true,
|
|
486
|
-
value() {
|
|
487
|
-
notified++;
|
|
488
|
-
throw observed;
|
|
489
|
-
},
|
|
490
|
-
});
|
|
491
|
-
const outcome = await storage.beginCommit(prepared).terminal;
|
|
492
|
-
assert(
|
|
493
|
-
outcome.kind === "committed" && outcome.receipt.commit === 2n && equal(notified, 1),
|
|
494
|
-
"adapter install and ownership observer errors cannot relabel native commit",
|
|
495
|
-
);
|
|
496
|
-
let stopped = false;
|
|
497
|
-
try {
|
|
498
|
-
await storage.recoverCommitted();
|
|
499
|
-
} catch (error) {
|
|
500
|
-
stopped = String(error).includes("another tab");
|
|
501
|
-
}
|
|
502
|
-
assert(stopped, "failed adapter memory reconciliation stops authority");
|
|
503
|
-
await storage.close();
|
|
504
|
-
const reopened = await open();
|
|
505
|
-
assert(
|
|
506
|
-
(await reopened.recoverCommitted()).envelope.head.sequence === 2n &&
|
|
507
|
-
(await readRaw(name, "metadata", "active")) === 2,
|
|
508
|
-
"native commit survives adapter memory failure and reopen",
|
|
509
|
-
);
|
|
510
|
-
}
|
|
511
|
-
async function preNativeCancellation(
|
|
512
|
-
name: string,
|
|
513
|
-
open: () => Promise<CommittedStorage>,
|
|
514
|
-
): Promise<void> {
|
|
515
|
-
const storage = await open(),
|
|
516
|
-
driver = await StagedCommitDriver.open(storage);
|
|
517
|
-
const started = Promise.withResolvers<void>(),
|
|
518
|
-
resume = Promise.withResolvers<void>();
|
|
519
|
-
const observer = new AbortController(),
|
|
520
|
-
cause = { exact: "cancel during staging" };
|
|
521
|
-
let released = 0,
|
|
522
|
-
published = 0;
|
|
523
|
-
const observed = driver.submit({
|
|
524
|
-
key: operationKey(1n, 1n),
|
|
525
|
-
request,
|
|
526
|
-
signal: observer.signal,
|
|
527
|
-
charge: { inputBytes: 1, payloadBytes: 4, metadataBytes: 4096, publicationBytes: 64 },
|
|
528
|
-
async prepare() {
|
|
529
|
-
started.resolve();
|
|
530
|
-
await resume.promise;
|
|
531
|
-
return {
|
|
532
|
-
...stage(1, () => {
|
|
533
|
-
published++;
|
|
534
|
-
}),
|
|
535
|
-
release() {
|
|
536
|
-
released++;
|
|
537
|
-
},
|
|
538
|
-
};
|
|
539
|
-
},
|
|
540
|
-
});
|
|
541
|
-
await started.promise;
|
|
542
|
-
observer.abort(cause);
|
|
543
|
-
const outcome = await observed;
|
|
544
|
-
assert(
|
|
545
|
-
outcome.kind === "indeterminate" && outcome.cause === cause && driver.resources().debtBytes > 0,
|
|
546
|
-
"staging cancellation retains producer debt",
|
|
547
|
-
);
|
|
548
|
-
resume.resolve();
|
|
549
|
-
await driver.drain();
|
|
550
|
-
assert(
|
|
551
|
-
equal(released, 1) && published === 0 && driver.resources().debtBytes === 0,
|
|
552
|
-
"cancelled private stage releases without publication",
|
|
553
|
-
);
|
|
554
|
-
assert(
|
|
555
|
-
(await storage.recoverCommitted()).envelope.head.sequence === 0n &&
|
|
556
|
-
(await readRaw(name, "metadata", "active")) === undefined,
|
|
557
|
-
"pre-native cancellation leaves genesis unchanged",
|
|
558
|
-
);
|
|
559
|
-
}
|
|
560
|
-
async function requiredHead(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
561
|
-
const storage = await open();
|
|
562
|
-
await commit(storage, 1);
|
|
563
|
-
await commit(storage, 2);
|
|
564
|
-
await storage.close();
|
|
565
|
-
const before = await readRaw(name, "metadata", "commit");
|
|
566
|
-
await change(name, "metadata", 1, { json: "corrupt", checksum: "bad" });
|
|
567
|
-
const exact = await open();
|
|
568
|
-
assert(
|
|
569
|
-
(await exact.recoverCommitted()).index?.generation === 2,
|
|
570
|
-
"journal can reconstruct exact required head",
|
|
571
|
-
);
|
|
572
|
-
await exact.close();
|
|
573
|
-
await change(name, "journal", 2, { json: "corrupt", checksum: "bad" });
|
|
574
|
-
await formatFailure(open());
|
|
575
|
-
const after = await readRaw(name, "metadata", "commit");
|
|
576
|
-
assert(
|
|
577
|
-
JSON.stringify(before) === JSON.stringify(after) &&
|
|
578
|
-
(await readRaw(name, "data", "a:2")) !== undefined,
|
|
579
|
-
"corrupt required root preserves database and receipt",
|
|
580
|
-
);
|
|
581
|
-
}
|
|
582
|
-
async function headFence(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
583
|
-
const storage = await open();
|
|
584
|
-
await commit(storage, 1);
|
|
585
|
-
const prepared = await group(storage, 2),
|
|
586
|
-
original = await readRaw(name, "metadata", "commit");
|
|
587
|
-
const forged = await decodeCommit(original);
|
|
588
|
-
await change(
|
|
589
|
-
name,
|
|
590
|
-
"metadata",
|
|
591
|
-
"commit",
|
|
592
|
-
await encodeCommit({ ...forged, head: { ...forged.head, workspace: "other-authority" } }),
|
|
593
|
-
);
|
|
594
|
-
const failed = await storage.beginCommit(prepared).terminal;
|
|
595
|
-
assert(
|
|
596
|
-
failed.kind === "aborted" && String(failed.cause).includes("head changed"),
|
|
597
|
-
"expected-head compares inside native transaction",
|
|
598
|
-
);
|
|
599
|
-
assert((await readRaw(name, "data", "a:2")) === undefined, "head mismatch rolls data back");
|
|
600
|
-
await change(name, "metadata", "commit", original);
|
|
601
|
-
const recovery = await storage.recoverCommitted();
|
|
602
|
-
await change(name, "metadata", "epoch", recovery.epoch + 1);
|
|
603
|
-
const stale = await storage.beginCommit(prepared).terminal;
|
|
604
|
-
assert(
|
|
605
|
-
stale.kind === "aborted" && String(stale.cause).includes("another tab"),
|
|
606
|
-
"native epoch fence rejects stale authority",
|
|
607
|
-
);
|
|
608
|
-
}
|
|
609
|
-
async function retainedRoots(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
610
|
-
const storage = await open(),
|
|
611
|
-
first = stage(1);
|
|
612
|
-
first.batch.data.set("orphan", bytes("kept"));
|
|
613
|
-
await commit(storage, 1, {
|
|
614
|
-
...first,
|
|
615
|
-
orphans: [{ key: "orphan", size: 4 }],
|
|
616
|
-
retained: [{ key: "orphan", size: 4 }],
|
|
617
|
-
});
|
|
618
|
-
await commit(storage, 2, { ...stage(2), orphans: [] });
|
|
619
|
-
await commit(storage, 3);
|
|
620
|
-
assert(
|
|
621
|
-
new TextDecoder().decode(await storage.read("orphan")) === "kept",
|
|
622
|
-
"retained outcome payload survives compaction without runtime pins",
|
|
623
|
-
);
|
|
624
|
-
await storage.close();
|
|
625
|
-
const reopened = await open();
|
|
626
|
-
assert(
|
|
627
|
-
new TextDecoder().decode(await reopened.read("orphan")) === "kept",
|
|
628
|
-
"receipt payload recovers outside reachable namespace",
|
|
629
|
-
);
|
|
630
|
-
await change(name, "data", "orphan");
|
|
631
|
-
await reopened.close();
|
|
632
|
-
await formatFailure(open());
|
|
633
|
-
}
|
|
634
|
-
async function formatIsolation(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
635
|
-
const storage = await open();
|
|
636
|
-
await storage.close();
|
|
637
|
-
assert((await readRaw(name, "metadata", "format")) === STAGED_FORMAT, "private marker installed");
|
|
638
|
-
const fast = await IndexedDBStorage.open(name);
|
|
639
|
-
try {
|
|
640
|
-
await formatFailure(fast.load());
|
|
641
|
-
} finally {
|
|
642
|
-
await fast.close();
|
|
643
|
-
}
|
|
644
|
-
await change(name, "metadata", "format", "waffle-indexeddb-chunks-v2");
|
|
645
|
-
await formatFailure(open());
|
|
646
|
-
try {
|
|
647
|
-
getVfsDescriptor("safe");
|
|
648
|
-
} catch (error) {
|
|
649
|
-
assert(
|
|
650
|
-
error instanceof VfsError && error.code === "UNSUPPORTED_VFS",
|
|
651
|
-
"SAFE remains unsupported",
|
|
652
|
-
);
|
|
653
|
-
return;
|
|
654
|
-
}
|
|
655
|
-
throw new Error("SAFE unexpectedly supported");
|
|
656
|
-
}
|
|
657
|
-
async function missingEnvelope(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
658
|
-
const storage = await open();
|
|
659
|
-
await commit(storage, 1);
|
|
660
|
-
await storage.close();
|
|
661
|
-
await change(name, "metadata", "commit");
|
|
662
|
-
await formatFailure(open());
|
|
663
|
-
assert(
|
|
664
|
-
(await readRaw(name, "metadata", "active")) === 1,
|
|
665
|
-
"missing required envelope fails closed without deletion",
|
|
666
|
-
);
|
|
667
|
-
}
|
|
668
|
-
async function retirement(_name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
669
|
-
const storage = await open(),
|
|
670
|
-
driver = await StagedCommitDriver.open(storage, { receipts: 1 });
|
|
671
|
-
const submit = (generation: number) =>
|
|
672
|
-
driver.submit({
|
|
673
|
-
key: operationKey(1n, BigInt(generation)),
|
|
674
|
-
request,
|
|
675
|
-
charge: { inputBytes: 1, payloadBytes: 4, metadataBytes: 4096, publicationBytes: 0 },
|
|
676
|
-
async prepare() {
|
|
677
|
-
return stage(generation);
|
|
678
|
-
},
|
|
679
|
-
});
|
|
680
|
-
assert(
|
|
681
|
-
(await submit(1)).kind === "committed" && (await submit(2)).kind === "committed",
|
|
682
|
-
"bounded receipt window advances",
|
|
683
|
-
);
|
|
684
|
-
const recovered = await storage.recoverCommitted();
|
|
685
|
-
assert(
|
|
686
|
-
lookupReceipt(recovered.envelope, operationKey(1n, 1n), request).kind === "retired",
|
|
687
|
-
"eviction persists retirement floor",
|
|
688
|
-
);
|
|
689
|
-
assert((await submit(1)).kind === "retired", "retired request never invokes producer");
|
|
690
|
-
const conflict = driver.submit({
|
|
691
|
-
key: operationKey(1n, 2n),
|
|
692
|
-
request: { ...request, digest: "b".repeat(64) },
|
|
693
|
-
charge: { inputBytes: 0, payloadBytes: 0, metadataBytes: 0, publicationBytes: 0 },
|
|
694
|
-
async prepare() {
|
|
695
|
-
throw new Error("conflict cannot stage");
|
|
696
|
-
},
|
|
697
|
-
});
|
|
698
|
-
assert((await conflict).kind === "conflict", "changed canonical input conflicts");
|
|
699
|
-
}
|
|
700
|
-
async function splitReceiptMutant(name: string): Promise<void> {
|
|
701
|
-
const fast = await IndexedDBStorage.open(name, { compactEvery: 1 });
|
|
702
|
-
try {
|
|
703
|
-
await fast.persist(batch(1));
|
|
704
|
-
await fast.persist(batch(2));
|
|
705
|
-
} finally {
|
|
706
|
-
await fast.close();
|
|
707
|
-
}
|
|
708
|
-
const active = await readRaw(name, "metadata", "active"),
|
|
709
|
-
receipt = await readRaw(name, "metadata", "commit");
|
|
710
|
-
let caught = false;
|
|
711
|
-
try {
|
|
712
|
-
assert(
|
|
713
|
-
active !== 2 || receipt !== undefined,
|
|
714
|
-
"split persist-then-receipt lost required outcome",
|
|
715
|
-
);
|
|
716
|
-
} catch {
|
|
717
|
-
caught = true;
|
|
718
|
-
}
|
|
719
|
-
assert(caught, "real split-transaction mutant must fail the atomic receipt assertion");
|
|
720
|
-
await change(name, "metadata", 1, { json: "corrupt", checksum: "bad" });
|
|
721
|
-
await change(name, "journal", 2, { json: "corrupt", checksum: "bad" });
|
|
722
|
-
const recovered = await IndexedDBStorage.open(name);
|
|
723
|
-
try {
|
|
724
|
-
assert(
|
|
725
|
-
(await recovered.load())?.generation === 1,
|
|
726
|
-
"FAST control still recovers older valid root",
|
|
727
|
-
);
|
|
728
|
-
} finally {
|
|
729
|
-
await recovered.close();
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
async function corruptEnvelope(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
733
|
-
const storage = await open();
|
|
734
|
-
await commit(storage, 1);
|
|
735
|
-
await storage.close();
|
|
736
|
-
const original = await readRaw(name, "metadata", "commit");
|
|
737
|
-
assert(
|
|
738
|
-
!!original &&
|
|
739
|
-
typeof original === "object" &&
|
|
740
|
-
"json" in original &&
|
|
741
|
-
typeof original.json === "string",
|
|
742
|
-
"stored record exists",
|
|
743
|
-
);
|
|
744
|
-
const envelope = JSON.parse(original.json);
|
|
745
|
-
envelope.head.sequence = "01";
|
|
746
|
-
await change(name, "metadata", "commit", await encodeRecord(envelope));
|
|
747
|
-
await formatFailure(open());
|
|
748
|
-
}
|
|
749
|
-
function publicationFixture(): CheckpointPublication {
|
|
750
|
-
const buffers = createPublicationBuffers({
|
|
751
|
-
sessions: 4,
|
|
752
|
-
operations: 8,
|
|
753
|
-
inputBytes: 64,
|
|
754
|
-
argumentBytes: 512,
|
|
755
|
-
effectBytes: 2048,
|
|
756
|
-
effects: 16,
|
|
757
|
-
resultBytes: 128,
|
|
758
|
-
logRecords: 2,
|
|
759
|
-
logBytes: 4096,
|
|
760
|
-
pins: 2,
|
|
761
|
-
pinBytes: 128,
|
|
762
|
-
});
|
|
763
|
-
const domain = new PublicationDomain(buffers),
|
|
764
|
-
session = domain.openSession(),
|
|
765
|
-
allocator = new IdentityAllocator(new Int32Array(9));
|
|
766
|
-
allocator.configure({ workspace: crypto.randomUUID(), era: 1n });
|
|
767
|
-
const file = { birthHistory: buffers.history, ino: 7, ...allocator.create() };
|
|
768
|
-
const admitted = domain.admit(
|
|
769
|
-
session,
|
|
770
|
-
domain.next(session),
|
|
771
|
-
{ kind: "write", handle: 7, offset: 0 },
|
|
772
|
-
new Uint8Array([0, 255, 23, 128]),
|
|
773
|
-
);
|
|
774
|
-
assert(admitted.kind === "admitted", "checkpoint fixture admits a real publication");
|
|
775
|
-
const prepared = domain.prepare(admitted.admission, { kind: "number", value: 4 }, [
|
|
776
|
-
{ kind: "bytes", file, offset: 0, bytes: admitted.input, size: 4, version: 1 },
|
|
777
|
-
]);
|
|
778
|
-
const receipt = domain.commit(prepared);
|
|
779
|
-
return snapshotPublicationCheckpoint({
|
|
780
|
-
kind: "settled-publication-v1",
|
|
781
|
-
cut: domain.cut(),
|
|
782
|
-
sessionSerial: session.serial + 16,
|
|
783
|
-
limits: buffers.limits,
|
|
784
|
-
receipts: [receipt],
|
|
785
|
-
changes: [prepared.effects],
|
|
786
|
-
contentVersions: [{ ino: file.ino, version: domain.contentVersion(file.ino) }],
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
function assertPublication(
|
|
790
|
-
actual: CheckpointPublication | undefined,
|
|
791
|
-
expected: CheckpointPublication,
|
|
792
|
-
): void {
|
|
793
|
-
assert(
|
|
794
|
-
actual?.changes.every((change) => change instanceof Uint8Array),
|
|
795
|
-
"typed recovered bytes",
|
|
796
|
-
);
|
|
797
|
-
assert(
|
|
798
|
-
JSON.stringify(actual) === JSON.stringify(expected),
|
|
799
|
-
"exact selected publication checkpoint",
|
|
800
|
-
);
|
|
801
|
-
}
|
|
802
|
-
function publicationStage(generation: number, publication?: CheckpointPublication): CompleteStage {
|
|
803
|
-
const selected = stage(generation);
|
|
804
|
-
return {
|
|
805
|
-
...selected,
|
|
806
|
-
cut: publication?.cut ?? selected.cut,
|
|
807
|
-
batch: { generation, root: 1, upserts: [], removes: [], data: new Map(), publication },
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
async function selectedRecord(
|
|
811
|
-
name: string,
|
|
812
|
-
store: string,
|
|
813
|
-
key: IDBValidKey,
|
|
814
|
-
): Promise<Record<string, unknown>> {
|
|
815
|
-
const value = await decodeRecord(await readRaw(name, store, key));
|
|
816
|
-
assert(value && typeof value === "object", "checksummed selected record exists");
|
|
817
|
-
return Object.fromEntries(Object.entries(value));
|
|
818
|
-
}
|
|
819
|
-
async function publicationRoundtrip(
|
|
820
|
-
name: string,
|
|
821
|
-
open: () => Promise<CommittedStorage>,
|
|
822
|
-
): Promise<void> {
|
|
823
|
-
let storage = await open();
|
|
824
|
-
const publication = publicationFixture(),
|
|
825
|
-
expected = structuredClone(publication),
|
|
826
|
-
selected = { ...stage(1), cut: publication.cut, batch: { ...batch(1), publication } };
|
|
827
|
-
const native = storage.beginCommit(await group(storage, 1, selected));
|
|
828
|
-
publication.changes[0]!.fill(9);
|
|
829
|
-
assert((await native.terminal).kind === "committed", "publication-bearing group commits");
|
|
830
|
-
const initial = await storage.recoverCommitted();
|
|
831
|
-
assertPublication(initial.index?.publication, expected);
|
|
832
|
-
initial.index!.publication!.changes[0]!.fill(0);
|
|
833
|
-
assertPublication((await storage.recoverCommitted()).index?.publication, expected);
|
|
834
|
-
await storage.close();
|
|
835
|
-
storage = await open();
|
|
836
|
-
assertPublication((await storage.recoverCommitted()).index?.publication, expected);
|
|
837
|
-
const next = snapshotPublicationCheckpoint({
|
|
838
|
-
...expected,
|
|
839
|
-
sessionSerial: expected.sessionSerial + 1,
|
|
840
|
-
receipts: expected.receipts.concat([
|
|
841
|
-
{
|
|
842
|
-
id: { session: expected.sessionSerial + 1, sequence: 1 },
|
|
843
|
-
cut: expected.cut,
|
|
844
|
-
result: { kind: "append", written: 0, offset: 4 },
|
|
845
|
-
durability: { kind: "untracked" },
|
|
846
|
-
},
|
|
847
|
-
]),
|
|
848
|
-
});
|
|
849
|
-
await commit(storage, 2, publicationStage(2, next));
|
|
850
|
-
await storage.close();
|
|
851
|
-
const journal = await selectedRecord(name, "journal", 2);
|
|
852
|
-
assert(
|
|
853
|
-
JSON.stringify(journal.publication) ===
|
|
854
|
-
JSON.stringify({
|
|
855
|
-
...next,
|
|
856
|
-
changes: next.changes.map((change) => Array.from(change)),
|
|
857
|
-
}),
|
|
858
|
-
"journal stores byte arrays beside its selected generation",
|
|
859
|
-
);
|
|
860
|
-
await change(name, "metadata", 1, { json: "damaged snapshot", checksum: "bad" });
|
|
861
|
-
storage = await open();
|
|
862
|
-
assertPublication((await storage.recoverCommitted()).index?.publication, next);
|
|
863
|
-
await commit(storage, 3, publicationStage(3, next));
|
|
864
|
-
await storage.close();
|
|
865
|
-
storage = await open();
|
|
866
|
-
assertPublication((await storage.recoverCommitted()).index?.publication, next);
|
|
867
|
-
await commit(storage, 4, publicationStage(4));
|
|
868
|
-
assert(
|
|
869
|
-
(await storage.recoverCommitted()).index?.publication === undefined,
|
|
870
|
-
"untracked clears memory",
|
|
871
|
-
);
|
|
872
|
-
await storage.close();
|
|
873
|
-
await change(name, "metadata", 0, { json: "damaged snapshot", checksum: "bad" });
|
|
874
|
-
storage = await open();
|
|
875
|
-
assert(
|
|
876
|
-
(await storage.recoverCommitted()).index?.publication === undefined,
|
|
877
|
-
"untracked journal clears history",
|
|
878
|
-
);
|
|
879
|
-
await commit(storage, 5, publicationStage(5));
|
|
880
|
-
await storage.close();
|
|
881
|
-
storage = await open();
|
|
882
|
-
assert(
|
|
883
|
-
(await storage.recoverCommitted()).index?.publication === undefined,
|
|
884
|
-
"untracked snapshot clears history",
|
|
885
|
-
);
|
|
886
|
-
await raw(name, async (db) => {
|
|
887
|
-
const keys = await idbRequest(db.transaction("metadata").objectStore("metadata").getAllKeys());
|
|
888
|
-
const allowed = new Set<IDBValidKey>([0, 1, "epoch", "format", "commit", "active"]);
|
|
889
|
-
assert(
|
|
890
|
-
keys.every((key) => allowed.has(key)),
|
|
891
|
-
"no independent publication metadata store",
|
|
892
|
-
);
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
async function publicationAtomicity(
|
|
896
|
-
name: string,
|
|
897
|
-
open: () => Promise<CommittedStorage>,
|
|
898
|
-
): Promise<void> {
|
|
899
|
-
const storage = await open(),
|
|
900
|
-
previous = publicationFixture();
|
|
901
|
-
await commit(storage, 1, { ...stage(1), batch: { ...batch(1), publication: previous } });
|
|
902
|
-
const prepared = await group(storage, 2, {
|
|
903
|
-
...stage(2),
|
|
904
|
-
batch: { ...batch(2), publication: publicationFixture() },
|
|
905
|
-
});
|
|
906
|
-
const cause = { message: "abort after publication journal put" },
|
|
907
|
-
injected = failureOnReceipt(cause);
|
|
908
|
-
try {
|
|
909
|
-
const outcome = await storage.beginCommit(prepared).terminal;
|
|
910
|
-
assert(outcome.kind === "aborted" && outcome.cause === cause, "exact native publication abort");
|
|
911
|
-
assert(injected.payloadPuts > 0, "abort follows actual payload writes");
|
|
912
|
-
} finally {
|
|
913
|
-
injected.restore();
|
|
914
|
-
}
|
|
915
|
-
assertPublication((await storage.recoverCommitted()).index?.publication, previous);
|
|
916
|
-
assert((await readRaw(name, "journal", 2)) === undefined, "publication journal rolls back");
|
|
917
|
-
assert((await readRaw(name, "data", "a:2")) === undefined, "publication data rolls back");
|
|
918
|
-
const recovery = await storage.recoverCommitted();
|
|
919
|
-
await change(name, "metadata", "epoch", recovery.epoch + 1);
|
|
920
|
-
const fenced = await storage.beginCommit(prepared).terminal;
|
|
921
|
-
assert(
|
|
922
|
-
fenced.kind === "aborted" && String(fenced.cause).includes("another tab"),
|
|
923
|
-
"epoch fences record",
|
|
924
|
-
);
|
|
925
|
-
await storage.close();
|
|
926
|
-
const reopened = await open();
|
|
927
|
-
assertPublication((await reopened.recoverCommitted()).index?.publication, previous);
|
|
928
|
-
}
|
|
929
|
-
async function publicationCommitBeforeReply(
|
|
930
|
-
name: string,
|
|
931
|
-
open: () => Promise<CommittedStorage>,
|
|
932
|
-
): Promise<void> {
|
|
933
|
-
const storage = await open();
|
|
934
|
-
await commit(storage, 1);
|
|
935
|
-
const publication = publicationFixture(),
|
|
936
|
-
prepared = await group(storage, 2, publicationStage(2, publication)),
|
|
937
|
-
gate = terminalGate("complete");
|
|
938
|
-
let replied = false;
|
|
939
|
-
const native = storage.beginCommit(prepared);
|
|
940
|
-
void native.terminal.then(() => (replied = true));
|
|
941
|
-
try {
|
|
942
|
-
await gate.seen;
|
|
943
|
-
assert(!replied, "publication reply waits for native delivery");
|
|
944
|
-
const journal = await selectedRecord(name, "journal", 2);
|
|
945
|
-
assert(journal.publication !== undefined, "native commit already selected publication");
|
|
946
|
-
assert(
|
|
947
|
-
(await decodeCommit(await readRaw(name, "metadata", "commit"))).head.generation === 2,
|
|
948
|
-
"receipt head commits with publication",
|
|
949
|
-
);
|
|
950
|
-
} finally {
|
|
951
|
-
gate.restore();
|
|
952
|
-
gate.release();
|
|
953
|
-
}
|
|
954
|
-
assert((await native.terminal).kind === "committed", "native terminal still commits");
|
|
955
|
-
await storage.close();
|
|
956
|
-
const recovered = await open();
|
|
957
|
-
assertPublication((await recovered.recoverCommitted()).index?.publication, publication);
|
|
958
|
-
}
|
|
959
|
-
async function publicationCorruption(
|
|
960
|
-
name: string,
|
|
961
|
-
open: () => Promise<CommittedStorage>,
|
|
962
|
-
): Promise<void> {
|
|
963
|
-
const storage = await open();
|
|
964
|
-
await commit(storage, 1);
|
|
965
|
-
await commit(storage, 2, publicationStage(2, publicationFixture()));
|
|
966
|
-
await storage.close();
|
|
967
|
-
const original = await selectedRecord(name, "journal", 2),
|
|
968
|
-
head = await readRaw(name, "metadata", "commit");
|
|
969
|
-
await change(name, "metadata", 1, { json: "damaged snapshot", checksum: "bad" });
|
|
970
|
-
const mutations = [
|
|
971
|
-
{ changes: [[256]] },
|
|
972
|
-
{ contentVersions: [{ ino: 0, version: 0 }] },
|
|
973
|
-
{ sessionSerial: 0 },
|
|
974
|
-
];
|
|
975
|
-
for (const mutation of mutations) {
|
|
976
|
-
assert(
|
|
977
|
-
original.publication && typeof original.publication === "object",
|
|
978
|
-
"stored publication exists",
|
|
979
|
-
);
|
|
980
|
-
const corrupt = { ...original, publication: { ...original.publication, ...mutation } };
|
|
981
|
-
await change(name, "journal", 2, await encodeRecord(corrupt));
|
|
982
|
-
await formatFailure(open());
|
|
983
|
-
assert(
|
|
984
|
-
JSON.stringify(await readRaw(name, "metadata", "commit")) === JSON.stringify(head),
|
|
985
|
-
"corrupt required checkpoint preserves receipt",
|
|
986
|
-
);
|
|
987
|
-
assert((await readRaw(name, "data", "a:1")) !== undefined, "corruption preserves prior data");
|
|
988
|
-
}
|
|
989
|
-
await change(name, "journal", 2, await encodeRecord(original));
|
|
990
|
-
const repaired = await open();
|
|
991
|
-
assert(
|
|
992
|
-
(await repaired.recoverCommitted()).index?.publication !== undefined,
|
|
993
|
-
"valid journal restores exact head",
|
|
994
|
-
);
|
|
995
|
-
}
|
|
996
|
-
async function publicationFast(name: string): Promise<void> {
|
|
997
|
-
let storage = await IndexedDBStorage.open(name, { compactEvery: 2 });
|
|
998
|
-
const publication = publicationFixture(),
|
|
999
|
-
expected = structuredClone(publication);
|
|
1000
|
-
try {
|
|
1001
|
-
const pending = storage.persist({ ...batch(1), publication });
|
|
1002
|
-
publication.changes[0]!.fill(0);
|
|
1003
|
-
await pending;
|
|
1004
|
-
assertPublication((await storage.load())?.publication, expected);
|
|
1005
|
-
const loaded = await storage.load();
|
|
1006
|
-
loaded!.publication!.changes[0]!.fill(9);
|
|
1007
|
-
assertPublication((await storage.load())?.publication, expected);
|
|
1008
|
-
await storage.persist(publicationStage(2, expected).batch);
|
|
1009
|
-
await storage.close();
|
|
1010
|
-
storage = await IndexedDBStorage.open(name, { compactEvery: 2 });
|
|
1011
|
-
assertPublication((await storage.load())?.publication, expected);
|
|
1012
|
-
await storage.persist(publicationStage(3).batch);
|
|
1013
|
-
await storage.close();
|
|
1014
|
-
storage = await IndexedDBStorage.open(name, { compactEvery: 2 });
|
|
1015
|
-
assert(
|
|
1016
|
-
(await storage.load())?.publication === undefined,
|
|
1017
|
-
"FAST untracked selection clears publication",
|
|
1018
|
-
);
|
|
1019
|
-
} finally {
|
|
1020
|
-
await storage.close();
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
async function genesisReopen(name: string, open: () => Promise<CommittedStorage>): Promise<void> {
|
|
1024
|
-
const first = await open(),
|
|
1025
|
-
initial = await first.recoverCommitted();
|
|
1026
|
-
await StagedCommitDriver.open(first);
|
|
1027
|
-
await first.close();
|
|
1028
|
-
const second = await open(),
|
|
1029
|
-
recovered = await second.recoverCommitted(),
|
|
1030
|
-
driver = await StagedCommitDriver.open(second);
|
|
1031
|
-
assert(
|
|
1032
|
-
recovered.envelope.head.sequence === 0n &&
|
|
1033
|
-
recovered.envelope.head.workspace === initial.envelope.head.workspace &&
|
|
1034
|
-
recovered.epoch > initial.epoch &&
|
|
1035
|
-
recovered.index === undefined,
|
|
1036
|
-
"genesis-only committed database reopens without inventing a tree",
|
|
1037
|
-
);
|
|
1038
|
-
await driver.drain();
|
|
1039
|
-
await second.close();
|
|
1040
|
-
const third = await open();
|
|
1041
|
-
assert((await third.recoverCommitted()).envelope.head.sequence === 0n, "idle driver reopens");
|
|
1042
|
-
await third.close();
|
|
1043
|
-
await change(name, "metadata", 0, { unexpected: "snapshot at genesis" });
|
|
1044
|
-
await formatFailure(open());
|
|
1045
|
-
}
|
|
1046
|
-
async function observerCapacity(
|
|
1047
|
-
_name: string,
|
|
1048
|
-
open: () => Promise<CommittedStorage>,
|
|
1049
|
-
): Promise<void> {
|
|
1050
|
-
const storage = await open(),
|
|
1051
|
-
driver = await StagedCommitDriver.open(storage),
|
|
1052
|
-
gate = Promise.withResolvers<void>();
|
|
1053
|
-
let prepared = 0;
|
|
1054
|
-
const replies = Array.from({ length: 65 }, () =>
|
|
1055
|
-
driver.submit({
|
|
1056
|
-
key: operationKey(1n, 1n),
|
|
1057
|
-
request,
|
|
1058
|
-
charge: { inputBytes: 1, payloadBytes: 4, metadataBytes: 4096, publicationBytes: 64 },
|
|
1059
|
-
signal: new AbortController().signal,
|
|
1060
|
-
async prepare() {
|
|
1061
|
-
prepared++;
|
|
1062
|
-
await gate.promise;
|
|
1063
|
-
return stage(1);
|
|
1064
|
-
},
|
|
1065
|
-
}),
|
|
1066
|
-
);
|
|
1067
|
-
try {
|
|
1068
|
-
gate.resolve();
|
|
1069
|
-
const outcomes = await Promise.all(replies);
|
|
1070
|
-
await driver.drain();
|
|
1071
|
-
const recovered = await storage.recoverCommitted();
|
|
1072
|
-
assert(
|
|
1073
|
-
outcomes[0]?.kind === "committed" &&
|
|
1074
|
-
outcomes[64]?.kind === "indeterminate" &&
|
|
1075
|
-
outcomes[64].key.client === 1n &&
|
|
1076
|
-
outcomes[64].key.sequence === 1n &&
|
|
1077
|
-
outcomes[64].cause instanceof StagingCapacity &&
|
|
1078
|
-
outcomes.every((outcome) => outcome.kind !== "not-admitted") &&
|
|
1079
|
-
prepared === 1 &&
|
|
1080
|
-
recovered.envelope.head.sequence === 1n &&
|
|
1081
|
-
lookupReceipt(recovered.envelope, operationKey(1n, 1n), request).kind === "retained",
|
|
1082
|
-
"overflowing an admitted key returns keyed uncertainty, never not-admitted",
|
|
1083
|
-
);
|
|
1084
|
-
} finally {
|
|
1085
|
-
gate.resolve();
|
|
1086
|
-
await driver.drain();
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
async function observerCancellation(
|
|
1090
|
-
_name: string,
|
|
1091
|
-
open: () => Promise<CommittedStorage>,
|
|
1092
|
-
): Promise<void> {
|
|
1093
|
-
const storage = await open(),
|
|
1094
|
-
driver = await StagedCommitDriver.open(storage, { clients: 1 }),
|
|
1095
|
-
gate = Promise.withResolvers<void>(),
|
|
1096
|
-
controller = new AbortController();
|
|
1097
|
-
const submission = {
|
|
1098
|
-
key: operationKey(1n, 1n),
|
|
1099
|
-
request,
|
|
1100
|
-
charge: { inputBytes: 1, payloadBytes: 4, metadataBytes: 4096, publicationBytes: 64 },
|
|
1101
|
-
async prepare() {
|
|
1102
|
-
await gate.promise;
|
|
1103
|
-
return stage(1);
|
|
1104
|
-
},
|
|
1105
|
-
};
|
|
1106
|
-
const first = driver.submit(submission),
|
|
1107
|
-
cancelled = driver.submit({ ...submission, signal: controller.signal });
|
|
1108
|
-
try {
|
|
1109
|
-
controller.abort(null);
|
|
1110
|
-
const aborted = await cancelled;
|
|
1111
|
-
assert(aborted.kind === "indeterminate" && aborted.cause === null, "abort cause stays exact");
|
|
1112
|
-
const preAborted = await driver.submit({ ...submission, signal: controller.signal });
|
|
1113
|
-
assert(
|
|
1114
|
-
preAborted.kind === "indeterminate" && preAborted.cause === null,
|
|
1115
|
-
"already-cancelled join cannot deny admission of its running key",
|
|
1116
|
-
);
|
|
1117
|
-
const replacement = driver.submit({ ...submission, signal: new AbortController().signal });
|
|
1118
|
-
gate.resolve();
|
|
1119
|
-
const outcomes = await Promise.all([first, replacement]);
|
|
1120
|
-
assert(
|
|
1121
|
-
outcomes.every((outcome) => outcome.kind === "committed"),
|
|
1122
|
-
"cancelled observer frees its slot before native work settles",
|
|
1123
|
-
);
|
|
1124
|
-
} finally {
|
|
1125
|
-
gate.resolve();
|
|
1126
|
-
await driver.drain();
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
async function observerReentry(
|
|
1130
|
-
_name: string,
|
|
1131
|
-
open: () => Promise<CommittedStorage>,
|
|
1132
|
-
): Promise<void> {
|
|
1133
|
-
const storage = await open(),
|
|
1134
|
-
driver = await StagedCommitDriver.open(storage, { clients: 1 });
|
|
1135
|
-
let second: Promise<StagingOutcome> | undefined,
|
|
1136
|
-
joined: Promise<StagingOutcome> | undefined,
|
|
1137
|
-
secondPrepared = 0;
|
|
1138
|
-
const next = {
|
|
1139
|
-
key: operationKey(1n, 2n),
|
|
1140
|
-
request,
|
|
1141
|
-
charge: { inputBytes: 1, payloadBytes: 4, metadataBytes: 4096, publicationBytes: 64 },
|
|
1142
|
-
signal: new AbortController().signal,
|
|
1143
|
-
async prepare() {
|
|
1144
|
-
secondPrepared++;
|
|
1145
|
-
return stage(2);
|
|
1146
|
-
},
|
|
1147
|
-
};
|
|
1148
|
-
const first = await driver.submit({
|
|
1149
|
-
...next,
|
|
1150
|
-
key: operationKey(1n, 1n),
|
|
1151
|
-
async prepare() {
|
|
1152
|
-
joined = driver.submit({ ...next, key: operationKey(1n, 1n) });
|
|
1153
|
-
return stage(1, () =>
|
|
1154
|
-
queueMicrotask(() => {
|
|
1155
|
-
second = driver.submit(next);
|
|
1156
|
-
}),
|
|
1157
|
-
);
|
|
1158
|
-
},
|
|
1159
|
-
});
|
|
1160
|
-
const join = await joined;
|
|
1161
|
-
assert(join?.kind === "indeterminate", "first observer reserves before producer callback");
|
|
1162
|
-
const reply = await second;
|
|
1163
|
-
await driver.drain();
|
|
1164
|
-
assert(
|
|
1165
|
-
first.kind === "committed" &&
|
|
1166
|
-
reply?.kind === "not-admitted" &&
|
|
1167
|
-
secondPrepared === 0 &&
|
|
1168
|
-
(await storage.recoverCommitted()).envelope.head.sequence === 1n,
|
|
1169
|
-
"observer capacity refuses callback reentry before producer admission",
|
|
1170
|
-
);
|
|
1171
|
-
assert((await driver.submit(next)).kind === "committed", "fresh observer slot allows retry");
|
|
1172
|
-
assert(equal(secondPrepared, 1), "refused callback did not stage an extra operation");
|
|
1173
|
-
}
|
|
1174
|
-
async function checkpointDecodeBounds(
|
|
1175
|
-
_name: string,
|
|
1176
|
-
_open: () => Promise<CommittedStorage>,
|
|
1177
|
-
databaseName?: StagingDatabaseName,
|
|
1178
|
-
): Promise<void> {
|
|
1179
|
-
await checkpointDecodeControl.run(databaseName);
|
|
1180
|
-
}
|
|
1181
|
-
const cases = {
|
|
1182
|
-
checkpointDecodeBounds,
|
|
1183
|
-
genesisReopen,
|
|
1184
|
-
observerCapacity,
|
|
1185
|
-
observerCancellation,
|
|
1186
|
-
observerReentry,
|
|
1187
|
-
publicationRoundtrip,
|
|
1188
|
-
publicationAtomicity,
|
|
1189
|
-
publicationCommitBeforeReply,
|
|
1190
|
-
publicationCorruption,
|
|
1191
|
-
publicationFast,
|
|
1192
|
-
abortAtomic,
|
|
1193
|
-
nullAbortCauses,
|
|
1194
|
-
nativeAbortRequest,
|
|
1195
|
-
commitBeforeReply,
|
|
1196
|
-
preNativeCancellation,
|
|
1197
|
-
postCommitInstallFailure,
|
|
1198
|
-
requiredHead,
|
|
1199
|
-
headFence,
|
|
1200
|
-
retainedRoots,
|
|
1201
|
-
formatIsolation,
|
|
1202
|
-
missingEnvelope,
|
|
1203
|
-
retirement,
|
|
1204
|
-
splitReceiptMutant,
|
|
1205
|
-
corruptEnvelope,
|
|
1206
|
-
};
|
|
1207
|
-
export function safeStagingLabels(): string[] {
|
|
1208
|
-
return Object.keys(cases);
|
|
1209
|
-
}
|
|
1210
|
-
/** @browserEntry Invoked by the dedicated native staging runner. */
|
|
1211
|
-
export async function safeStagingNative(
|
|
1212
|
-
selected?: string,
|
|
1213
|
-
databaseName?: StagingDatabaseName,
|
|
1214
|
-
): Promise<string[]> {
|
|
1215
|
-
if (selected && !(selected in cases)) throw new Error(`Unknown staged control ${selected}`);
|
|
1216
|
-
const passed: string[] = [];
|
|
1217
|
-
for (const [name, run] of Object.entries(cases)) {
|
|
1218
|
-
if (selected && selected !== name) continue;
|
|
1219
|
-
await fixture(run, databaseName);
|
|
1220
|
-
passed.push(name);
|
|
1221
|
-
console.log(`staged control passed: ${name}`);
|
|
1222
|
-
}
|
|
1223
|
-
return passed;
|
|
1224
|
-
}
|