diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml
new file mode 100644
index 00000000..3eab1b3b
--- /dev/null
+++ b/.github/workflows/bench.yml
@@ -0,0 +1,42 @@
+# The representative-task benchmark (bench/README.md): each task is a job a Solid user does with a library of the
+# ecosystem — its good program accepted by both checkers, typed by the library's own types and run in Chromium, its
+# one-line mistakes refused. The run is compared with bench/scorecard.json: a check that is green there may not turn
+# red, and a check that is red is one its task's `known` gives the reason for.
+name: bench
+
+on:
+ push:
+ branches: [main]
+ paths: ["compiler/**", "ref/**", "runtime/**", "tooling/rx-language-server/**", "bench/**", ".github/workflows/bench.yml"]
+ pull_request:
+ paths: ["compiler/**", "ref/**", "runtime/**", "tooling/rx-language-server/**", "bench/**", ".github/workflows/bench.yml"]
+ workflow_dispatch:
+
+jobs:
+ bench:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: compiler
+ - uses: actions/setup-node@v5
+ with:
+ node-version: 24
+ - name: The crate (rxc, and the Node-API build Solid's Vite plugin loads)
+ working-directory: compiler
+ run: |
+ npm ci
+ cargo build --release
+ npx napi build --platform --release --features node --manifest-path ./Cargo.toml -- --lib
+ - name: The runtime
+ run: npm --prefix runtime ci && npm --prefix runtime run build
+ - name: The language server's packages (rx-tsc)
+ run: npm --prefix tooling/rx-language-server ci
+ - name: The libraries, and Chromium
+ run: |
+ mkdir -p bench/.out/ws && cp bench/package.json bench/.out/ws/package.json
+ (cd bench/.out/ws && npm install --no-audit --no-fund --legacy-peer-deps && npx playwright install --with-deps chromium)
+ - name: The benchmark, against bench/scorecard.json
+ run: node bench/run.mjs --check --strict
diff --git a/.github/workflows/editor.yml b/.github/workflows/editor.yml
index 10042da9..2caa5db2 100644
--- a/.github/workflows/editor.yml
+++ b/.github/workflows/editor.yml
@@ -13,9 +13,9 @@ name: editor
on:
push:
branches: [main]
- paths: ["compiler/**", "tooling/**", ".github/workflows/editor.yml"]
+ paths: ["compiler/**", "tooling/**", "runtime/**", "ref/compile/rt-*.ts", ".github/workflows/editor.yml"]
pull_request:
- paths: ["compiler/**", "tooling/**", ".github/workflows/editor.yml"]
+ paths: ["compiler/**", "tooling/**", "runtime/**", "ref/compile/rt-*.ts", ".github/workflows/editor.yml"]
workflow_dispatch:
jobs:
@@ -41,6 +41,8 @@ jobs:
cargo build --lib --release --target wasm32-unknown-unknown --manifest-path compiler/Cargo.toml
- name: Solid next (the types the tests check against)
run: sh ref/scripts/solid-next.sh && npm --prefix ref install
+ - name: The runtime (test/tsc.js checks an entry against its types)
+ run: npm --prefix runtime ci && npm --prefix runtime run build
- name: Language server tests
working-directory: tooling/rx-language-server
run: |
diff --git a/.github/workflows/suites.yml b/.github/workflows/suites.yml
new file mode 100644
index 00000000..22b15e75
--- /dev/null
+++ b/.github/workflows/suites.yml
@@ -0,0 +1,109 @@
+# The suites CONTRIBUTING.md lists ("Running the suite"), on every change to what they read: the crate's own tests, the
+# reference implementation's (ref/: the interpreter over every scenario, the same scenarios lowered onto Solid, the
+# compiled modules, streamed SSR and hydration in Chromium, the TSX projection), the crate against ref/ in each of its
+# modes (CP-5: checked, client-only, whole-program, lowered, projected), and the three suites that run a guarantee
+# rather than a list of cases (compiler/test/confined.mjs, drafts.mjs, ssr-held.mjs).
+#
+# ref/ runs on Solid built from source at ref/SOLID_NEXT (ref/scripts/solid-next.sh: pnpm, and a Rust build of Solid's
+# native compiler). That build is kept in a cache keyed by the pin, so it is made once per pin and restored after.
+name: suites
+
+on:
+ push:
+ branches: [main]
+ paths: ["compiler/**", "ref/**", "runtime/**", "scenarios/**", "examples/**", "bench/**", ".github/workflows/suites.yml"]
+ pull_request:
+ paths: ["compiler/**", "ref/**", "runtime/**", "scenarios/**", "examples/**", "bench/**", ".github/workflows/suites.yml"]
+ workflow_dispatch:
+
+jobs:
+ # the crate's own tests (compiler/src's units, compiler/tests/)
+ cargo:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: compiler
+ key: test
+ - name: cargo test
+ working-directory: compiler
+ run: cargo test --release
+
+ # ref/'s runners, and the crate against ref/
+ ref:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: compiler
+ - uses: pnpm/action-setup@v4
+ with:
+ version: 11.1.1 # solid-next's packageManager
+ - uses: actions/setup-node@v5
+ with:
+ node-version: 24
+ - name: Solid next, from the cache
+ id: solid
+ uses: actions/cache@v4
+ with:
+ path: ${{ github.workspace }}/../solid-next
+ key: solid-next-${{ runner.os }}-${{ hashFiles('ref/SOLID_NEXT', 'ref/scripts/solid-next.sh') }}
+ - name: Solid next, built at the pin
+ if: steps.solid.outputs.cache-hit != 'true'
+ run: sh ref/scripts/solid-next.sh
+ - name: ref/ (links ../solid-next), and Chromium
+ run: |
+ npm --prefix ref install
+ (cd ref && npx playwright install --with-deps chromium)
+ - name: The crate (rxc, and the Node-API build)
+ working-directory: compiler
+ run: |
+ npm ci
+ cargo build --release
+ npx napi build --platform --release --features node --manifest-path ./Cargo.toml -- --lib
+ - name: The runtime
+ run: npm --prefix runtime ci && npm --prefix runtime run build
+ - name: "ref: the interpreter over every scenario"
+ working-directory: ref
+ run: npm test
+ - name: "ref: the scenarios lowered onto Solid (the oracle)"
+ working-directory: ref
+ run: npm run oracle
+ - name: "ref: compiled modules"
+ working-directory: ref
+ run: npm run compiled
+ - name: "ref: streamed SSR and hydration in Chromium"
+ working-directory: ref
+ run: npm run ssr
+ - name: "ref: the TSX projection, checked by TypeScript"
+ working-directory: ref
+ run: npm run types
+ - name: "crate against ref/: checked"
+ working-directory: ref
+ run: npm run crate
+ - name: "crate against ref/: client-only (--spa)"
+ working-directory: ref
+ run: npm run crate -- --spa
+ - name: "crate against ref/: the whole program (--whole-program)"
+ working-directory: ref
+ run: npm run crate -- --whole-program
+ - name: "crate against ref/: lowered (--lower)"
+ working-directory: ref
+ run: npm run crate -- --lower
+ - name: "crate against ref/: projected (--project)"
+ working-directory: ref
+ run: npm run crate -- --project
+ - name: "the guarantees, run: drafts (MO-10i) and held results (MO-10f) on the server"
+ run: |
+ node compiler/test/drafts.mjs
+ node compiler/test/ssr-held.mjs
+ - name: The libraries confined.mjs runs against (bench/package.json)
+ run: |
+ mkdir -p bench/.out/ws && cp bench/package.json bench/.out/ws/package.json
+ (cd bench/.out/ws && npm install --no-audit --no-fund --legacy-peer-deps)
+ - name: "the guarantees, run: the counterexamples and their controls, in Chromium (CN-7)"
+ run: node compiler/test/confined.mjs
diff --git a/.github/workflows/tree-sitter.yml b/.github/workflows/tree-sitter.yml
new file mode 100644
index 00000000..373fc5a2
--- /dev/null
+++ b/.github/workflows/tree-sitter.yml
@@ -0,0 +1,38 @@
+# The tree-sitter grammar (tooling/tree-sitter-rx): src/ is generated but committed, since Zed compiles src/parser.c
+# as it is, so check it is what grammar.js generates; then the corpus, and every tracked .rx file with no ERROR or
+# MISSING node.
+name: tree-sitter
+
+on:
+ push:
+ branches: [main]
+ paths: ["tooling/tree-sitter-rx/**", "**/*.rx", ".github/workflows/tree-sitter.yml"]
+ pull_request:
+ paths: ["tooling/tree-sitter-rx/**", "**/*.rx", ".github/workflows/tree-sitter.yml"]
+ workflow_dispatch:
+
+jobs:
+ grammar:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: tooling/tree-sitter-rx
+ steps:
+ - uses: actions/checkout@v5
+ - uses: pnpm/action-setup@v4
+ with:
+ version: 11.1.1 # as editor.yml
+ - uses: actions/setup-node@v5
+ with:
+ node-version: 22
+ - run: pnpm install --frozen-lockfile
+ - name: src/ is what grammar.js generates
+ run: |
+ pnpm run generate
+ git diff --exit-code -- src/
+ - name: Corpus
+ run: pnpm test
+ - name: Every tracked .rx file
+ run: pnpm run parse:repo
+ - name: Queries
+ run: pnpm run query -- ../../examples/*.rx > /dev/null
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 72ea93c6..1103d1b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,24 @@
## Unreleased
+**Changed**
+
+- Values the checker confines have a closed set of operations (spec/09 MO-10k, spec/08 CN-7d). A JS result whose
+ fields wait or fail is read by the fields its declaration names: `q.valueOf()`, `q.toJSON()`, an undeclared field and
+ `q[k]()` are `RESULT_AS_VALUE`. What is called on a library's draft is a method of plain data; a callback given to one
+ (`d.items.forEach((row) => { … })`) has parameters that are places of the draft, an iterator read out of one is kept
+ as an iterator over copies, and any other method is `DRAFT_ESCAPES`. A method keeps nothing of a `renders` value only
+ when `methods(…)` names it and it is called on the value's own name. A call through a record, an array or a call
+ (`box.read()`, `fs[0]()`, `mk()()`) reads what the closures it may call read (`SNAPSHOT_KEPT`, `SNAPSHOT_ARGUMENT`).
+- The loop `for (const x of xs) { … }` visits what `xs` held when it started, as the spec said; it compiled to a loop
+ over `xs` itself, which a turn could lengthen.
+- A record result with no accessor part is the library's own object, not a copy with a getter per declared field.
+- A declared fn whose result hands out drafts (`createStore`) is a primitive: its setter is io.
+- `catch` follows only an `await`: `await f(x) catch (e) => alt` makes a matching rejection the answer. A `catch` after
+ anything else is the new compile error `CATCH_NOT_ON_AWAIT` (R-f-4). Show a failed value with an `errored` region
+ where it is read; in a handler or action, read it inside `try { … } catch (e) { … }`; write validation as a value
+ (`""` or a message), not a thrown class.
+
**Fixed**
- `affects` on a keyed or structured source that takes a guess threw `INVALID_AFFECTS_TARGET` in a dev build, so the
@@ -11,6 +29,38 @@
row, so a row's readers re-run only when its own leaves change (#51).
- The guide's action example (`guide/async.md` §3) lost an error thrown before the first `await`: the `onFlush` clear
ran after the catch. The catch now writes the error through `onFlush` as well (#52).
+- A `catch` expression read with no observer (a component `fn` called from a handler or an action) built a fresh error
+ boundary, which had no value while a `refresh` was out, so the click threw `NotReadyError` and was lost. It is now a
+ snapshot: the committed value, or the alternative on a matching failure (R-8, S-catch-snapshot).
+
+**New**
+
+- `bench/`: a representative-task benchmark over the Solid ecosystem's libraries (Formisch, TanStack Query, Router,
+ Start and Table, Kobalte, Solid's store). Each task is a good program (accepted by both checkers, typed by the
+ library's types, run in Chromium) and one-line mistakes that must be refused. `node bench/run.mjs`; CI holds the
+ scorecard.
+- A whole query result can be passed to a component whose prop's type keeps the fields' rows:
+ `props: { query: { data: pending fails(Error) T; status: string } }` (MO-10f).
+- A component that gives a prop on to a provider that renders it (``) renders
+ it in turn: a router can be wrapped in the app's own frame, in any module (MO-11o).
+- A store updater can have a name: `bump = (d) => { d.done := d.done + 1 }`, then `setTodos(bump)` (MO-10i).
+- A part of a `renders` value that its declaration types as a primitive (`getPageCount: () => number`, a row's `id`)
+ is passed to a child or a callback as it is, with its type (MO-11l).
+- `MUTATION_IN_PLACE` (W-1a): `rows.push(x)`, `props.items.sort()` and the like on the value of a source, an equation,
+ a prop or a row.
+- `DISPOSER_DROPPED` (EF-5a): a declared JS call whose result is `() => void`, dropped.
+- `DUPLICATE_KEY` (ST-4d): two rows of a keyed list written with one key.
+- A handler attribute given a call of something io (`onClick={save()}`) is refused (SC-4); a method declared to answer
+ nothing is io where the view computes (MO-10b).
+- A component a JS host renders (`?rx-lib`) is checked under a root of its own in a whole-program build (CP-4d).
+- Advice: `rxc check` lists `advice` beside its diagnostics, never an error. `ASYNC_WATERFALL`: a question awaited
+ after another whose answer it does not read.
+
+- `ARGUMENT_COUNT` (AC-1f): a call of an action declared in the module with another number of arguments than its
+ parameters is refused.
+- `props` in a component declared without props (`component C()`) is `UNBOUND` (RG-4b); it read `undefined`.
+- `guide/async.md`: "One store over the server"; the `GUESS_WHILE_LOADING` advice says what holds when a selection
+ changes while a guess is out (05 DV-22).
## 0.3.1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cb9ab9f1..cac8b3fe 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -23,17 +23,34 @@ spec diverges from Solid, the divergence is recorded as a `DV-n` in
## Running the suite
-Solid is built from its `next` branch at the pinned commit (needs pnpm and a
-Rust toolchain):
+Solid is built from its `main` branch at the pinned commit (needs Node 22+,
+pnpm, a Rust toolchain and the network). `scripts/setup.sh` does every step
+from a fresh clone: Solid beside this repository (`../solid-next`), `ref/`'s
+links to it, the crate (its Node-API binding, `rxc` and the WebAssembly build the language server reads), the runtime, the
+language server, and Playwright's Chromium for the browser suites.
```sh
-sh ref/scripts/solid-next.sh # checks out and builds ../solid-next
-cd ref && npm install
+sh scripts/setup.sh # or, for ref/ alone: sh ref/scripts/solid-next.sh && (cd ref && npm install)
+cd ref
npm test # interpreter over every scenario
npm run oracle # the same scenarios lowered onto Solid
npm run compiled # compiled modules
npm run ssr # streamed SSR + hydration in Chromium
npm run types # TSX projection checked by TypeScript
+npm run crate # the Rust crate against ref/ (also --spa, --whole-program, --lower, --project)
+```
+
+The crate, the plugin, the runtime and the tooling, from the repository's root:
+
+```sh
+(cd compiler && cargo test --release)
+for t in vite kobalte formisch ssr-router start vite-types vite-gate ssr-held drafts confined; do node compiler/test/$t.mjs; done
+# with a Solid plugin that has context.resolve and Frontend.buildStart (compiler/README.md):
+for t in vite-hosts vite-watch; do SOLID_VITE_PLUGIN= node compiler/test/$t.mjs; done
+(cd tooling/tree-sitter-rx && pnpm install && pnpm run generate && pnpm test && pnpm run parse:repo) # a new form in .rx or .d.rx needs its grammar
+(cd runtime && node test.mjs)
+(cd tooling/rx-language-server && npm test)
+node bench/run.mjs --check # the representative tasks (bench/README.md): real libraries, good programs and one-line mistakes
```
`ref/README.md` describes each runner. Please run the suite before opening a
diff --git a/README.md b/README.md
index f593c7b8..1621ffa0 100644
--- a/README.md
+++ b/README.md
@@ -22,9 +22,15 @@ them things the compiler refuses, the way Rust refuses a borrow, so the
program that runs is one where those mistakes cannot happen
([spec/08](spec/08-constraints.md), [spec/99](spec/99-diagnostics.md)).
-The checks are static only. A `.rx` program compiles to ordinary Solid 2.0
-code and adds nothing at run time beyond what Solid does
-([spec/11](spec/11-compiler.md)).
+The checks are static: none of them becomes a run-time check. A `.rx`
+program compiles to ordinary Solid 2.0 code over a small runtime of Solid's
+own primitives ([spec/11](spec/11-compiler.md)). In three places a rule is
+kept by construction instead of by refusal, and there the compiled code does
+a little more than hand-written Solid would: a value read out of a library's
+draft is a copy, a JS result with an accessor among its parts is read
+through a getter per part, and a loop runs over the values its list held
+when it started ([spec/09](spec/09-modules.md) MO-10i, MO-10b;
+[spec/07](spec/07-surface.md) §5).
It is also meant to be easy for an AI to write correctly. The rules are
small and explicit, and each checker error names the rule it enforces and usually the fix. We
@@ -82,7 +88,7 @@ export default component Profile() {
Leave out the `errored` boundary and it does not compile:
```
-profile.rx:10: error UNHANDLED_FAILURE [R-f-5] a reader of user.name (in ) can fail with Error and no catch or errored boundary above it discharges Error — wrap it in `errored fallback(e) { … } { … }`, or catch it: `… catch (e) => …`
+profile.rx:10: error UNHANDLED_FAILURE [R-f-5] a reader of user.name (in ) can fail with Error and no catch or errored boundary above it discharges Error — show it where it is read: `errored fallback(e) { … } { … }` around the reader (or `await … catch (e) => …` at the await, to make the rejection an answer)
```
Beyond this the language has structured stores with per-path writes
@@ -177,7 +183,7 @@ node --experimental-strip-types ref/check.ts examples/todo.rx # check a progra
node --experimental-strip-types ref/run.ts # run every scenario
```
-Running the scenarios on Solid itself needs Solid's `next` branch built from
+Running the scenarios on Solid itself needs Solid's `main` branch built from
source (pnpm and a Rust toolchain); see [CONTRIBUTING.md](CONTRIBUTING.md) and
[`ref/README.md`](ref/README.md). The compiler builds with Cargo
([`compiler/README.md`](compiler/README.md)). To try an unreleased editor build, install a `.vsix` from a run of the
diff --git a/bench/.gitignore b/bench/.gitignore
new file mode 100644
index 00000000..4efeb1bf
--- /dev/null
+++ b/bench/.gitignore
@@ -0,0 +1 @@
+.out/
diff --git a/bench/README.md b/bench/README.md
new file mode 100644
index 00000000..55ec9cd0
--- /dev/null
+++ b/bench/README.md
@@ -0,0 +1,116 @@
+# bench — the representative-task benchmark
+
+ReactiveScript's goal is to be the best way to use the whole Solid ecosystem
+while making wrong Solid code difficult to write. The scenarios and the unit
+tests check rules one at a time; this suite checks the goal: a list of jobs a
+Solid user does with the ecosystem's libraries, each written the way that
+user would write it, and for each job the mistakes they would make.
+
+```sh
+node bench/run.mjs # the scorecard
+node bench/run.mjs table query # some tasks
+node bench/run.mjs --check # compared with bench/scorecard.json: a green check may not turn red (CI)
+node bench/run.mjs --check --strict # and every failure is one its task's `known` gives a reason for
+node bench/run.mjs --write # write bench/scorecard.json and bench/scorecard.txt from this run
+```
+
+It needs the crate (`cargo build --release` and `npm run build` in
+`compiler/`), the runtime (`npm run build` in `runtime/`), the language
+server's packages (`npm ci` in `tooling/rx-language-server`), Node 22.6 or
+later, and the network once: `bench/package.json` is installed into
+`bench/.out/ws`, with this repository's compiler, runtime and language server
+linked in as an app would install them (a task with a `package.json` of its
+own beside its `task.mjs` has an install of its own, for a library that pins
+another version: TanStack Start pins its router). `scripts/setup.sh` builds all but the
+last.
+
+## What a task is
+
+A folder under `tasks/`: `src/` is the app, `task.mjs` says how it is judged.
+
+- **The good program** (`src/`) is a realistic job: the libraries are the
+ ones npm has (Solid 2.0, Formisch, TanStack Query, Router, Start and Table,
+ Kobalte), imported by their own names, declared in `rx-types/` as a project
+ declares a package that ships no `.d.rx` (09 MO-8k), and typed by the
+ library's own TypeScript types.
+- **The bad variants** are that program with one line changed into a mistake
+ a Solid user makes: a read with no boundary, a value frozen where it should
+ follow, a write while the view computes, a value that escapes where the
+ library checked it.
+
+and five columns score it, with two numbers beside them:
+
+| column | green when |
+| --- | --- |
+| **good accepted** | the crate and `ref/` both accept the program, and agree |
+| **types kept** | `rx-tsc` is clean with the library's own types; the `.rx` writes no `any`; and each *type probe* — a mistake only the library's real type can refuse (a field path the schema has not, a link to no route) — is refused by TypeScript **on the line the probe wrote** (an error elsewhere is not the type refusing the edit). A probe that passes means the type was lost on the way |
+| **runtime ok** | the compiled program does the job: rendered on the server and/or driven in Chromium on Solid's development build, with no console error or warning |
+| **unrepresentable** | the variants the language has no way to write: refused by the parser, by name resolution or by TypeScript alone (`PARSE`, `ASSIGNMENT`, `UNBOUND`, `UNKNOWN_COMPONENT`, a JS habit's code, a `ts` variant). They show that a mistake cannot be spelled, not that a check of the program's meaning caught it, so they are counted apart from the next column |
+| **bad caught** | each variant is refused by both checkers, with the diagnostic named, by a diagnostic the good program does not have. Where only the run can know (a duplicate key computed at run time, a `pure` JS function that answers differently on the server), the variant must compile and then fail loudly in development (`dev`); where the language makes the mistake harmless instead of refusing it (a draft's row kept by a callback is a copy), the variant may compile and must then behave (`orSafe`); advice that never fails a build is `advise` |
+
+| number | what it counts (lower is better) |
+| --- | --- |
+| **hand-written `.d.rx` words** | for every `.d.rx` of the task, the words a person wrote on top of what `rx-declare` drafts for the same module (run by the suite, with the flags the task's `declare` names: `--run --dom` where the draft was made by running the package). A row the draft has word for word costs nothing, a row it has otherwise costs the words that differ, a row it has not costs every word; rows left out cost nothing. It is what an app pays to use the library |
+| **`any` in `.d.rx`** | the `any`s those files hold: what the checker is told nothing about |
+
+`--check` holds both numbers too: a task's declarations may not need more hand-written words, nor hold more `any`s,
+than `scorecard.json` records.
+
+What is not in the suite: probes written to find the edge of a rule rather than a mistake a user makes (an
+inherited `valueOf()`, a draft's iterator kept, a callback kept in a record, `[f][0]()`). They were here once and
+are now `compiler/test/confined.mjs`'s, which runs each with its controls.
+
+Nothing in a task names a rule of the checker: the programs come from the
+libraries' documentation and from what goes wrong in Solid apps, and the
+expected diagnostics are the ones the language already has for the mistake
+(or the one its spec says it should have). A fix to the compiler follows from
+a rule in `spec/`, never from a task.
+
+## The tasks
+
+| task | the job | the mistakes |
+| --- | --- | --- |
+| `formisch-field-path` | a Formisch form whose fields are named by typed paths into a valibot schema | a schema that reads state, a form made in the view; *(unrepresentable)* a write while the view computes, state assigned with `=` |
+| `formisch-field-array` | a Formisch array field: rows inserted, removed and moved by the library's methods | a method called while the view computes or given to a button called, the form made in the view, the row ids changed in place |
+| `query-forward` | a TanStack Query result passed down: its data to a list, a flag to a badge, the whole result to a panel; a refetch; a failing query | `data` read under no boundary, the result in a record, to a child that takes it for plain data |
+| `query-mutation` | a TanStack Query mutation that invalidates its query; the cache sent from the server and taken up in the browser (dehydrate / hydrate) | a query key that lacks what the query's function reads, the mutation run or the cache invalidated while the view computes, a hook outside the provider |
+| `router-provider` | TanStack Router's provider inside the app's own `Shell` component, in a module of its own | a page that fails with no boundary at the outlet, a hook outside the provider, a router never rendered |
+| `router-data` | `@solidjs/router` 2.0's data layer: a `query()` a page reads, a form action, `useSubmissions`, `revalidate` (2.0 has no `createAsync` nor `useSubmission`: a query is read by an equation that awaits it) | an async read with no boundary, `revalidate` called while the view computes, a submission's input or a query's answer kept in state |
+| `start-route` | a TanStack Start file route rendering `.rx` components, served and hydrated at `/people/2?tab=role` | the page's data with no boundary, a param copied into state; *(unrepresentable)* state written while a page renders |
+| `store-updater` | a Solid store updater written once and used by two handlers; a snapshot read out of the draft | the store written outside its setter, the updater called by hand, an `await` in the updater, a closure that writes the draft later |
+| `store-helper` | a Solid store's draft changed in place by a helper written in JS (`moveItem(d.columns, from, to)`) | the helper given the store itself, called while the view computes, the draft kept by a closure |
+| `table-pagination` | a TanStack Table: cell components, pagination buttons, a pager given page numbers and handlers, and — shadcn/ui's `DataTablePagination` — a component given the table itself | a row handed up through a callback, the table kept in state, a cell's context missing, a page turned while the view computes |
+| `kobalte-dialog` | a controlled Kobalte dialog | a part outside its root, a write while the view computes, a stale read of an own write; *(unrepresentable)* a part the kit has not, a write to derived state |
+| `kobalte-select` | a Kobalte Select whose options are objects, each rendered by an `.rx` component | an item outside the select, the options sorted in place, a write while the view computes |
+| `primitives-virtual` | solid-primitives' listeners and resize observer and a TanStack Virtual list, on an element ref | a listener's disposer dropped (its type an alias), a primitive made in a handler; *(unrepresentable)* the ref read before there is an element |
+| `frozen-read` | formatters kept in a record, read by the view, by a primitive and by a seed | a formatter read under a kept `peek`, given to a value parameter, used as a seed |
+| `source-mutation` | a list in a source, added to by a write and sorted for display | `rows.push(…)`, a prop sorted in place, a row written through a local alias, the value a functional write is given reversed in place |
+| `keyed-edits` | a keyed list edited every way: insert, remove, move, rename in place, reset | rows written out with one key in a handler, rows keyed by their index, a row written through the loop's name |
+| `listener-cleanup` | a JS listener whose disposer the mount effect returns | the disposer dropped: in the effect, in a handler, in a local never used |
+| `duplicate-keys` | a keyed list whose rows keep their state across a reorder | two literal rows with one key; a row added at run time with a key the list has |
+| `effect-derived` | a total that is an equation, a history the clicks write, an effect for what leaves the program | the total kept in a source by an effect (with and without inputs), a history appended by an effect, a mount effect that reads what it never hears of again |
+| `projection-selection` | a selection as a projection (`draft(…)`, Solid's `createProjection`): picking a row tells two rows | the selection kept in a store by an effect, the projection written from a handler |
+| `optimistic-todo` | an optimistic add: a guess, the server asked, the list asked again, a refusal taken back | a guess where nothing is awaited, an `await` before the guess, the answer written to, a failure let out |
+| `context-provider` | a context of the app's own, a provider component holding the state, readers under it | a reader beside or above the provider, the provided state written or changed in place, the provided action called while the view computes |
+| `sequential-awaits` | an action whose second load needs the first's answer, the independent one asked beside them (asserted: two calls in flight at once) | two independent loads awaited one after the other (advice) |
+| `ssr-divergence` | a value only the browser knows, asked as a client question | the question read with nothing to hold it, client JS called for its value, a `pure` JS call that answers differently on each side |
+
+Two libraries have no Solid 2 build yet, and each has a small adapter in its task, as `@tanstack/solid-table` and
+`@tanstack/solid-virtual` are for Solid 1: `table-pagination/src/table.js` over `@tanstack/table-core`, and
+`primitives-virtual/src/virtual.js` over `@tanstack/virtual-core`.
+
+## What the suite decided
+
+`scorecard.txt` lists every check that is not green, each with the reason its task's `known` gives: the rule of
+`spec/` that makes it one. `spec/rfc-revisions-2026-11-22.md` lists what each task changed in the language.
+
+## The scorecard
+
+`scorecard.txt` is the last run committed, and `scorecard.json` the same as data (what `--check` compares with).
+Three earlier runs are kept beside it:
+
+- `baseline-d6e640e.txt`: the run at the commit this suite was first written against, before any of the work it drove;
+- `scorecard-2f9baf7.txt`: thirteen tasks, as the suite stood when it was reviewed (four columns; its bad variants
+ held probes and unwritable programs);
+- `baseline-rebased.txt`: the suite as it is now — the probes moved out, the unwritable variants counted apart, the
+ declarations measured, eleven tasks added — run on the checker of `2f9baf7`, before any change to it.
diff --git a/bench/baseline-d6e640e.txt b/bench/baseline-d6e640e.txt
new file mode 100644
index 00000000..2c13e564
--- /dev/null
+++ b/bench/baseline-d6e640e.txt
@@ -0,0 +1,66 @@
+task good accepted types kept runtime ok bad caught
+---------------------------------------------------------------------------------
+duplicate-keys 3/3 ✓ 3/3 ✓ 3/3 ✓ 0/2 ✗
+formisch-field-path 3/3 ✓ 6/6 ✓ 4/4 ✓ 4/4 ✓
+frozen-read 3/3 ✓ 3/3 ✓ 3/3 ✓ 1/5 ✗
+kobalte-dialog 3/3 ✓ 4/4 ✓ 5/5 ✓ 5/5 ✓
+listener-cleanup 3/3 ✓ 3/3 ✓ 4/4 ✓ 1/4 ✗
+query-forward 1/3 ✗ 1/5 ✗ 0/1 ✗ 3/6 ✗
+router-provider 1/3 ✗ 4/5 ✗ 0/1 ✗ 3/6 ✗
+sequential-awaits 3/3 ✓ 3/3 ✓ 2/2 ✓ 2/3 ✗
+source-mutation 3/3 ✓ 3/3 ✓ 3/3 ✓ 1/4 ✗
+ssr-divergence 3/3 ✓ 3/3 ✓ 3/3 ✓ 2/3 ✗
+start-route 3/3 ✓ 5/5 ✓ 8/8 ✓ 2/3 ✗
+store-updater 1/3 ✗ 4/5 ✗ 0/1 ✗ 3/7 ✗
+table-pagination 1/3 ✗ 6/7 ✗ 0/1 ✗ 4/7 ✗
+---------------------------------------------------------------------------------
+total 31/39 48/55 35/39 31/59
+
+Not green (47):
+ ✗ duplicate-keys · bad caught · two rows written with one key (DUPLICATE_KEY) — crate: accepted / ref: accepted
+ ✗ duplicate-keys · bad caught · rows added with a key the list already has (known only when it runs) (dev: duplicate key|DUPLICATE_KEY) — ran silently
+ ✗ frozen-read · bad caught · the formatter read under a kept peek: the view shows the first value for ever (SNAPSHOT_KEPT) — crate: accepted / ref: accepted
+ ✗ frozen-read · bad caught · a kept peek of it in an equation (SNAPSHOT_KEPT) — crate: accepted / ref: accepted
+ ✗ frozen-read · bad caught · the formatter's value given to a value parameter: the primitive is made from the first value (SNAPSHOT_ARGUMENT) — crate: accepted / ref: accepted
+ ✗ frozen-read · bad caught · the same through an array of formatters (SNAPSHOT_ARGUMENT) — crate: accepted / ref: accepted
+ ✗ listener-cleanup · bad caught · the disposer dropped in the mount effect (DISPOSER_DROPPED) — crate: accepted / ref: accepted
+ ✗ listener-cleanup · bad caught · the disposer dropped in a click handler: a listener added per click (DISPOSER_DROPPED) — crate: accepted / ref: accepted
+ ✗ listener-cleanup · bad caught · the disposer kept in a local, and never called nor returned (DISPOSER_DROPPED) — crate: accepted / ref: accepted
+ ✗ query-forward · good accepted · main.rx: accepted by the crate — RESULT_AS_VALUE@21: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a field at a time: it is not passed, stored, returned, spread or s
+ ✗ query-forward · good accepted · main.rx: accepted by ref/ — RESULT_AS_VALUE@21: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a field at a time: it is not passed, stored, returned, spread or s
+ ✗ query-forward · types kept · rx-tsc: clean with the library's types — main.rx(13,49): error TS1005: ';' expected. main.rx(13,62): error TS1005: ';' expected. main.rx(13,66): error TS1005: ',' expected. main.rx(13,68): error TS1005: ',' expected. main.rx(13,85): error TS1005: ',' expected. main.rx(13,87): error TS1138: Parameter declaration expected. main.rx:21:3 - error RESULT_AS_VALUE: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a fiel
+ ✗ query-forward · types kept · a row of the query's data is the fetcher's Todo: a field it has not is refused (TS2551|TS2339) — main.rx(13,49): error TS1005: ';' expected. main.rx(13,62): error TS1005: ';' expected. main.rx(13,66): error TS1005: ',' expected. main.rx(13,68): error TS1005: ',' expected. main.rx(13,85): error TS1005: ',' expected. main.rx(13,87): error TS1138: Parameter declaration expected. main.rx:21:3 - error RESULT_AS_VALUE: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a fiel
+ ✗ query-forward · types kept · the result's own fields are the library's: `isFetching` is a boolean (TS2339) — main.rx(13,49): error TS1005: ';' expected. main.rx(13,62): error TS1005: ';' expected. main.rx(13,66): error TS1005: ',' expected. main.rx(13,68): error TS1005: ',' expected. main.rx(13,85): error TS1005: ',' expected. main.rx(13,87): error TS1138: Parameter declaration expected. main.rx:21:3 - error RESULT_AS_VALUE: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a fiel
+ ✗ query-forward · types kept · the options are the library's: a queryKey must be an array (TS2322|TS2769|TS2345) — main.rx(13,49): error TS1005: ';' expected. main.rx(13,62): error TS1005: ';' expected. main.rx(13,66): error TS1005: ',' expected. main.rx(13,68): error TS1005: ',' expected. main.rx(13,85): error TS1005: ',' expected. main.rx(13,87): error TS1138: Parameter declaration expected. main.rx:21:3 - error RESULT_AS_VALUE: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a fiel
+ ✗ query-forward · runtime ok · the good program runs — not compiled: the checker refused it
+ ✗ query-forward · bad caught · the result handed on by an inherited method: `todos.valueOf()` is the result itself (RESULT_AS_VALUE) — crate: accepted / ref: accepted
+ ✗ query-forward · bad caught · the result stored in a record (RESULT_AS_VALUE) — crate: RESULT_AS_VALUE@21: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a field at a time: it is not passed, stored, returned, spread or s / ref: RESULT_AS_VALUE@21: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a field at a time: it is not passed, stored, returned, spread or s
+ ✗ query-forward · bad caught · the whole result given to a child whose interface does not say `data` waits and fails (RESULT_AS_VALUE) — crate: RESULT_AS_VALUE@21: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a field at a time: it is not passed, stored, returned, spread or s / ref: RESULT_AS_VALUE@21: todos is a JS result whose fields hold or fail where each is read (todos.data), so it is read a field at a time: it is not passed, stored, returned, spread or s
+ ✗ router-provider · good accepted · main.rx: accepted by the crate — RENDERS_ESCAPES@6: renders what its router carries, and props is a prop, which whatever applies the component may give: the components it carries cannot be named | COMPONENT_AS_VALUE@22: component Root is carried by createRootRoute(…), but nothing renders it: pass what carries it to a JS component's prop declared `renders` (MO-11o) | COMPONENT_AS_VALUE@23: component Home is carried by createRoute(…),
+ ✗ router-provider · good accepted · main.rx: accepted by ref/ — RENDERS_ESCAPES@6: renders what its router carries, and props is a prop, which whatever applies the component may give: the components it carries cannot be named | COMPONENT_AS_VALUE@22: component Root is carried by createRootRoute(…), but nothing renders it: pass what carries it to a JS component's prop declared `renders` (MO-11o) | COMPONENT_AS_VALUE@23: component Home is carried by createRoute(…),
+ ✗ router-provider · types kept · rx-tsc: clean with the library's types — main.rx:22:1 - error COMPONENT_AS_VALUE: component Root is carried by createRootRoute(…), but nothing renders it: pass what carries it to a JS component's prop declared `renders` (MO-11o) (RG-4a) main.rx:23:1 - error COMPONENT_AS_VALUE: component Home is carried by createRoute(…), but nothing renders it: pass what carries it to a JS component's prop declared `renders` (MO-11o) (RG-4a) main.rx:24:1 - error COMPONENT_A
+ ✗ router-provider · runtime ok · the good program runs — not compiled: the checker refused it
+ ✗ router-provider · bad caught · a page that can fail, with no errored boundary around the outlet (UNHANDLED_FAILURE) — crate: RENDERS_ESCAPES@6: renders what its router carries, and props is a prop, which whatever applies the component may give: the components it carries cannot be named | COMPONENT_AS_VALUE@20: component Root is carried by createRootRoute(…), but nothing renders it: pass what carries it to a JS component's prop declared `renders` (MO-11o) | COMPONENT_AS_VALUE@21: component Home is carried by createRo
+ ✗ router-provider · bad caught · the router built, and never rendered (COMPONENT_AS_VALUE) — crate: RENDERS_ESCAPES@6: renders what its router carries, and props is a prop, which whatever applies the component may give: the components it carries cannot be named | COMPONENT_AS_VALUE@22: component Root is carried by createRootRoute(…), but nothing renders it: pass what carries it to a JS component's prop declared `renders` (MO-11o) | COMPONENT_AS_VALUE@23: component Home is carried by createRo
+ ✗ router-provider · bad caught · a client-only build with no loading above a page that waits (ASYNC_OUTSIDE_LOADING_BOUNDARY) — crate: RENDERS_ESCAPES@6: renders what its router carries, and props is a prop, which whatever applies the component may give: the components it carries cannot be named | COMPONENT_AS_VALUE@22: component Root is carried by createRootRoute(…), but nothing renders it: pass what carries it to a JS component's prop declared `renders` (MO-11o) | COMPONENT_AS_VALUE@23: component Home is carried by createRo
+ ✗ sequential-awaits · bad caught · two independent loads awaited one after the other (advice: ASYNC_WATERFALL) — crate: accepted, advice none / ref: accepted, advice none
+ ✗ source-mutation · bad caught · the source's array pushed to in a handler: the view never hears of it (MUTATION_IN_PLACE) — crate: accepted / ref: accepted
+ ✗ source-mutation · bad caught · a prop's array sorted in place while the view computes: the parent's source is reordered under it (MUTATION_IN_PLACE) — crate: accepted / ref: accepted
+ ✗ source-mutation · bad caught · the list spliced inside a functional write's own argument (MUTATION_IN_PLACE) — crate: accepted / ref: accepted
+ ✗ ssr-divergence · bad caught · a `pure` JS call that answers differently on each side, read by the view (the declaration's assertion: reported when it runs) (dev: HYDRATION_MISMATCH|mismatch) — ran silently
+ ✗ start-route · bad caught · the page's data read with no errored boundary around it (UNHANDLED_FAILURE) — crate: accepted / ref: accepted
+ ✗ store-updater · good accepted · main.rx: accepted by the crate — REACTIVE_WRITE_IN_OWNED_SCOPE@12: a statement-bodied closure in reactive scope (SC-3: a closure created here is a pure function) | DRAFT_ESCAPES@15: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`(d) => { … }`) — a function made elsewhere would be given the draft wh | DRAFT_ESCAPES@16: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`
+ ✗ store-updater · good accepted · main.rx: accepted by ref/ — REACTIVE_WRITE_IN_OWNED_SCOPE@12: a statement-bodied closure in reactive scope (SC-3: a closure created here is a pure function) | DRAFT_ESCAPES@15: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`(d) => { … }`) — a function made elsewhere would be given the draft wh | DRAFT_ESCAPES@16: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`
+ ✗ store-updater · types kept · rx-tsc: clean with the library's types — main.rx:12:3 - error REACTIVE_WRITE_IN_OWNED_SCOPE: a statement-bodied closure in reactive scope (SC-3: a closure created here is a pure function) (W-2) main.rx:15:3 - error DRAFT_ESCAPES: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`(d) => { … }`) — a function made elsewhere would be given the draft where the checker cannot see what it does with it (MO-10i) main.rx:16:3 -
+ ✗ store-updater · runtime ok · the good program runs — not compiled: the checker refused it
+ ✗ store-updater · bad caught · the setter called while the view computes (IO_IN_REACTIVE) — crate: REACTIVE_WRITE_IN_OWNED_SCOPE@12: a statement-bodied closure in reactive scope (SC-3: a closure created here is a pure function) | DRAFT_ESCAPES@14: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`(d) => { … }`) — a function made elsewhere would be given the draft wh | DRAFT_ESCAPES@15: setCart(…) hands this callback a library's draft: write the callback here, as a clo
+ ✗ store-updater · bad caught · the shared updater also called by hand, with something that is no draft (DRAFT_ESCAPES) — crate: REACTIVE_WRITE_IN_OWNED_SCOPE@12: a statement-bodied closure in reactive scope (SC-3: a closure created here is a pure function) | DRAFT_ESCAPES@15: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`(d) => { … }`) — a function made elsewhere would be given the draft wh / ref: REACTIVE_WRITE_IN_OWNED_SCOPE@12: a statement-bodied closure in reactive scope (SC-3: a closure
+ ✗ store-updater · bad caught · live rows of the draft kept by a forEach callback (DRAFT_ESCAPES, or harmless) — crate: REACTIVE_WRITE_IN_OWNED_SCOPE@12: a statement-bodied closure in reactive scope (SC-3: a closure created here is a pure function) | DRAFT_ESCAPES@15: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`(d) => { … }`) — a function made elsewhere would be given the draft wh | DRAFT_ESCAPES@16: setCart(…) hands this callback a library's draft: write the callback here, as a clo
+ ✗ store-updater · bad caught · the draft's iterator kept (DRAFT_ESCAPES, or harmless) — crate: REACTIVE_WRITE_IN_OWNED_SCOPE@12: a statement-bodied closure in reactive scope (SC-3: a closure created here is a pure function) | DRAFT_ESCAPES@15: setCart(…) hands this callback a library's draft: write the callback here, as a closure (`(d) => { … }`) — a function made elsewhere would be given the draft wh | DRAFT_ESCAPES@16: setCart(…) hands this callback a library's draft: write the callback here, as a clo
+ ✗ table-pagination · good accepted · main.rx: accepted by the crate — RENDERS_ESCAPES@35: row may hold a part of table, whose components `renders` checked where table is bound, and here it is passed to props.onPick(…): render it in the view where tab | RENDERS_ESCAPES@38: table holds components `renders` checked where table is bound, and here it is passed to as pages: render it in the view where table is bound — what leav | RENDERS_ESCAPES@38: table holds components `renders` c
+ ✗ table-pagination · good accepted · main.rx: accepted by ref/ — RENDERS_ESCAPES@35: row may hold a part of table, whose components `renders` checked where table is bound, and here it is passed to props.onPick(…): render it in the view where tab | RENDERS_ESCAPES@38: table holds components `renders` checked where table is bound, and here it is passed to as pages: render it in the view where table is bound — what leav | RENDERS_ESCAPES@38: table holds components `renders` c
+ ✗ table-pagination · types kept · rx-tsc: clean with the library's types — main.rx:35:7 - error RENDERS_ESCAPES: row may hold a part of table, whose components `renders` checked where table is bound, and here it is passed to props.onPick(…): render it in the view where table is bound — what leaves that view is a primitive made of it (`str(…)`, a template, arithmetic, a comparison, `len(…)`) — or declare the library `renders(later)` with a prop that `renders` it (MO-11o), or `renders(root, …
+ ✗ table-pagination · runtime ok · the good program runs — not compiled: the checker refused it
+ ✗ table-pagination · bad caught · a row of the table handed up through a prop's callback (RENDERS_ESCAPES) — crate: RENDERS_ESCAPES@35: row may hold a part of table, whose components `renders` checked where table is bound, and here it is passed to props.onPick(…): render it in the view where tab | RENDERS_ESCAPES@38: table holds components `renders` checked where table is bound, and here it is passed to as pages: render it in the view where table is bound — what leav | RENDERS_ESCAPES@38: table holds components `ren
+ ✗ table-pagination · bad caught · the table sent up through a callback kept in a record (RENDERS_ESCAPES) — crate: RENDERS_ESCAPES@35: row may hold a part of table, whose components `renders` checked where table is bound, and here it is passed to props.onPick(…): render it in the view where tab | RENDERS_ESCAPES@38: table holds components `renders` checked where table is bound, and here it is passed to as pages: render it in the view where table is bound — what leav | RENDERS_ESCAPES@38: table holds components `ren
+ ✗ table-pagination · bad caught · a page turned while the view computes (the handler called, not passed) (IO_IN_REACTIVE) — crate: RENDERS_ESCAPES@35: row may hold a part of table, whose components `renders` checked where table is bound, and here it is passed to props.onPick(…): render it in the view where tab | RENDERS_ESCAPES@38: table holds components `renders` checked where table is bound, and here it is passed to as pages: render it in the view where table is bound — what leav | RENDERS_ESCAPES@38: table holds components `ren
diff --git a/bench/baseline-rebased.txt b/bench/baseline-rebased.txt
new file mode 100644
index 00000000..76def156
--- /dev/null
+++ b/bench/baseline-rebased.txt
@@ -0,0 +1,101 @@
+task good accepted types kept runtime ok bad caught unrepresentable hand-written .d.rx words `any` in .d.rx
+-------------------------------------------------------------------------------------------------------------------------------------------
+context-provider 3/3 ✓ 5/5 ✓ 4/4 ✓ 5/7 ✗ — — —
+duplicate-keys 3/3 ✓ 3/3 ✓ 3/3 ✓ 1/2 ✗ — — —
+effect-derived 3/3 ✓ 3/3 ✓ 4/4 ✓ 1/5 ✗ — 0 0
+formisch-field-array 3/3 ✓ 6/6 ✓ 7/7 ✓ 4/5 ✗ — 35 26
+formisch-field-path 3/3 ✓ 6/6 ✓ 4/4 ✓ 2/2 ✓ 2/2 ✓ 37 16
+frozen-read 3/3 ✓ 3/3 ✓ 3/3 ✓ 4/4 ✓ — 2 0
+keyed-edits 3/3 ✓ 4/4 ✓ 3/7 ✗ 4/6 ✗ — — —
+kobalte-dialog 3/3 ✓ 4/4 ✓ 5/5 ✓ 3/3 ✓ 2/2 ✓ 18 28
+kobalte-select 1/3 ✗ 4/5 ✗ 0/1 ✗ 2/3 ✗ 1/1 ✓ 11 60
+listener-cleanup 3/3 ✓ 3/3 ✓ 4/4 ✓ 4/4 ✓ — 3 0
+optimistic-todo 3/3 ✓ 4/4 ✓ 6/6 ✓ 4/6 ✗ — — —
+primitives-virtual 3/3 ✓ 5/5 ✓ 6/6 ✓ 3/5 ✗ 1/1 ✓ 24 17
+projection-selection 3/3 ✓ 3/4 ✗ 4/4 ✓ 2/4 ✗ — — —
+query-forward 3/3 ✓ 6/6 ✓ 6/6 ✓ 5/5 ✓ — 30 5
+query-mutation 3/3 ✓ 5/5 ✓ 5/5 ✓ 4/7 ✗ — 39 11
+router-data 3/3 ✓ 5/5 ✓ 5/5 ✓ 7/7 ✓ — 61 7
+router-provider 3/3 ✓ 5/5 ✓ 4/4 ✓ 5/5 ✓ 1/1 ✓ 51 8
+sequential-awaits 3/3 ✓ 3/3 ✓ 4/4 ✓ 2/3 ✗ — 0 2
+source-mutation 3/3 ✓ 3/3 ✓ 3/3 ✓ 4/4 ✓ — — —
+ssr-divergence 3/3 ✓ 3/3 ✓ 3/3 ✓ 2/3 ✗ — 3 0
+start-route 3/3 ✓ 5/5 ✓ 8/8 ✓ 2/2 ✓ 1/1 ✓ 20 0
+store-helper 3/3 ✓ 3/4 ✗ 1/4 ✗ 4/4 ✓ — 12 3
+store-updater 3/3 ✓ 5/5 ✓ 5/5 ✓ 5/5 ✓ — 12 0
+table-pagination 1/3 ✗ 7/8 ✗ 0/1 ✗ 5/5 ✓ — 79 12
+-------------------------------------------------------------------------------------------------------------------------------------------
+total 68/72 103/107 97/106 84/106 8/8 437 195
+
+Not green (39):
+ ✗ context-provider · bad caught · the provided action called while the view computes (ACTION_CALLED_IN_OWNED_SCOPE) — crate: accepted / ref: accepted
+ ✗ context-provider · bad caught · the same through a prop: a row's handler called, not passed on (ACTION_CALLED_IN_OWNED_SCOPE) — crate: accepted / ref: accepted
+ ✗ duplicate-keys · bad caught · rows added with a key the list already has (known only when it runs) (dev: duplicate key|DUPLICATE_KEY) — ran silently
+ known: 06 ST-4d, 08 CN-2: a key computed at run time is the data's (bin R). The checker refuses rows written out with one key; it cannot see a key that a click computes, a static check does not become a run-time one, and Solid's development build reports no duplicate either. The variant stays as the measure of that limit.
+ ✗ effect-derived · bad caught · the total kept in a source, written by a mount effect that reads the others: computed once, stale after (EFFECT_RELAY_TEAR) — crate: accepted / ref: accepted
+ ✗ effect-derived · bad caught · the same with the inputs named: a frame late, an equation written the long way (EFFECT_RELAY_TEAR) — crate: accepted / ref: accepted
+ ✗ effect-derived · bad caught · the history appended by an effect on the quantity, not by the click that changed it (EFFECT_RELAY_TEAR) — crate: accepted / ref: accepted
+ ✗ effect-derived · bad caught · the title set by a mount effect that reads the total by name: sent once, never again (advice: SNAPSHOT_IN_EFFECT) — crate: accepted, advice none / ref: accepted, advice none
+ ✗ formisch-field-array · bad caught · the list of row ids changed in place (MUTATION_IN_PLACE) — crate: accepted / ref: accepted
+ ✗ keyed-edits · runtime ok · rename in place: the row keeps its state — new,cook,wash,read / open cook
+ ✗ keyed-edits · runtime ok · remove: the others stay as they are — cook,wash,read / open cook
+ ✗ keyed-edits · runtime ok · reset to rows written out: the kept keys keep their rows' state — wash,cook / open
+ ✗ keyed-edits · runtime ok · no console errors or warnings — ["[UNRECOGNIZED_INSERT_VALUE] Unrecognized value. Skipped inserting (function).\n[UNRECOGNIZED_INSERT_VALUE] what it means and how to fix it: https://docs.solidjs.com/reference/solid-js/diagnostics/unrecognized-insert-value\n[UNRECOGNIZED_INSERT_VALUE] agent repair guide: node_modules/solid-js/skills/re"]
+ ✗ keyed-edits · bad caught · the list reset from a handler with two rows of one key (DUPLICATE_KEY) — crate: accepted / ref: accepted
+ ✗ keyed-edits · bad caught · rows added in a handler's functional write, two written with one key (DUPLICATE_KEY) — crate: accepted / ref: accepted
+ ✗ kobalte-select · good accepted · main.rx: accepted by the crate — VIEW_FN_EXPECTED@22: 's children are a function of what it renders: write them as `{view (item) { … }}`
+ ✗ kobalte-select · good accepted · main.rx: accepted by ref/ — VIEW_FN_EXPECTED@22: 's children are a function of what it renders: write them as `{view (item) { … }}`
+ ✗ kobalte-select · types kept · rx-tsc: clean with the library's types — main.rx:22:7 - error VIEW_FN_EXPECTED: 's children are a function of what it renders: write them as `{view (item) { … }}` (MO-11k) Found 1 ReactiveScript error. VIEW_FN_EXPECTED: why, and the fix — https://github.com/solidjs/reactivescript/blob/main/guide/diagnostics.md#view_fn_expected
+ ✗ kobalte-select · runtime ok · the good program runs — not compiled: the checker refused it
+ ✗ kobalte-select · bad caught · an item rendered outside the select (its context is the listbox's, which only running it shows) (dev: context|Context|within|undefined|null) — not compiled: VIEW_FN_EXPECTED@22: 's children are a function of what it renders: write them as `{view (item) { … }}`
+ ✗ optimistic-todo · bad caught · an optimistic write outside an action: a guess in a handler that awaits nothing (GUESS_OUTSIDE_ACTION) — crate: accepted / ref: accepted
+ ✗ optimistic-todo · bad caught · an await before the optimistic write: the row shows only once the server has answered (advice: GUESS_AFTER_AWAIT) — crate: accepted, advice none / ref: accepted, advice none
+ ✗ primitives-virtual · bad caught · a listener's disposer dropped (its type is the library's alias for `() => void`) (DISPOSER_DROPPED) — crate: accepted / ref: accepted
+ ✗ primitives-virtual · bad caught · a listener added by hand in a click handler, its disposer dropped: one more on every click (DISPOSER_DROPPED) — crate: accepted / ref: accepted
+ ✗ projection-selection · types kept · rx-tsc: clean with the library's types — main.rx(14,76): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. No index signature with a parameter of type 'string' was found on type '{}'. main.rx(14,110): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. No index signature with a parameter of type 'string' was found on ty
+ ✗ projection-selection · bad caught · the selection kept in a store, written by an effect on the picked id (EFFECT_RELAY_TEAR) — crate: accepted / ref: accepted
+ ✗ projection-selection · bad caught · …by a mount effect that reads the picked id: the first row stays selected for ever (EFFECT_RELAY_TEAR) — crate: accepted / ref: accepted
+ ✗ query-mutation · bad caught · the query's function reads the id, its key does not: the cache answers the first todo for every id (KEY_MISSES_INPUT, or harmless) — accepted, and not harmless when run: the other todo is shown: milk
+ ✗ query-mutation · bad caught · the mutation run while the view computes (IO_IN_REACTIVE) — crate: accepted / ref: accepted
+ ✗ query-mutation · bad caught · the cache invalidated while the view computes (IO_IN_REACTIVE) — crate: accepted / ref: accepted
+ ✗ sequential-awaits · bad caught · two independent loads awaited one after the other (advice: ASYNC_WATERFALL) — crate: accepted, advice none / ref: accepted, advice none
+ ✗ ssr-divergence · bad caught · a `pure` JS call that answers differently on each side, read by the view (the declaration's assertion: reported when it runs) (dev: HYDRATION_MISMATCH|mismatch) — ran silently
+ known: 10 SV-7c (ruled 2026-10-24), 08 CN-5: `pure` is the author's assertion at the JS boundary, the one unchecked word, and that the function answers alike on both machines is part of it. What only the browser knows is `client` JS, which is checked (SV-7b: the good program). Solid's development build adopts the server's text without comparing it, so nothing reports this mismatch, and the language adds no run-time comparison of its own.
+ ✗ store-helper · types kept · rx-tsc: clean with the library's types — array.d.rx:3:1 - error DECLARATION_MISMATCH: sortBy: Type '(list: T[], key: keyof T) => void' is not assignable to type '__decl_sortBy'. Types of parameters 'key' and 'key' are incompatible. Type 'any' is not assignable to type 'never'. (TY-6) Found 1 ReactiveScript error. DECLARATION_MISMATCH: why, and the fix — https://github.com/solidjs/reactivescript/blob/main/guide/diagnostics.md#declaration_mismatch
+ ✗ store-helper · runtime ok · the helper moved the draft's own list: the store follows — todo,doing,done / 1 moves
+ ✗ store-helper · runtime ok · a helper that sorts in place — todo,doing,done
+ ✗ store-helper · runtime ok · and again, composed — todo,doing,done / 2 moves
+ ✗ table-pagination · good accepted · main.rx: accepted by the crate — RENDERS_ESCAPES@47: table holds components `renders` checked where table is bound, and here it is passed to as table: render it in the view where table is bou
+ ✗ table-pagination · good accepted · main.rx: accepted by ref/ — RENDERS_ESCAPES@47: table holds components `renders` checked where table is bound, and here it is passed to as table: render it in the view where table is bou
+ ✗ table-pagination · types kept · rx-tsc: clean with the library's types — main.rx:47:3 - error RENDERS_ESCAPES: table holds components `renders` checked where table is bound, and here it is passed to as table: render it in the view where table is bound — what leaves that view is a primitive made of it (`str(…)`, a template, arithmetic, a comparison, `len(…)`) — or declare the library `renders(later)` with a prop that `renders` it (MO-11o), or `renders(root, …)` if it
+ ✗ table-pagination · runtime ok · the good program runs — not compiled: the checker refused it
+
+Declarations (words written by hand over rx-declare's draft; `any`s held):
+ effect-derived/page.d.rx: 0 words by hand, 0 `any`
+ formisch-field-array/rx-types/@formisch/solid/v2.d.rx: 6 words by hand, 18 `any`
+ formisch-field-array/rx-types/valibot.d.rx: 29 words by hand, 8 `any`
+ formisch-field-path/rx-types/@formisch/solid/v2.d.rx: 6 words by hand, 9 `any`
+ formisch-field-path/rx-types/valibot.d.rx: 31 words by hand, 7 `any`
+ frozen-read/label.d.rx: 2 words by hand, 0 `any`
+ kobalte-dialog/rx-types/@kobalte/core/dialog.d.rx: 18 words by hand, 28 `any`
+ kobalte-select/rx-types/@kobalte/core/select.d.rx: 11 words by hand, 60 `any`
+ listener-cleanup/keys.d.rx: 3 words by hand, 0 `any`
+ primitives-virtual/rx-types/@solid-primitives/event-listener.d.rx: 4 words by hand, 11 `any`
+ primitives-virtual/rx-types/@solid-primitives/resize-observer.d.rx: 3 words by hand, 4 `any`
+ primitives-virtual/virtual.d.rx: 17 words by hand, 2 `any`
+ query-forward/api.d.rx: 8 words by hand, 1 `any`
+ query-forward/rx-types/@tanstack/solid-query.d.rx: 22 words by hand, 4 `any`
+ query-mutation/api.d.rx: 6 words by hand, 2 `any`
+ query-mutation/rx-types/@tanstack/solid-query.d.rx: 33 words by hand, 9 `any`
+ router-data/people.d.rx: 6 words by hand, 1 `any`
+ router-data/rx-types/@solidjs/router.d.rx: 55 words by hand, 6 `any`
+ router-provider/people.d.rx: 9 words by hand, 0 `any`
+ router-provider/rx-types/@tanstack/solid-router.d.rx: 42 words by hand, 8 `any`
+ sequential-awaits/api.d.rx: 0 words by hand, 2 `any`
+ ssr-divergence/env.d.rx: 3 words by hand, 0 `any`
+ start-route/src/people.d.rx: 20 words by hand (rx-declare drafts nothing for it: the module has no types), 0 `any`
+ store-helper/array.d.rx: 0 words by hand, 3 `any`
+ store-helper/rx-types/solid-js.d.rx: 12 words by hand, 0 `any`
+ store-updater/audit.d.rx: 0 words by hand, 0 `any`
+ store-updater/rx-types/solid-js.d.rx: 12 words by hand, 0 `any`
+ table-pagination/table.d.rx: 79 words by hand, 12 `any`
diff --git a/bench/harness.mjs b/bench/harness.mjs
new file mode 100644
index 00000000..82f5509c
--- /dev/null
+++ b/bench/harness.mjs
@@ -0,0 +1,259 @@
+// What bench/run.mjs runs a task with: the workspace (the libraries from npm, once), both checkers, rx-tsc, the compiled
+// program on the server and in Chromium. See bench/README.md.
+import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
+import { execFileSync, spawnSync } from "node:child_process";
+import { createServer } from "node:http";
+import { createRequire } from "node:module";
+import { fileURLToPath, pathToFileURL } from "node:url";
+import path from "node:path";
+
+export const here = path.dirname(fileURLToPath(import.meta.url));
+export const repo = path.resolve(here, "..");
+export const ws = path.join(here, ".out/ws");
+export const rxc = process.env.RXC || path.join(repo, "compiler/target/release/rxc");
+
+/** The workspace: bench/package.json installed from npm (once; again when it changes), with this repository's compiler,
+ * runtime and language server linked as installed. Every task is a folder under it, so each resolves the same Solid. */
+export function workspace() {
+ const pkg = readFileSync(path.join(here, "package.json"), "utf8");
+ mkdirSync(ws, { recursive: true });
+ const at = path.join(ws, "package.json");
+ if (!existsSync(path.join(ws, "node_modules/solid-js")) || !existsSync(at) || readFileSync(at, "utf8") !== pkg) {
+ writeFileSync(at, pkg);
+ execFileSync("npm", ["install", "--no-audit", "--no-fund", "--silent", "--legacy-peer-deps"], { cwd: ws, stdio: "inherit" });
+ }
+ linkOwn(path.join(ws, "node_modules"));
+}
+/** This repository's packages in a node_modules, as an app installs them: the compiler and the language server linked,
+ * the runtime copied (its peers are then that install's Solid, one copy). */
+function linkOwn(nm) {
+ const rx = path.join(nm, "@reactivescript"); rmSync(rx, { recursive: true, force: true }); mkdirSync(path.join(rx, "runtime"), { recursive: true });
+ symlinkSync(path.join(repo, "compiler"), path.join(rx, "compiler"));
+ symlinkSync(path.join(repo, "tooling/rx-language-server"), path.join(rx, "language-server"));
+ for (const f of ["package.json", "dist", "rx-lib.d.ts"]) cpSync(path.join(repo, "runtime", f), path.join(rx, "runtime", f), { recursive: true });
+}
+/** A task with a package.json of its own (beside its task.mjs) has an install of its own, for a library that pins
+ * another version of what the workspace holds: installed once into bench/.out/ws/deps/ (again when it changes). */
+function ownInstall(id) {
+ const from = path.join(here, "tasks", id, "package.json"); if (!existsSync(from)) return null;
+ const pkg = readFileSync(from, "utf8"); const at = path.join(ws, "deps", id); mkdirSync(at, { recursive: true });
+ const had = path.join(at, "package.json");
+ if (!existsSync(path.join(at, "node_modules/solid-js")) || !existsSync(had) || readFileSync(had, "utf8") !== pkg) {
+ writeFileSync(had, pkg);
+ execFileSync("npm", ["install", "--no-audit", "--no-fund", "--silent", "--legacy-peer-deps"], { cwd: at, stdio: "inherit" });
+ }
+ linkOwn(path.join(at, "node_modules"));
+ return path.join(at, "node_modules");
+}
+
+/** A task's folder in the workspace: its `src/`, copied fresh. */
+export function stage(id) {
+ const dir = path.join(ws, "tasks", id);
+ rmSync(dir, { recursive: true, force: true }); mkdirSync(dir, { recursive: true });
+ cpSync(path.join(here, "tasks", id, "src"), dir, { recursive: true });
+ const own = ownInstall(id); if (own) symlinkSync(own, path.join(dir, "node_modules"), "dir");
+ if (!existsSync(path.join(dir, "tsconfig.json"))) writeFileSync(path.join(dir, "tsconfig.json"), JSON.stringify({ compilerOptions: { jsx: "preserve", jsxImportSource: "@solidjs/web", strict: true, noImplicitAny: true, target: "ES2022", module: "ESNext", moduleResolution: "Bundler", allowImportingTsExtensions: true, noEmit: true, skipLibCheck: true, lib: ["ES2023", "DOM", "DOM.Iterable"], types: [] }, include: ["**/*.rx", "**/*.d.ts"], exclude: ["node_modules", "dist", ".build"] }, null, 2));
+ return dir;
+}
+
+const codes = ds => ds.map(d => `${d.code}@${path.basename(d.file ?? "")}:${d.line}`);
+/** The crate's diagnostics for a program (`rxc check --json`). */
+export function crate(entry, spa, host) {
+ const r = spawnSync(rxc, ["check", "--json", ...(spa ? ["--spa"] : []), ...(host ? ["--whole-program", "--host", entry] : []), entry], { encoding: "utf8", maxBuffer: 1 << 26 });
+ try { const out = JSON.parse(r.stdout); return { diagnostics: out.diagnostics ?? [], advice: out.advice ?? [] }; } catch { return { diagnostics: [{ code: "CRASH", line: 0, file: entry, message: (r.stderr || r.stdout || "").slice(0, 400) }], advice: [] }; }
+}
+/** The reference checker's (`ref/src/check.ts`). */
+export function ref(entry, spa, host) {
+ const r = spawnSync(process.execPath, ["--experimental-strip-types", "--no-warnings", path.join(here, "ref-check.ts"), ...(spa ? ["--spa"] : []), ...(host ? ["--host"] : []), entry], { encoding: "utf8", maxBuffer: 1 << 26 });
+ try { const out = JSON.parse(r.stdout); return out.error ? { diagnostics: [{ code: out.code ?? "PARSE", line: 0, file: entry, message: out.error }], advice: [] } : out; } catch { return { diagnostics: [{ code: "CRASH", line: 0, file: entry, message: (r.stderr || r.stdout || "").slice(0, 400) }], advice: [] }; }
+}
+/** Both checkers on one program: what each says, and whether they say the same (code and line, in order). */
+export function both(entry, spa, host) {
+ const c = crate(entry, spa, host), r = ref(entry, spa, host);
+ // a parse error is one diagnostic on either side, placed differently: compared by code
+ const loose = [...c.diagnostics, ...r.diagnostics].some(d => d.line === 0);
+ const key = x => loose ? x.diagnostics.map(d => d.code) : codes(x.diagnostics);
+ return { crate: c, ref: r, agree: JSON.stringify(key(c)) === JSON.stringify(key(r)) && JSON.stringify(codes(c.advice)) === JSON.stringify(codes(r.advice)) };
+}
+
+/** rx-tsc over the task's tsconfig: TypeScript's errors and the crate's, as text ("" when clean). */
+export function rxTsc(dir) {
+ const r = spawnSync(process.execPath, [path.join(repo, "tooling/rx-language-server/bin/tsc.js"), "--noEmit", "-p", "tsconfig.json"], { cwd: dir, encoding: "utf8", env: { ...process.env, RXC: rxc } });
+ return r.status === 0 ? "" : String(r.stdout ?? "") + String(r.stderr ?? "") || `exit ${r.status}`;
+}
+
+/** One edit of one file, undone by the function it returns. A variant is one line changed: `[from, to]`, each once. */
+export function edit(dir, file, [from, to]) {
+ const f = path.join(dir, file); const good = readFileSync(f, "utf8");
+ if (!good.includes(from)) throw new Error(`the edit does not apply: ${JSON.stringify(from)} is not in ${file}`);
+ writeFileSync(f, good.replace(from, to));
+ return () => writeFileSync(f, good);
+}
+
+let seq = 0;
+/** The program compiled by the crate for one target (`rxc app`), each module written beside its `.rx` (`x.rx...mjs`),
+ * importing the others by those names. Returns the entry's file, or `{ diagnostics }`. */
+export function compile(entry, target, spa) {
+ const r = spawnSync(rxc, ["app", entry, "--target", target, ...(spa ? ["--spa"] : [])], { encoding: "utf8", maxBuffer: 1 << 27 });
+ let out; try { out = JSON.parse(r.stdout); } catch { return { error: (r.stderr || r.stdout || "").slice(0, 600) }; }
+ if (!out.modules) return out;
+ const n = ++seq; const name = p => `${p}.${n}.${target}.mjs`;
+ for (const [p, m] of Object.entries(out.modules)) writeFileSync(name(p), m.code.replace(/from "(\.{1,2}\/[^"]+\.rx)"/g, (_, s) => `from "${s}.${n}.${target}.mjs"`));
+ return { file: name(out.entry ?? entry), css: out.css };
+}
+
+const esbuild = () => createRequire(path.join(ws, "package.json"))("esbuild");
+const pw = () => createRequire(path.join(ws, "package.json"))("playwright");
+
+/** What a task's `run` drives the compiled program with. */
+export class Runner {
+ constructor(dir, entry, spa) { this.dir = dir; this.entry = path.join(dir, entry); this.spa = spa; this.checks = []; this.servers = []; this.problems = []; }
+ check(name, ok, got) { this.checks.push({ name, ok: !!ok, got: ok ? undefined : typeof got === "string" ? got.slice(0, 600) : JSON.stringify(got)?.slice(0, 600) }); return !!ok; }
+ /** The server's render of one URL: `{ html, text, error }` (the stream, to its end; hydration comments dropped from `text`). */
+ async ssr(url = "/", { wait = 4000 } = {}) {
+ const built = this.server ??= compile(this.entry, "ssr", this.spa);
+ if (!built.file) return { html: "", text: "", error: new Error(JSON.stringify(built).slice(0, 600)) };
+ const { createApp } = await import(pathToFileURL(path.join(ws, "node_modules/@reactivescript/runtime/dist/server.js")).href);
+ let html = "", error = null;
+ const caught = e => { error ??= e; };
+ process.on("uncaughtException", caught); process.on("unhandledRejection", caught);
+ try {
+ const main = (await import(pathToFileURL(built.file).href)).default;
+ const app = createApp({ request: new Request("http://localhost" + url) });
+ await new Promise((res, rej) => { try { app.stream(main(app), { write: c => { html += c; }, end: res }); } catch (e) { rej(e); } setTimeout(res, wait); });
+ await new Promise(r => setTimeout(r, 20));
+ } catch (e) { error ??= e; }
+ process.off("uncaughtException", caught); process.off("unhandledRejection", caught);
+ return { html, text: html.replace(/`); } }, end: () => res.end("