joule-moq-web: a turn a later schedule replaces ends at that schedule's from #620

Merged
dcharlot merged 1 commit from wai/co-floor-schedule-change into main 2026-11-04 18:26:10 -05:00

2026-11-04

Transaction Science
joule-moq-web: a turn a later schedule replaces ends at that schedule's from, and a performer's page keeps its guard before it
All checks were successful
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (pull_request) Successful in 32s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 5s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 6s
wai-app and Create / wai-app · does this change touch it (pull_request) Successful in 6s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 5s
WAI Studio / does this change touch it (pull_request) Successful in 5s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (pull_request) Successful in 31s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 54s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 2m21s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 8m19s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 9m24s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (pull_request) Successful in 8m56s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 11m5s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 9m35s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 1m43s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 11m30s
joule-code conformance gate / joule-moq-relay, every target (pull_request) Successful in 3m40s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 19m26s
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Successful in 6m1s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 6m30s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 7m27s
The room page took a turn's end from its own schedule only. When a lead's new schedule took effect
in the middle of a turn, the page of the performer holding it went on sending up to the new
schedule's `from`, past its guard (co-performance §8). The relay judged its last objects on
arrival, under the schedule they reached it in, and forwarded them. The room's clock, a hop
later, logged them after the `from`, under the new schedule. Where the new schedule refuses and
gives that turn to someone else, the room with the clock's log then refuses as `turn_violated`.

How often depends on that hop: rarely on a quiet host, and once in #619's browser run, on the
shared build host under load (the room e2e's refusing schedule takes effect in the middle of the
marking schedule's sixth turn, which the other holder held).

Now:
- A turn ends at its segment's boundary, or at the `from` of a later schedule, if that comes
  first (§6.1: "A later schedule replaces an earlier one from its `from` on").
- The guard applies before either.
- The turns ahead step from the cut turn to the new schedule's first turn. Before, they jumped
  to the old turn's end and skipped the new schedule's turns up to it.

Tests:
- `web/room/co.test.mjs` (new, run by `e2e/run.sh` with the page's other module tests): six
  cases. Against the old `co.js`, three of them fail: the turn's end, the guard before the
  `from`, and the turns ahead.
- The room e2e names an object it refuses: its arrival, and how far it is from the nearest turn
  boundary or schedule `from`. If the check fails again, it says which race it was.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 17:40:39 -05:00