WAI dev and the relay close a WebSocket cleanly; Quantum Studio opens its course from a link #538

Merged
dcharlot merged 4 commits from wai/relay-ws-close-drain-2 into main 2026-10-30 07:52:11 -04:00
Owner

#533's four commits, rebuilt on main after #537 (no force-push): #537 sends the two members certified on the Mac Studio to its runner, which #533's run had put on the new laptops.

Three changes, two of them behind one console error.

WAI Studio's "no console error" check failed in WebKit on macOS (CI runs WebKit only on Linux, which does not report it): WebSocket connection to 'ws://127.0.0.1:…/moq' failed: Socket is not connected. Counting the console's errors after each step placed it at the pre-call test, which opens the relay's binding, waits for SETUP and closes (no error after leaving the room, one after the pre-call test). A browser sends its WebSocket Close right after its CLOSE_SESSION. That frame was still unread when the socket was shut, and a socket shut with the peer's bytes unread is reset, not closed.

  • wai dev's tunnel (dx/dev.rs), which carries /moq from the origin to the relay, shut the client's socket both ways as soon as the relay ended its side. It now half-closes each side and reads the client's last bytes, for at most 2 s after the relay's end. A relay that does not end its side after the client has gone is shut after 5 s. This removes the error: the Studio e2e passes every check in WebKit, Chromium and Firefox on macOS (it failed two in WebKit before). dev:: tests 10/10.

  • joule-moq-relay's mux stopped reading a session's pipe as soon as the session closed, which is the same fault at the relay's own socket for a client that connects to it directly. It now reads on, discarding, until the peer ends the pipe or for at most 2 s. The crate's whole suite passes on Linux.

  • Quantum Studio: #course opens the circuits course and #course=<lesson> opens it at that lesson. A test opens /#course=bell, and both READMEs say so. The generated llms.txt and llms-full.txt list the quantum IDE, the interference course and WAI's home, so the site's sync no longer adds them. The CLI's guide tests (which hold the committed docs to the generator) pass.

  • Two tests held to what they test (the first run's two red checks):

    • wai-quantum's engine::sets test compared two runs of a set "less the wall clock" but kept each item's Merkle path. A path's sibling leaves digest the other items' results, elapsed_ms included, so on a loaded runner the paths differed (sets.rs:556). It now strips the path too; verify() still checks the path against the root. 4/4, three runs.
    • Quantum Studio's browser test waited, after Ctrl+Enter, for an idle run button, which can hold before the run begins, and then counted the history. It now waits for the history's new entry. 241/241 on macOS.

Clippy finds nothing in the changed code. Public-name check: clean.

🤖 Generated with Claude Code

#533's four commits, rebuilt on main after #537 (no force-push): #537 sends the two members certified on the Mac Studio to its runner, which #533's run had put on the new laptops. Three changes, two of them behind one console error. **WAI Studio's "no console error" check failed in WebKit on macOS** (CI runs WebKit only on Linux, which does not report it): `WebSocket connection to 'ws://127.0.0.1:…/moq' failed: Socket is not connected`. Counting the console's errors after each step placed it at the pre-call test, which opens the relay's binding, waits for SETUP and closes (no error after leaving the room, one after the pre-call test). A browser sends its WebSocket Close right after its CLOSE_SESSION. That frame was still unread when the socket was shut, and a socket shut with the peer's bytes unread is reset, not closed. - **`wai dev`'s tunnel** (`dx/dev.rs`), which carries `/moq` from the origin to the relay, shut the client's socket both ways as soon as the relay ended its side. It now half-closes each side and reads the client's last bytes, for at most 2 s after the relay's end. A relay that does not end its side after the client has gone is shut after 5 s. This removes the error: the Studio e2e passes every check in WebKit, Chromium and Firefox on macOS (it failed two in WebKit before). `dev::` tests 10/10. - **joule-moq-relay's mux** stopped reading a session's pipe as soon as the session closed, which is the same fault at the relay's own socket for a client that connects to it directly. It now reads on, discarding, until the peer ends the pipe or for at most 2 s. The crate's whole suite passes on Linux. - **Quantum Studio:** `#course` opens the circuits course and `#course=<lesson>` opens it at that lesson. A test opens `/#course=bell`, and both READMEs say so. The generated `llms.txt` and `llms-full.txt` list the quantum IDE, the interference course and WAI's home, so the site's sync no longer adds them. The CLI's guide tests (which hold the committed docs to the generator) pass. - **Two tests held to what they test** (the first run's two red checks): - wai-quantum's `engine::sets` test compared two runs of a set "less the wall clock" but kept each item's Merkle path. A path's sibling leaves digest the other items' results, `elapsed_ms` included, so on a loaded runner the paths differed (`sets.rs:556`). It now strips the path too; verify() still checks the path against the root. 4/4, three runs. - Quantum Studio's browser test waited, after Ctrl+Enter, for an idle run button, which can hold before the run begins, and then counted the history. It now waits for the history's new entry. 241/241 on macOS. Clippy finds nothing in the changed code. Public-name check: clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Quantum Studio: `#course` in the page's address opens the Course pane, and
  `#course=<lesson>` opens it at that lesson; it goes with `#qasm=…`. A test
  opens `/#course=bell` and finds the pane open at the Bell lesson, with no
  console error. Both READMEs say so.
- The generated llms.txt (and llms-full.txt) list the quantum IDE, the
  interference course and WAI's home beside the console and Quantum Studio,
  and say the Studio's course opens from `#course`. The site's sync no longer
  needs to add them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
When a session closed (the peer's WT_CLOSE_SESSION, or this end's), the mux's
reader stopped reading at once; the writer then sent its Close and the socket
went. A browser sends its WebSocket Close right after its CLOSE_SESSION, so
that frame was still unread when the socket was shut, and a socket shut with
unread bytes is reset rather than closed. WebKit reports the reset on the
console ("WebSocket connection to ws://…/moq failed: Socket is not
connected"), which failed WAI Studio's "no console error" check in WebKit on
macOS after its pre-call test (which opens the relay's binding, waits for
SETUP and closes). Counted per step: no error after leaving the room, one after
the pre-call test.

The reader now reads on after the close, discarding, until the peer ends the
pipe or for at most 2 s, so the closing handshake finishes and the socket
closes cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai dev's origin tunnels /moq to the relay. When the relay ended its side, the
tunnel shut the client's socket both ways at once (and the relay's when the
client ended first). A browser's WebSocket Close, sent right after its
CLOSE_SESSION, was then still unread, and a socket shut with the peer's bytes
unread is reset, not closed. WebKit reports the reset ("WebSocket connection to
ws://…/moq failed: Socket is not connected"): WAI Studio's "no console error"
check failed in WebKit on macOS after its pre-call test (no error after leaving
the room, one after the pre-call test).

Each side's end now goes on as a half-close. After the relay's end the tunnel
reads on (discarding what can no longer go to the relay) until the client ends
its side, or for at most 2 s. A relay that does not end its side after the
client has gone is shut after 5 s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two tests held to what they test: a set's items less their paths, Ctrl+Enter by its entry
All checks were successful
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 22m57s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Successful in 27s
wai-quantum service / service · linux (pull_request) Successful in 2m11s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 15s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 23s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 23s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 9s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 1m1s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m46s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m13s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 7m33s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 3m21s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (pull_request) Successful in 1m42s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 3m42s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 22m2s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m11s
wai-quantum views in agent hosts / views · a scripted host (pull_request) Successful in 3m11s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m30s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m40s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 13m52s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 23m59s
wai-quantum views in agent hosts / views · the page and its engine (pull_request) Successful in 6m23s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 16m19s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 8m51s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 6m3s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 10m31s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 40m10s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 36m9s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 58m40s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 15m0s
b3f543ea8a
- wai-quantum engine::sets: "the same set runs to the same bytes, less the wall
  clock" stripped each item's elapsed_ms and receipt but kept its Merkle path.
  A path's sibling leaves digest the other items' results, elapsed_ms included,
  so two runs whose items took different times gave different paths, as on a
  loaded linux runner (#533, sets.rs:556: the second path hash differed). The
  path goes too; verify() still checks it against the root.
- Quantum Studio's browser test: after Ctrl+Enter it waited for the run button
  and an idle status, which can both hold before the run has begun, and then
  counted the history. It now waits for the history's new entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!538
No description provided.