Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
13165b9
chore(rivetkit): wasm support
NathanFlurry Apr 30, 2026
906a7b3
feat: US-001 - Add envoy protocol v4 remote SQL messages
NathanFlurry Apr 30, 2026
4e3f0db
feat: US-002 - Guard remote SQL by protocol version
NathanFlurry Apr 30, 2026
d5f7f22
feat: US-003 - Extract reusable SQLite execution types
NathanFlurry Apr 30, 2026
0961e87
feat: US-004 - Add remote SQL request handling to envoy client
NathanFlurry Apr 30, 2026
94e8dd4
feat: US-005 - Add SqliteDb backend routing in core
NathanFlurry Apr 30, 2026
044f738
feat: US-006 - Implement remote SQL execution in pegboard-envoy
NathanFlurry Apr 30, 2026
548d649
feat: US-007 - Make pegboard-envoy SQL executors lazy and actor-scoped
NathanFlurry Apr 30, 2026
706b6d1
feat: US-008 - Keep remote SQL off the WebSocket read loop
NathanFlurry Apr 30, 2026
a930570
feat: US-009 - Handle remote SQL lost-response semantics
NathanFlurry Apr 30, 2026
5c9ee3f
feat: US-010 - Preserve migrations and write-mode parity on remote SQ…
NathanFlurry Apr 30, 2026
c1f9855
feat: US-011 - Expand driver matrix for SQLite backend and runtime
NathanFlurry Apr 30, 2026
ac33f45
feat: US-012 - Split envoy client native and wasm transport features
NathanFlurry Apr 30, 2026
2af0557
feat: US-013 - Implement wasm envoy WebSocket transport
NathanFlurry Apr 30, 2026
dba547d
feat: US-014 - Add core runtime feature gates for wasm
NathanFlurry Apr 30, 2026
5980d38
feat: US-015 - Gate native-only core modules
NathanFlurry Apr 30, 2026
f1a3ec5
feat: US-016 - Add wasm-safe runtime spawning and callback model
NathanFlurry Apr 30, 2026
7463c9a
feat: US-017 - Add wasm build and dependency gates
NathanFlurry Apr 30, 2026
b8e44cb
feat: US-019 - Define the shared TypeScript core runtime interface
NathanFlurry Apr 30, 2026
4cdc094
feat: US-020 - Add separate wasm binding package
NathanFlurry Apr 30, 2026
ff04760
feat: US-021 - Implement wasm adapter for the shared runtime interface
NathanFlurry Apr 30, 2026
7a3b577
feat: US-022 - Add Supabase and Cloudflare wasm smoke coverage
NathanFlurry Apr 30, 2026
6213c3a
chore(rivetkit): build wasm package in publish workflow
NathanFlurry Apr 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 108 additions & 86 deletions .agent/notes/driver-test-progress.md
Original file line number Diff line number Diff line change
@@ -1,101 +1,123 @@
# Driver Test Suite Progress

Started: 2026-04-26T14:05:00-07:00
Config: registry (static), client type (http), encoding (bare)
Started: 2026-04-30T19:59:06-07:00
Config: registry (static), runtime (wasm), sqlite (remote), encoding (bare)

## Fast Tests

- [x] manager-driver | Manager Driver Tests
- [x] actor-conn | Actor Connection Tests
- [x] actor-conn-state | Actor Connection State Tests
- [x] conn-error-serialization | Connection Error Serialization Tests
- [x] actor-destroy | Actor Destroy Tests
- [x] request-access | Request Access in Lifecycle Hooks
- [x] actor-handle | Actor Handle Tests
- [x] manager-driver | Manager Driver
- [x] actor-conn | Actor Conn
- [x] actor-conn-state | Actor Conn State
- [x] conn-error-serialization | Conn Error Serialization
- [x] actor-destroy | Actor Destroy
- [x] request-access | Request Access
- [x] actor-handle | Actor Handle
- [x] action-features | Action Features
- [x] access-control | access control
- [x] actor-vars | Actor Variables
- [x] actor-metadata | Actor Metadata Tests
- [x] actor-onstatechange | Actor onStateChange Tests
- [ ] actor-db | Actor Database
- [ ] actor-db-raw | Actor Database Raw Tests
- [ ] actor-db-init-order | Actor DB Init Order Tests
- [ ] actor-workflow | Actor Workflow Tests
- [ ] actor-error-handling | Actor Error Handling Tests
- [ ] actor-queue | Actor Queue Tests
- [ ] actor-kv | Actor KV Tests
- [ ] actor-stateless | Actor Stateless Tests
- [ ] raw-http | raw http
- [ ] raw-http-request-properties | raw http request properties
- [ ] raw-websocket | raw websocket
- [ ] actor-inspector | Actor Inspector Tests
- [ ] gateway-query-url | Gateway Query URL Tests
- [ ] actor-db-pragma-migration | Actor Database Pragma Migration
- [ ] actor-state-zod-coercion | Actor State Zod Coercion
- [ ] actor-save-state | Actor Save State Tests
- [ ] actor-conn-status | Connection Status Changes
- [ ] gateway-routing | Gateway Routing
- [ ] lifecycle-hooks | Lifecycle Hooks
- [ ] serverless-handler | Serverless Handler Tests
- [x] access-control | Access Control
- [x] actor-vars | Actor Vars
- [x] actor-metadata | Actor Metadata
- [x] actor-onstatechange | Actor Onstatechange
- [x] actor-db | Actor Db
- [x] actor-db-raw | Actor Db Raw
- [x] actor-db-init-order | Actor Db Init Order
- [x] actor-workflow | Actor Workflow
- [x] actor-error-handling | Actor Error Handling
- [x] actor-queue | Actor Queue
- [x] actor-kv | Actor Kv
- [x] actor-stateless | Actor Stateless
- [x] raw-http | Raw Http
- [x] raw-http-request-properties | Raw Http Request Properties
- [x] raw-websocket | Raw Websocket
- [x] actor-inspector | Actor Inspector
- [x] gateway-query-url | Gateway Query Url
- [x] actor-db-pragma-migration | Actor Db Pragma Migration
- [x] actor-state-zod-coercion | Actor State Zod Coercion
- [x] actor-save-state | Actor Save State
- [x] actor-conn-status | Actor Conn Status
- [x] gateway-routing | Gateway Routing
- [x] lifecycle-hooks | Lifecycle Hooks
- [x] serverless-handler | Serverless Handler

## Slow Tests

- [ ] actor-state | Actor State Tests
- [ ] actor-schedule | Actor Schedule Tests
- [ ] actor-sleep | Actor Sleep Tests
- [ ] actor-sleep-db | Actor Sleep Database Tests
- [ ] actor-lifecycle | Actor Lifecycle Tests
- [ ] actor-conn-hibernation | Actor Connection Hibernation Tests
- [ ] actor-run | Actor Run Tests
- [ ] hibernatable-websocket-protocol | hibernatable websocket protocol
- [ ] actor-db-stress | Actor Database Stress Tests
- [x] actor-state | Actor State
- [x] actor-schedule | Actor Schedule
- [x] actor-sleep | Actor Sleep
- [x] actor-sleep-db | Actor Sleep Db
- [x] actor-lifecycle | Actor Lifecycle
- [x] actor-conn-hibernation | Actor Conn Hibernation
- [x] actor-run | Actor Run
- [x] hibernatable-websocket-protocol | Hibernatable Websocket Protocol
- [x] actor-db-stress | Actor Db Stress

## Excluded

- [ ] actor-agent-os | Actor agentOS Tests (skip unless explicitly requested)
- [x] actor-agent-os | Actor Agent Os
- [x] shared-matrix | Matrix helper tests

## Log

- 2026-04-26T14:06:57-07:00 manager-driver: PASS

- 2026-04-26T14:07:27-07:00 actor-conn: PASS

- 2026-04-26T14:07:37-07:00 actor-conn-state: PASS

- 2026-04-26T14:07:42-07:00 conn-error-serialization: PASS

- 2026-04-26T14:08:14-07:00 actor-destroy: PASS

- 2026-04-26T14:08:19-07:00 request-access: PASS

- 2026-04-26T14:08:31-07:00 actor-handle: PASS

- 2026-04-26T14:08:31-07:00 action-features: PASS

- 2026-04-26T14:08:46-07:00 access-control: PASS

- 2026-04-26T14:08:51-07:00 actor-vars: PASS

- 2026-04-26T14:08:58-07:00 actor-metadata: PASS

- 2026-04-26T14:08:59-07:00 actor-onstatechange: PASS

- 2026-04-26T14:10:59-07:00 actor-db: FAIL (exit 124)

- 2026-04-26T14:12:00-07:00 runner: stale suite-description filters found for action-features, actor-onstatechange, actor-db, gateway-query-url, and likely other renamed suites; switching to per-file bare filter.

- 2026-04-26T14:12:54-07:00 action-features: PASS (bare file filter)

- 2026-04-26T14:12:59-07:00 actor-onstatechange: PASS (bare file filter)

- 2026-04-26T14:17:33-07:00 actor-db: FAIL (exit 1, bare file filter)

- 2026-04-28T03:01:07-07:00 actor-sleep: FAIL focused repro `waitUntil accepts promises that resolve to undefined`. Native NAPI logs `actor wait_until promise rejected` with `InvalidArg: undefined cannot be represented as a serde_json::Value` after `triggerWaitUntilVoid`; `triggerWaitUntilWithValue` did not reproduce locally with this checkout.

- 2026-04-28T03:02:10-07:00 actor-sleep: FAIL focused repro updated to exact `counterWaitUntilProbe` shape. Failure occurs on first action `triggerWaitUntilVoid`, before the value and rejection controls run.

- 2026-04-28T03:05:41-07:00 actor-sleep: PASS after native waitUntil bridge normalization. Focused `waitUntil`/`keepAwake` bridge tests pass, and full bare `Actor Sleep Tests` passed (21 passed, 45 skipped).

- 2026-04-28T03:59:04-07:00 raw-websocket: PASS focused native `onWebSocket` connection-context repro after passing raw websocket `ConnHandle` through core/NAPI/TS. Full bare raw-websocket run had one `guard.request_timeout` on `should establish raw WebSocket connection`; isolated rerun passed.

- 2026-04-28T05:18:50-07:00 raw-websocket: PASS focused `/actors/{id}/sleep` repro for non-hibernatable raw websocket disconnect after making non-HWS actor stop terminal in pegboard gateway retry handling. Bare raw-websocket slice passed (16 passed, 32 skipped). Checks passed: `cargo check -p pegboard-gateway2`, `cargo check -p pegboard-gateway`, `pnpm check-types`.
- 2026-04-30T20:00:26-07:00 manager-driver: FAIL. `passes input to actor during creation` and `getOrCreate passes input to actor during creation` saw undefined input in wasm callbacks.
- 2026-04-30T20:02:44-07:00 manager-driver: PASS after wasm `onCreate` input propagation fix. 16 passed.
- 2026-04-30T20:03:02-07:00 actor-conn: FAIL. 5 failures from missing wasm connection lifecycle bridge: connection params, onBeforeConnect/onConnect, connState initialization, and onDisconnect conn handle.
- 2026-04-30T20:06:26-07:00 actor-conn: PASS after wasm connection lifecycle bridge and `get_params_failed` retry classification. 23 passed.
- 2026-04-30T20:07:29-07:00 actor-conn-state: FAIL. 4 failures because wasm `ActorContext.conns()` returned an empty array, so connection enumeration and targeted sends could not work.
- 2026-04-30T20:09:11-07:00 actor-conn-state: PASS after wiring wasm live connection enumeration. 8 passed.
- 2026-04-30T20:15:39-07:00 conn-error-serialization: PASS after decoding bridged JS RivetErrors back into structured core errors in wasm. 3 passed.
- 2026-04-30T20:16:12-07:00 actor-destroy: FAIL. 2 failures: queue send stale-handle retry returned internal error, raw HTTP stale-handle retry did not record recreated actor behavior.
- 2026-04-30T20:23:43-07:00 actor-destroy: PASS after wiring wasm `onQueueSend`, `onRequest`, request-scoped `connectConn`, and spawning HTTP callback dispatch to avoid re-entrant event-loop deadlock. 11 passed.
- 2026-04-30T20:24:11-07:00 request-access: PASS. 4 passed.
- 2026-04-30T20:24:34-07:00 actor-handle: PASS. 12 passed.
- 2026-04-30T20:24:41-07:00 action-features: FAIL. Same-actor concurrent actions serialized in wasm because action callbacks were awaited inline in the actor event loop.
- 2026-04-30T20:27:13-07:00 action-features: PASS after spawning wasm action callbacks on local tasks. 12 passed.
- 2026-04-30T20:27:31-07:00 access-control: FAIL. 3 failures: wasm queue `tryNext` used a native-only synchronous queue path, and wasm subscription dispatch skipped `onBeforeSubscribe`.
- 2026-04-30T20:30:16-07:00 access-control: PASS after routing queue `tryNext` through async zero-timeout receive and wiring wasm `onBeforeSubscribe`. 8 passed.
- 2026-04-30T20:30:32-07:00 actor-vars: PASS. 5 passed.
- 2026-04-30T20:30:41-07:00 actor-metadata: PASS. 6 passed.
- 2026-04-30T20:30:50-07:00 actor-onstatechange: PASS. 5 passed.
- 2026-04-30T20:31:15-07:00 actor-db: FAIL. 2 failures: mixed workload integrity timed out and parallel lifecycle churn hit wasm `spawn_local` outside Tokio `LocalSet`.
- 2026-04-30T20:34:06-07:00 actor-db: PASS after scheduling wasm action/http/subscribe callbacks through `RuntimeSpawner`. 13 passed.
- 2026-04-30T20:34:13-07:00 actor-db-raw: PASS. 5 passed, 1 skipped.
- 2026-04-30T20:34:19-07:00 actor-db-init-order: PASS. 6 passed.
- 2026-04-30T20:37:16-07:00 actor-workflow: FAIL. 17 failures cascading from missing wasm runtime KV bridge, reported as `feature.unsupported` for `wasm runtime method kv`.
- 2026-04-30T21:02:53-07:00 actor-workflow: PASS after wasm KV/run/workflow bridge fixes and pegboard actor2 reallocate ordering fix. 18 passed, 1 skipped.
- 2026-04-30T21:09:44-07:00 actor-error-handling: PASS. 7 passed.
- 2026-04-30T21:11:46-07:00 actor-queue: PASS after wasm queue cancellation forwarding and missing `vi` import fix. 25 passed.
- 2026-04-30T21:17:25-07:00 actor-kv: PASS. 3 passed.
- 2026-04-30T21:17:30-07:00 actor-stateless: PASS. 6 passed.
- 2026-04-30T21:17:42-07:00 raw-http: PASS. 15 passed.
- 2026-04-30T21:18:03-07:00 raw-http-request-properties: PASS. 16 passed.
- 2026-04-30T21:18:14-07:00 raw-websocket: PASS. 14 passed, 2 skipped.
- 2026-04-30T22:16:57-07:00 actor-inspector: PASS after wasm inspector auth/snapshot support and wasm-safe inspector websocket/run-handler spawning fixes. 20 passed.
- 2026-04-30T22:17:28-07:00 gateway-query-url: PASS. 2 passed.
- 2026-04-30T22:17:32-07:00 actor-db-pragma-migration: PASS. 4 passed.
- 2026-04-30T22:17:35-07:00 actor-state-zod-coercion: PASS. 3 passed.
- 2026-04-30T22:17:37-07:00 actor-save-state: PASS. 2 passed.
- 2026-04-30T22:17:42-07:00 actor-conn-status: PASS. 6 passed.
- 2026-04-30T22:23:49-07:00 gateway-routing: PASS after core no longer routes non-`/request` fallback paths to `onRequest`. 9 passed.
- 2026-04-30T22:24:02-07:00 lifecycle-hooks: PASS. 8 passed.
- 2026-04-30T22:24:05-07:00 serverless-handler: PASS. 3 passed.
- 2026-04-30T23:30:53-07:00 actor-state: PASS. 3 passed.
- 2026-04-30T23:30:53-07:00 actor-schedule: PASS after wasm shutdown tasks now spawn through `RuntimeSpawner` instead of requiring a current Tokio runtime handle. 4 passed.
- 2026-04-30T23:38:34-07:00 actor-sleep: PASS after wasm `waitUntil` now uses core `wait_until` semantics and core-compatible rejection logging. 21 passed, 1 skipped.
- 2026-05-01T00:00:18-07:00 actor-sleep-db: PASS after wasm shutdown-tracked task completion now wakes sleep finalization, late websocket callback cleanup no-ops detached wasm sleep fallback, and the fixture uses `keepAwake` instead of deprecated `setPreventSleep`. 14 passed, 10 skipped.
- 2026-05-01T00:06:42-07:00 actor-lifecycle: PASS. 10 passed, 1 skipped.
- 2026-05-01T00:06:42-07:00 actor-conn-hibernation: PASS. 5 passed.
- 2026-05-01T00:09:11-07:00 actor-run: PASS. 8 passed.
- 2026-05-01T00:09:11-07:00 hibernatable-websocket-protocol: PASS/SKIP. 2 skipped for wasm matrix.
- 2026-05-01T00:10:39-07:00 actor-db-stress: PASS. 5 passed.
- 2026-05-01T01:15:05-07:00 runtime selection follow-up: PASS. `runtime-selection.test.ts`, `rivetkit check-types`, and `rivetkit build` passed after adding configured NAPI/wasm runtime loading.
- 2026-05-01T01:15:05-07:00 wasm/remote/bare final sweep: PASS. Revalidated `actor-lifecycle`, `actor-conn-hibernation`, `actor-run`, `hibernatable-websocket-protocol` skip behavior, and `actor-db-stress` through configured `setup({ runtime: "wasm" })` driver wiring.
- 2026-05-01T01:15:31-07:00 edge host smoke: PASS. `wasm-runtime.test.ts` and `wasm-host-smoke.test.ts` passed for the shared wasm runtime interface and Supabase/Cloudflare host shims.
- 2026-05-01T01:20:00-07:00 continuing matrix sweep for wasm/remote/cbor and wasm/remote/json.
- 2026-05-01T01:34:15-07:00 wasm/remote/cbor: PASS. Full driver file sweep passed after making the lifecycle observer noSleep and making the actor-run early-exit test wait on the sleep hook event instead of a wall-clock margin.
- 2026-05-01T01:51:54-07:00 wasm/remote/json: PASS. Full driver file sweep passed after normalizing BigInt schedule/alarm values before calling wasm-bindgen number APIs. `actor-sleep-db` had one sequence timeout and passed on full-file rerun.
- 2026-05-01T01:54:52-07:00 continuing matrix sweep for native/remote/bare.
- 2026-05-01T02:05:18-07:00 native/remote/bare actor-db: PASS after fixing pegboard actor2 serverful reallocation after sleep to enter `Starting` instead of staying in `Allocating`. Full file passed, 13 tests.
- 2026-05-01T02:17:48-07:00 native/remote/bare remaining sweep: PASS. Resumed from actor-db-raw through actor-db-stress. Fixed guard header-based actor routing so only `/request` HTTP paths route to actor `onRequest`; reran gateway-routing successfully before continuing. AgentOS remains excluded by request.
- 2026-05-01T02:20:36-07:00 shared-matrix: PASS. 1 passed.
- 2026-05-01T02:25:55-07:00 actor-agent-os: PASS. wasm/remote bare+cbor+json passed 42 tests after normalizing cron job metadata to plain serializable values; native/remote/bare passed 14 tests.
- 2026-05-01T02:26:11-07:00 initial requested remote matrix complete. wasm/remote bare+cbor+json passed all driver files, including AgentOS; native/remote/bare passed all driver files, including AgentOS.
- 2026-05-01T03:12:00-07:00 native/local bare+cbor+json: PASS. Full driver file sweep passed after fixing native SQLite reader-authorizer fallback for `PRAGMA table_info`, queue spawn synchronization with `enqueueAndWait`, and CBOR/JSON safe integer revival for native callback payloads.
- 2026-05-01T04:02:00-07:00 native/remote cbor+json: PASS. Full driver file sweep passed after rerunning transient `actor-db-stress` failure successfully. Together with native/remote/bare and wasm/remote bare+cbor+json, the supported driver matrix is complete.
- 2026-05-01T04:03:14-07:00 final verification: PASS. `cargo check -p rivetkit-sqlite`, `cargo test -p rivetkit-sqlite --test statement_classification -- --nocapture`, `pnpm --filter rivetkit run check-types`, `pnpm --filter rivetkit run check:wait-for-comments`, and `pnpm test tests/cbor-json-compat.test.ts` all passed.
Loading
Loading