72 lines
5 KiB
Markdown
72 lines
5 KiB
Markdown
# live-conformance/cowatch — co-watch
|
|
|
|
The corpus of [`extensions/co-watch.md`](../../extensions/co-watch.md) §13: watch rooms of
|
|
[live-rooms](../../extensions/live-rooms.md), their co-watch policies (`WXP1`), the controls
|
|
(`WXC1`), presentation statements (`WXS1`) and skew statements (`WXK1`) their principals sent
|
|
as `meta` events, what a verifier states of them, and catch-up cases.
|
|
|
|
**Co-watch equivalence.** For each vector, a conforming verifier given its `descriptor`,
|
|
`grants`, `key_log`, `chains`, `policies` and `sources` (§11.1) reaches the `outcome` the
|
|
vector states, with its `reason` and `at` when it refuses, and, for an accepted room or a room
|
|
with a gap (§11.3):
|
|
|
|
- `room`, `gaps`, `policy_digests`, and `starts` (each source's start: its instant and the
|
|
policy's index);
|
|
- `controls`, in the merged order: each one's `digest`, `author`, `t`, `action`, `at`, `arg`
|
|
and whether it is `applied` or a later control at its instant overrides it;
|
|
- `timeline`: each change of the controlled state, in the order of §5.4 and §6.4, with whether
|
|
the source plays, its `rate` and its `position` at that instant;
|
|
- `presentations`, in the merged order: each statement's `digest`, `player`, `at`,
|
|
`position`, `state`, the `controlled` position at its `at`, its `error` and whether it is
|
|
`settling`;
|
|
- `skews`, in the merged order: each statement's `digest`, `from`, `to`, and its `viewers` and
|
|
`pairs` as recomputed (§8.4), or `unchecked` in a room with a gap.
|
|
|
|
`about` says what each vector is, and is not checked. `catch_up` holds the policy's catch-up
|
|
`params` and `cases`: a controlled state (`playing`, `rate`, `controlled`, `duration`) and a
|
|
player's `presented` position, with the `correction` §9 gives. A verifier that reaches another
|
|
outcome, reason, place, fact or correction does not conform.
|
|
|
|
**Provenance.** Generated here: `wai_co_watch_vectors gen` writes `vectors.json` from rooms
|
|
authored in code, from fixed seeds. Each key is SHA-256 of `wai:co-watch/corpus/key`, a zero
|
|
byte and the principal's index (`principals` lists their public keys); each source object's
|
|
content hash is SHA-256 of a fixed label. Each room is written from a script of acts in
|
|
room-clock order: the clock's lifecycle, controls, and each viewer's statements at the
|
|
controlled position plus an error written in the generator; the clock's skew statements are
|
|
made from the room as it stands when the clock makes them, as a room service makes them.
|
|
Ed25519 is deterministic, so the file is the same bytes on every machine. The generator asserts
|
|
that each vector reaches the outcome it was written to have, and that the corpus gives every
|
|
reason of §12, before it writes. A refused vector holds its room up to the record it is refused
|
|
at. No recorded data.
|
|
|
|
## Layout
|
|
|
|
`vectors.json`: `principals` (informative), `key_seed`, `vectors` and `catch_up`. The rooms,
|
|
under one policy unless named otherwise (an hour-long episode; controls 500 ms to 10 s ahead;
|
|
rates from half to twice normal speed; one-second slots in five-second windows; a 200 ms bound
|
|
at the 95th percentile; settling 1.5 s; catch-up at 40 ms, 5 % and one second):
|
|
|
|
- `watch_party`: the host (the direct power), the guest (`watch_control` 3: play and pause) and
|
|
the late joiner (no control, joining at 11 s). The host plays, the guest pauses and plays,
|
|
the host seeks, sets 1.25 and back; at 20 s the guest's pause and the host's play and seek are
|
|
for one instant, the host's play, sent later, overriding the pause. Each player states twice a
|
|
slot, with a transient error just after a control, and the late joiner a seek's error on
|
|
joining; every five-second window to 25 s is stated, every viewer in sync.
|
|
- `next_episode`: a second policy names another source at 10 s; the controlled position starts
|
|
again there, paused at 0, and the guest (`watch_control` 15) plays it; both sources' objects
|
|
are given.
|
|
- `drift`: four viewers. The fourth states 400 ms ahead (out of sync); the late joiner states
|
|
nothing for one slot (unknown from 5 s); the guest leaves at 7 s; the window from 5 s is
|
|
stated in two statements of two viewers each.
|
|
- `gap`: `watch_party` with one of the guest's statements not delivered.
|
|
- Refused, each a control of one defect: a control from a party without the power, one past its
|
|
attribute, one in the past, one under the lead, one past the horizon, a seek past the end, a
|
|
rate past the limit, an unknown action, a play with an argument, a control before its sender
|
|
joined (the room refuses it); a statement of another player, one signed by another key, one
|
|
ahead of its sending, one of another source, one of state 9, one by the clock; a skew
|
|
statement that does not recompute, one stating a viewer with no statements in sync, one of
|
|
another bound, one claiming events the room does not hold, one leaving a viewer out, one by a
|
|
viewer, one made before its window ends; a `watch_control` of 16 and of `03`; no policy;
|
|
policies malformed, unlinked, of another duration for one source, not from 0, truncated, of
|
|
version 2, of another room and signed by the clock; and objects that are not the policy's
|
|
source.
|