Repository navigation
access: replace biscuit-wasm with @statewalker/webrun-biscuit 0.2.0 - #2
Merged
Merged
Conversation
…t-wasm httpeers-access speaks to the engine through one seam, src/biscuit.ts, which supplies what the wasm binding had and webrun-biscuit 0.1.0 lacks: literal binding for parameters, queries over the world snapshot, token-less authorization and failed-check text. The warm-up, the spurious-Timeout retry and the wasm loader go away; initBiscuit stays as a deprecated no-op. The demo pages lose the loader, both aliases, the optimizer exclusion and the copied .wasm; the browser suite's seam test becomes an alias-free one. All 169 existing access tests pass unchanged apart from the dependency allowlist; biscuit-wasm stays a devDependency because those tests mint attack tokens with it, which makes them cross-implementation checks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…verification
The engine seam loses its workarounds now that the engine has the API:
values are bound as `{name}` parameters through `Datalog.add` instead of
being quoted into source, claims are read with `evaluate(...).query`,
token-less decisions pass `null`, failed checks come with their rule text,
and `verifyToken` uses `verifyAsync` (WebCrypto Ed25519).
verifyToken 0.49 ms and authorize 0.12 ms per call in Node, against 0.53 ms
and 0.22 ms on biscuit-wasm; cold start is level.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
3 tasks done
Five references (webrun-http-browser, -http-proxy, -http-streams, -rpc, -streams) named packages that live in webrun-wire with `workspace:*`. That resolves only inside an assembly; a standalone checkout — CI — cannot install at all. Each now has its published range, which is exactly the version checked out in webrun-wire, so an assembly still links it locally. Also restores the literal em dash in two descriptions that an earlier commit on this branch had rewritten as `—`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`pnpm install --frozen-lockfile` has failed on every CI run since at least 2026-09-13, so nothing after it had run either: - The lockfile still recorded `overrides` linking three webrun-wire packages to a sibling `../webrun-wire` checkout, which package.json no longer declares: ERR_PNPM_LOCKFILE_CONFIG_MISMATCH. Regenerated in a standalone checkout; it now has no overrides, no link outside the repo, and every webrun package resolved from the registry. - `@statewalker/webrun-files-mem` was used through `catalog:` with no entry; an assembly's generated catalog had been supplying it. Added at ^0.9.0. - package.json's `pnpm.onlyBuiltDependencies` listed only esbuild, and it won over pnpm-workspace.yaml's list, so node-datachannel's install script was skipped and no `.node` binary existed — exactly the silent failure that yaml's own comment warns about. The package.json copy is removed; the documented yaml is now the only allowlist, and the binary builds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
With install working, the next CI steps failed for reasons older than this branch: - typecheck ran before any build. Packages resolve each other through `exports` pointing at dist/, so httpeers-ghost could not see httpeers-core's types. CI now runs `pnpm run build` first. - lint:check: a `<button>` without `type` in the demos' reset page, and misindented `aliasesIn` in the browser suite's vitest config. Replayed from a clean checkout with the exact CI sequence (Node 24.8 locally, CI uses 22): install, lint:check, build, typecheck and test all pass — sites 83, qr 21, core 57, relay 74, ghost 20, bridge 3, access 185, hub 43 (+4 skipped), libp2p 56 (+4 skipped), member 101, demos 13, conformance 44. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0.2.1 enforces the run budget inside an evaluation instead of only between fixpoint iterations. On 0.2.0, `a token carrying an exploding rule set denies rather than hanging` took 5,154 ms in CI against its 5 s bound, with a 1 s budget configured; on 0.2.1 it takes ~1,050 ms (185/185 against the published package). 0.2.1 also parses the reference's name grammar and ships LICENSE. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
@biscuit-auth/biscuit-wasmwith the pure-TypeScript@statewalker/webrun-biscuit@0.2.0(published to npm, statewalker/webrun-wire#6).What changes
src/biscuit.ts.{name}parameters (Datalog.add), never as text.evaluate(...).query.verifyTokenusesverifyAsync(WebCrypto Ed25519).Timeoutretry are gone.warmUpTokensandinitBiscuitstay exported as deprecated no-ops, because both are public API.ensureBiscuit(), both Vite aliases, the optimizer exclusion, the copied.wasmasset, or the tsconfig path..wasmis fetched.biscuit-wasmstays a devDependency of httpeers-access. The existing tests mint attack tokens with it, which makes them cross-implementation checks.Measured, same assembly, before → after
verifyTokenauthorize(allow)mintToken(hub only)Tests
The 169 original access tests pass unchanged; only the dependency allowlist in
boundary.test.tswas edited.Not in this PR
pnpm-lock.yamlis not regenerated.mainalready fails a standalonepnpm install --frozen-lockfile(ERR_PNPM_LOCKFILE_CONFIG_MISMATCH, overrides vs lockfile), and regenerating it would mix unrelated churn into this change.Nothing is deployed: the demo pages under
s3.httpeers.netare unchanged until someone builds and deploys.🤖 Generated with Claude Code