Repository navigation
state: a browser page closes a relay link that has gone silent, and dials again - #1546
Merged
Merged
Conversation
…ials again reap_idle was a no-op in the browser (wasm) build of the WebSocket transport. A page whose relay, or the path to it, went away without closing kept a link that would never speak again, so arigl never dialed again; native clients and the relay already close such a link (#1483). - In the browser, reap_idle closes and deletes a socket that has received nothing for the timeout (the relay pings every 2 s), so it is no longer a link, and arigl's net_step dials the relay again and re-asserts what it published. A backgrounded tab still answers the relay's Pings from onmessage, so it is not silent. - It also deletes the socket of a link the browser closed (its onclose has fired) and sweeps the dead connections, which piled up over reconnects. - arigl_web_smoke.mjs: a case with a fake relay on the test server (/apps/silent-relay) that sends one empty frame and then nothing. The page must log the close and dial a second time. Against arigl-web 4.0.9, without this change, the case fails (one open, no close) and the other 25 pass. - ci.yml: the arigl-web job also runs when the WebSocket transport changes.
… WebSocket transport ariglx-web is built without it (CVC_ENABLE_WS off), so CVC_ARIADNE_RELAY runs its document locally and the page never dials: the case failed there with no relay opens. The harness now looks for the browser's WebSocket API in the module's glue (arigl.js or ariglx.js), as cyprty's stage.sh does, and says when it skips the case.
transfix
enabled auto-merge (squash)
November 26, 2026 09:07
This was referenced Nov 26, 2026
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
…ive live-labels volume that spans frames (#1556) #1546 gated the case on the browser's WebSocket API in the module's glue. ariglx-web's threaded (wasm-mt) ariglx.js has that API even though the package is built without the WebSocket transport, so the case ran there, the page never dialed ("this build has no conference transport"), and the job failed: on #1546's last head and on master since c7b050f. The single-threaded ariglx-web job skipped it as meant. The case now runs only on arigl-web (arigl.js, no ariglx.js), the one package with a conference transport. Also: cvcgl_volume_grid_segment's cooperative live-labels check uses a 96^3 volume (was 56^3). A cooperative run gets about 4 ms of work a frame, and on a fast package-linux runner the 56^3 run finished inside one frame's slice on all three tries, so no frame saw the labels so far.
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
* chore: bump libcvc to 4.0.10 * arigl_web_smoke: run the silent-relay case on arigl-web alone; master's ariglx-web (wasm-mt) is red #1546 gated the case on the browser's WebSocket API in the module's glue. ariglx-web's threaded (wasm-mt) ariglx.js has that API even though the package is built without the WebSocket transport, so the case ran there, the page never dialed ("this build has no conference transport"), and the job failed: on #1546's last head and on master since c7b050f. The single-threaded ariglx-web job skipped it as meant. The case now runs only on arigl-web (arigl.js, no ariglx.js), the one package with a conference transport. * tests: physics_field_test's Debug budget, and the tvision file pick's Enter Two package-linux / libcvc-debug failures on PRs this week, neither in their changes: - PhysicsFieldWake.PackedBodiesStayBoundedAndSleep ran 1059 s in that lane on master (c7b050f) and timed out at 1200 s on #1552's and #1553's runs, three tries each. physics_field_test gets 2400 s. - ari_run_file_pick_upload_tvision failed three tries on both: the Open file window showed the typed name but never took the Enter (tvision reads keys that come in one burst as a paste). Enter now goes once the field shows the name, and again, up to three times, while the window stays open. * cvcgl_volume_grid_segment: a volume large enough that a cooperative run spans frames on any runner The live-labels check needs a cooperative run (CVC_SLICED_THREADING=cooperative, about 4 ms of work a frame) to span several frames, so some frame sees the labels so far. On a package-linux runner (#1556's run, 2026-11-26) the 56^3 run finished inside one frame's slice on all three tries: "labels so far shown while marching (56^3, cooperative): no". 96^3 is about five times the work. --------- Co-authored-by: Joe Rivera <[email protected]>
This was referenced Nov 27, 2026
Merged
transfix
added a commit
that referenced
this pull request
Nov 28, 2026
build-wasm.sh builds arigl-web's conference transport single-threaded only (libopus has no -pthread wasm build), so the wasm-mt package runs a CVC_ARIADNE_RELAY document locally and the relay is never dialed. HAS_WS read the glue, which a threaded build fills with the WebSocket API all the same, so it ran #1546's case there. ci.yml never builds a threaded arigl-web, so v4.0.10's publish-cvcgl-wasm was the first to try it: its arigl-web (wasm-mt) leg failed "relay opens 0, closes 0" and that bundle did not publish. A threaded package is served --isolated, so HAS_WS now also needs !ISOLATED.
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.
The last open item from #1483. In the browser (wasm) build, the WebSocket transport's
reap_idledid nothing. So a page whose relay, or the path to it, went away without closing kept a link that would never speak again, and arigl never dialed again. Native clients and the relay already close such a link (#1483). The relay still closed its own end, so the roster stayed right; only the page was stuck.What changes
state_transport_ws::reap_idlein the browser closes and deletes a socket that has received nothing for the timeout. The relay pings every 2 s, so a live link is never that quiet. The socket is then no longer a link, so arigl'snet_step(which already callsreap_idleeach second) dials the relay again and re-asserts what it published. A backgrounded tab still answers the relay's Pings fromonmessage, so it is not silent.onclosehas fired), and sweeps dead connections, which piled up over reconnects.Test
arigl_web_smoke.mjs, new case: a fake relay on the test server (/apps/silent-relay) takes the upgrade, sends one empty frame and then nothing, and never closes. The page (/apps/silent/, a config that makes it a conference client of that relay) must log "closing a silent link" and dial a second time.ci.yml: the arigl-web job also runs whenstate_transport_wschanges.Already checked live (2026-11-26, on the 4.0.9 deploy)
The relay side and arigl's rejoin re-assert, with the released 4.0.9 page against a local relay (grace 3 s, idle 4 s). After a relay restart, the fresh relay got the page's avatar colour back. A page frozen for 15 s was reaped, marked left and removed, and when it thawed it rejoined with its colour.