HS: socket feature (E36) — WebSocket wrapper + RPC proxy (+16 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

Parser: socket feature (name, url, with timeout, on message, json/raw).
Runtime: hs-socket-register!, hs-socket-normalise-url, hs-socket-bind-name!,
  hs-socket-reconnect!, hs-socket-rpc!, hs-socket-resolve-rpc! — full
  WebSocket lifecycle with reconnect, pending-map RPC, and timeout.
Compiler: compile-socket-feat stub (feature is self-registering at activation).
Test harness: dispatch-object pattern for RPC proxy — OCaml WASM kernel cannot
  return values created inside a JS Proxy get trap; plain function with
  _hsRpcDispatch method + host-get intercept avoids the limitation.
Test suite: 16 new tests (hs-upstream-socket) covering URL normalisation,
  socket registration, on-message, JSON/raw, RPC calls, timeout, reconnect,
  noTimeout modifier, reply-with-throw. 16/16 pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-06 11:44:13 +00:00
parent 0f63216adc
commit 623529d3be
7 changed files with 886 additions and 42 deletions

View File

@@ -4,10 +4,10 @@ Live tally for `plans/hs-conformance-to-100.md`. Update after every cluster comm
```
Baseline: 1213/1496 (81.1%)
Merged: 1377/1496 (92.0%) delta +164
Merged: 1403/1496 (93.8%) delta +190
Worktree: all landed
Target: 1496/1496 (100.0%)
Remaining: ~120 tests (clusters 17/29(partial)/33/34 partial)
Remaining: ~89 tests
```
## Cluster ledger
@@ -72,7 +72,7 @@ Remaining: ~120 tests (clusters 17/29(partial)/33/34 partial)
| # | Cluster | Status | Design doc |
|---|---------|--------|------------|
| 36 | WebSocket + `socket` + RPC proxy | design-done | `plans/designs/e36-websocket.md` |
| 36 | WebSocket + `socket` + RPC proxy | done | +16 | (pending) |
| 37 | Tokenizer-as-API | done | +17 | 54b54f4e |
| 38 | SourceInfo API | design-done | `plans/designs/e38-sourceinfo.md` |
| 39 | WebWorker plugin | design-done | `plans/designs/e39-webworker.md` |
@@ -99,7 +99,7 @@ Defer until AD drain. Estimated ~25 recoverable tests.
| B | 7 | 0 | 0 | 0 | 0 | — | 7 |
| C | 4 | 1 | 0 | 0 | 0 | — | 5 |
| D | 2 | 2 | 0 | 0 | 1 | — | 5 |
| E | 2 | 0 | 0 | 0 | 0 | 3 | 5 |
| E | 3 | 0 | 0 | 0 | 0 | 2 | 5 |
| F | — | — | — | ~10 | — | — | ~10 |
## Maintenance