You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/driver-test-runner/SKILL.md
+13-25Lines changed: 13 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,18 +24,12 @@ The skill accepts optional arguments:
24
24
25
25
The driver suite runs over a runtime × SQLite-backend × encoding matrix defined in `rivetkit-typescript/packages/rivetkit/tests/driver/shared-matrix.ts`. The runtime dimension has two values:
26
26
27
-
-**`native`** — NAPI bindings (`@rivetkit/rivetkit-napi`). Pairs with `sqlite=local`(the in-process SQLite VFS). This is the default when no env override is set.
28
-
-**`wasm`** — WebAssembly bindings (`@rivetkit/rivetkit-wasm`). Wasm **cannot** use local SQLite; it must pair with `sqlite=remote` (executes SQL through the engine over the wire). Setting `RIVETKIT_DRIVER_TEST_RUNTIME=wasm` with `RIVETKIT_DRIVER_TEST_SQLITE=local` fails fast.
27
+
-**`native`** — NAPI bindings (`@rivetkit/rivetkit-napi`). Pairs with `sqlite=local`for the primary native driver pass.
28
+
-**`wasm`** — WebAssembly bindings (`@rivetkit/rivetkit-wasm`). Wasm **cannot** use local SQLite; it must pair with `sqlite=remote` (executes SQL through the engine over the wire).
29
29
30
30
The skill defaults to running each test file twice: once on `native/local` and once on `wasm/remote`, each at `encoding=bare`. A file is checked off only when both runtimes pass.
31
31
32
-
Env overrides recognized by the test harness:
33
-
34
-
-`RIVETKIT_DRIVER_TEST_RUNTIME` — comma-separated subset of `native,wasm`.
35
-
-`RIVETKIT_DRIVER_TEST_SQLITE` — comma-separated subset of `local,remote`.
36
-
-`RIVETKIT_DRIVER_TEST_ENCODING` — comma-separated subset of `bare,cbor,json`.
37
-
38
-
When **any** of these env vars is set, the inner describe block name changes from `encoding (<encoding>)` to `runtime (<runtime>) / sqlite (<backend>) / encoding (<encoding>)`. The skill always sets the env vars, so the longer form is always what `-t` must match.
32
+
The test harness does not read environment variables for matrix selection. Always select matrix cells with Vitest `-t` using the full inner describe name: `runtime (<runtime>) / sqlite (<backend>) / encoding (<encoding>)`.
39
33
40
34
## How It Works
41
35
@@ -175,21 +169,20 @@ For each unchecked row in order, run the runtimes selected by the `runtime` arg
175
169
176
170
**b) Build the filter command:**
177
171
178
-
Each suite lives in its own file under `rivetkit-typescript/packages/rivetkit/tests/driver/<file>.test.ts`. With env overrides set, the describe block nesting is:
172
+
Each suite lives in its own file under `rivetkit-typescript/packages/rivetkit/tests/driver/<file>.test.ts`. The describe block nesting is:
Always use Vitest `-t` for driver matrix cells. Include runtime, SQLite backend, and encoding in the pattern so a partial match does not accidentally select another matrix cell.
Do not use `-t` as a flake workaround. It is only for selecting the intended matrix cell and, when needed, a specific failing test.
307
295
If the bug only appears on one runtime, that's a strong signal — focus the diff hunt on the corresponding runtime adapter (`napi-runtime.ts` / `wasm-runtime.ts`) and any wasm-feature-gated code in `rivetkit-core` and `rivetkit-typescript/packages/rivetkit-wasm`.
308
296
309
297
### 6. Completion
@@ -327,6 +315,6 @@ Report summary:
327
315
3.**Fix before advancing.** Do not skip a failing runtime/file to test the next one (unless the user says to skip).
328
316
4.**Always pipe to file.** Never rely on inline terminal output for test results. Always write to `/tmp/driver-test-current.log` and grep afterward.
329
317
5.**Track everything.** Every run gets logged in the progress file with its runtime tag.
330
-
6.**Always set the env vars.**Even when running a single runtime, set `RIVETKIT_DRIVER_TEST_RUNTIME`, `RIVETKIT_DRIVER_TEST_SQLITE`, and `RIVETKIT_DRIVER_TEST_ENCODING`. The describe path depends on having any of them set.
318
+
6.**Always use `-t` for matrix selection.**Include runtime, SQLite backend, and encoding in the selector. Do not scope the driver matrix with env vars.
331
319
7.**Never pair `wasm` with `local` SQLite.** The harness throws on this combination. If a wasm run somehow needs local SQLite to repro a bug, that's a bug in the matrix, not a workaround to apply.
332
320
8.**Respect timeouts.** Set a 600-second timeout for slow tests (sleep, lifecycle, stress). Use 120 seconds for fast tests. Wasm runs may be slower than native — extend timeouts proportionally if you see consistent timeouts on wasm only.
0 commit comments