Skip to content

docs: correct WASM extension wording (WOR-145)#71

Merged
rickcrawford merged 2 commits intomainfrom
claude/find-onnx-classifier-HucVm
May 6, 2026
Merged

docs: correct WASM extension wording (WOR-145)#71
rickcrawford merged 2 commits intomainfrom
claude/find-onnx-classifier-HucVm

Conversation

@rickcrawford
Copy link
Copy Markdown
Contributor

Summary

Closes WOR-145. The audit ticket asked whether the WASM surface is the "stub" described in CLAUDE.md or the production-ready engine described in marketing docs. After auditing the code, the engine is real and CLAUDE.md / llms.txt are wrong.

What's actually in crates/sbproxy-extension/src/wasm/mod.rs (568 lines):

  • wasmtime + wasi-common with WASI preview-1 ABI
  • Sandbox: no preopens (empty FS), no networking, memory cap via max_memory_pages (default 256 = 16 MiB), CPU cap via epoch-interruption (default 1000 ms), stderr capture with 1 MiB per-call cap routed to tracing::debug!
  • Public API: WasmRuntime::new / is_available / execute, WasmConfig, build_request_input_with_agent_class, build_engine
  • E2E coverage: e2e/tests/wasm.rs round-trips body through the echo module
  • Examples shipped: examples/wasm/echo-rust/, examples/wasm/uppercase-tinygo/, examples/38-wasm-transform/
  • Documented honestly in docs/wasm-development.md and docs/scripting.md (already accurate, no changes needed)

Corrections in this PR:

  1. CLAUDE.md line 58 — drop "WASM stub" wording, name the actual stack (wasmtime + WASI preview-1).
  2. llms.txt line 214 — replace the misleading "WASI networking with host allowlist" claim. allowed_hosts is parsed as a forward-compat reservation but sockets are not exposed (mod.rs:23, mod.rs:113-114). The bullet now describes the real stdin/stdout body-transform surface.

Test plan

  • No Rust source changed; existing CI covers build / clippy / tests / rustdoc.
  • e2e/tests/wasm.rs already exercises the production WASM path end-to-end (echo module via static origin + wasm transform).
  • CI on this PR confirms doc-only edits don't regress anything.

Out of scope (follow-ups, not filed yet)

  • WASI sockets / allowed_hosts enforcement: if/when networking lands, llms.txt should be updated again. The allowed_hosts field already parses to keep the config schema stable.
  • WASM as a request/response modifier (currently exposed only as a body transform). docs/scripting.md is already explicit about this scope.

https://claude.ai/code/session_019zc6oCY6Kx2ssiuZEQdznk


Generated by Claude Code

claude added 2 commits May 6, 2026 15:30
CLAUDE.md described the WASM surface as "WASM stub" but the production
crate ships a real wasmtime + WASI preview-1 runtime: 568 lines in
crates/sbproxy-extension/src/wasm/mod.rs with sandboxed memory caps,
epoch-interrupt CPU timeouts, stderr capture, no FS, no network. End-
to-end coverage exists in e2e/tests/wasm.rs and examples/wasm/. Drop
"stub" from CLAUDE.md and tighten the language to match reality.

llms.txt claimed "WASI networking with host allowlist" but the code
parses allowed_hosts as a forward-compat reservation only; sockets
are not exposed today (mod.rs:23, mod.rs:113-114). Rewrite the bullet
to describe the actual stdin/stdout body-transform surface.

Closes WOR-145.

https://claude.ai/code/session_019zc6oCY6Kx2ssiuZEQdznk
@rickcrawford rickcrawford merged commit c5e5819 into main May 6, 2026
4 checks passed
@rickcrawford rickcrawford deleted the claude/find-onnx-classifier-HucVm branch May 6, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants