WAI Extension: Spaces
Mirrored from the canonical text at commit 498e6b88 ().
Status: Draft. Registers the record
wai.live.spaces: the physical places a room joins together, each a space where many people stand behind one sound system and one camera and take part as a group. A space is a role of the room: every principal the room admits under that role is part of that place, publishing its capture (its sound system’s feed, its ambience, its camera) and playing the room to the place. The room authority signs a space policy,WNP1, naming the roles that are spaces and, for each, its local mix: what that place’s speakers play, which is live-compose §6’s integer mix of the room’s voices with the space’s own voices left out or lowered, and the crowd’s sound (crowd-sound) at a gain of its own. Every space plays the room at one hold: the sound captured at instant c of the room clock is played in every place at c plus the hold, so that the places hear each other, and the stage, at the same instant. The hold is set by a hold statement,WNH1, effective at a room-clock instant chosen ahead of its sending, as co-watch’s controls are. Each space’s player states what it played with ensemble’s presentation statement,WJS1, unchanged; from those statements the room clock signs an alignment statement,WNK1, per window, laid out as co-watch’s skew statement: each player’s offset from the hold, and each pair of players’ skew, as percentiles, with a verdict against the policy’s bound, which anyone holding the room recomputes. A player whose statements are missing isunknown, never in time. No new transport. The reference implementation is thespacesmodule ofwai-rs(featurespaces); the corpus islive-conformance/spaces/, and its second implementation islive-conformance/spaces_verify.py. Keywords MUST, MUST NOT, SHOULD, MAY are RFC 2119/8174.Texts read for this revision: the live family this extension builds on, as merged (live-events, live-rooms, live-compose §4 and §6, co-watch §5 and §8, ensemble §2, §4 and §5, crowd-sound); RFC 8032 and FIPS 180-4. No outside text is pinned: the rules of this extension are WAI’s own. What the field has, as gathered on 2026-11-14: shows joined across several venues have run only on private radio networks, at a few milliseconds of round trip; no commercial show across venues has published its latency; and no standard sets a common presentation instant across venues and remote audiences over public networks (decision D135).
1. Scope
In scope: the space policy, its signature and the policy in effect at each instant (§3); how this extension’s statements ride in a room’s events, who may sign each, and the policy a statement is read under (§4); spaces, their members, players and sources (§5); the hold, its statement, its rules and the hold in effect (§6); presentation (§7); windows, samples, offsets, percentiles, verdicts, the alignment statement, its completeness, and which spaces are together (§8); the local mix (§9); where each rule is enforced (§10); and verification (§11).
Out of scope: a transport; how a space’s devices capture, encode, decode and play sound, which live-rooms §8 profiles bound; how a player estimates the room clock, which co-watch §7.3 states for a player and §14 here for a wrong estimate; how a room chooses its hold; a place’s acoustics and the delay of its own loudspeakers to its listeners; and how the crowd’s inputs become an aggregate, which crowd-sound defines.
Relationship to the core spec: wai.live.spaces is a record (SPEC §5): signed
records a WAI tool emits and verifies. It names no payload format and is not dispatchable.
Relationship to live-events: this extension changes nothing in it. Its
statements are payloads of the meta kind (live-events §4.2), so every statement is signed by
its author, chained, stamped with the room clock and rate-bounded by its author’s policy
(live-events §5, §6).
Relationship to live-rooms: the descriptor’s and the grant’s layouts are
unchanged. A space is a role of the descriptor (live-rooms §3.3), and its members are the
principals granted that role; the policy names which roles are spaces. A room states its space
policy in a record of its own, WNP1 (§3), chained as co-watch’s policy is.
Relationship to co-watch: the hold is set as co-watch sets a control: at an instant of the room clock ahead of its sending, within a lead and a horizon, so every place applies it at once whatever its own latency, by one order (co-watch §5.3, §5.4). The alignment statement is co-watch’s skew statement (co-watch §8.4), field for field, under a magic of its own, and its windows, slots, samples, percentiles, verdicts and completeness are co-watch’s (co-watch §8.1 to §8.6). What differs is what an error is measured from: co-watch measures a viewer from the controlled position of a recorded source; this extension measures a place from the hold, an instant fixed by the capture of the live sound it played (§8.3). A co-watch verifier reads none of this extension’s statements as its own.
Relationship to ensemble: a space’s player states what it played with ensemble’s
presentation statement, WJS1 (ensemble §5.1), its layout, signature and rules unchanged: at an
instant of the room clock, the capture instant of each source’s sound it was playing. Ensemble
judges each pair of performers by the delay between them, the shorter the better; this extension
judges each place by how close it played each sound to the hold, a delay the room chose. A room
with both an ensemble policy and a space policy reads a space’s statements under both, and the
space is a listener to ensemble (ensemble §2). A room with a space policy and no ensemble policy
is not an ensemble room, and an ensemble verifier is not its verifier: ensemble §4.5 would refuse
every WJS1 in it.
Relationship to live-compose: a space’s local mix is §6 there, unchanged: its voices are the voices of the room’s composition (§4 and §6 there), each gain changed as §9 says, and the crowd’s voice added; the mixer is §6’s, sample for sample.
Relationship to crowd-sound: the crowd’s voice a space’s local mix plays is crowd-sound’s rendering of the room’s crowd aggregates (crowd-sound §8), at the space’s crowd gain. A room with no crowd policy has no crowd voice.
2. Terms
- Room, room clock, principal, event, chain, grant, grant in effect, room key, merged order, role: as in live-events §2 and live-rooms §2, §3.3 and §9.2. A room key is the room authority’s key or the clock’s.
- Statement: the payload of a
metaevent whose first four bytes are one of the magics of §4.1. It is named by the digest of its event (live-events §3.2). - Space: a role of the room that the space policy in effect names (§5.1). Its members at an instant are the principals present then whose grant in effect is of that role.
- Player: a member whose grant in effect may subscribe (live-rooms §3.3): the device that plays the room to the place, and states what it played (§7).
- Source: a principal whose sound a player plays: its own
audiotrack (live-rooms §6.1). An own source of a space is one of its members. - Capture instant: ensemble §2’s.
- Hold: the time, in µs, from a sound’s capture to its playing in every space (§6).
- Offset of an entry of a presentation statement: its
atless its capture instant plus the hold (§8.3), a signed number of µs; positive is late. - µs is microseconds of room clock. Q12 is an integer in units of 1/4096; 4096 is one.
Integers are little-endian; a signed integer is two’s complement. A digest is SHA-256 (FIPS
180-4), 32 bytes. Ed25519 is RFC 8032’s, verified strictly (SPEC §7 Signatures): a
key that fails step 1 or 2 is bad_key, and a signature that fails a later step is
bad_signature.
3. The space policy
3.1 Layout
| field | size | meaning |
|---|---|---|
magic | 4 | WNP1 (ASCII) |
version | 1 | 1 in this revision |
room | 32 | the room id (live-rooms §3.2) |
prev | 32 | the digest of the policy this one replaces (§3.4); 32 zero bytes for the first |
effective | 8 | u64: the room-clock instant from which this policy applies; 0 for the first |
lead_ms | 4 | u32: the least time from a hold statement’s sending to its instant (§6.2), above 0 |
horizon_ms | 4 | u32: the most time from a hold statement’s sending to its instant, at least lead_ms |
min_hold_ms, max_hold_ms | 4 each | u32: the holds a hold statement may set (§6.2), min_hold_ms at most max_hold_ms, and max_hold_ms from 1 to 60 000 |
period_ms | 4 | u32: the slot length: a player states its presentation at least once in each (§7.3, §8.1), above 0 |
window_ms | 4 | u32: the length of a window (§8.1), a multiple of period_ms of 1 to 1000 slots |
settle_ms | 4 | u32: how long after a player’s join and a hold’s instant a sample is settling (§8.3) |
bound_us | 4 | u32: the alignment bound (§8.5), above 0 |
quantile | 1 | the percentile a verdict is taken at (§8.5), 1 to 100 |
spaces | 1 + 5 × n | a u8 count (1 to 16), then each space: role (u8, the index of a role of the room descriptor), own_gain (u16, Q12, 0 to 4096), crowd_gain (u16, Q12, 0 to 16 384) (§9) |
sig | 64 | §3.2 |
3.2 Digest and signature
The digest of a policy is SHA-256 over its record from magic through spaces. The
signature is Ed25519 by the room descriptor’s authority over the 17 bytes
wai:space-policy (ASCII) and 0x01, followed by the bytes the digest covers.
3.3 Reading and rules
A reader reads exactly the bytes it is given as one policy, in the order of §3.1, and refuses at the first of these that holds:
- Fewer than 4 bytes:
truncated. A magic other thanWNP1:malformed. No byte after the magic:truncated. A version other than 1:unknown_version. - The bytes end before a field the layout requires:
truncated. - Bytes after
sig:malformed.
It then holds the policy to the rules of §3.1’s table, and refuses one that breaks any of them as
space_policy_malformed: lead_ms, period_ms and bound_us are above 0; horizon_ms is at
least lead_ms; min_hold_ms is at most max_hold_ms, which is 1 to 60 000; window_ms is
period_ms times a whole number from 1 to 1000; quantile is 1 to 100; there are 1 to 16
spaces, in strictly ascending order of role; and each space’s own_gain is at most 4096 and
its crowd_gain at most 16 384. Then, against the room: its room is the room id
(wrong_room); each space’s role is the index of a role of the room descriptor
(space_policy_malformed); its signature verifies (bad_key, bad_signature); and its link
holds (§3.4, space_policy_unlinked).
3.4 The policy in effect
A verifier is given a room’s policies in a list. The first has prev zero and effective 0.
Each later one has as prev the digest of the one before it in the list, and an effective
above that one’s. A policy that breaks this is refused space_policy_unlinked. The policy in
effect at room-clock instant t is the last of the list whose effective is at or below t.
A policy is replaced, never amended.
4. Statements
4.1 Carriage
| magic | statement | section | who signs it |
|---|---|---|---|
WNH1 | hold statement | §6.1 | a room key, or a principal whose grant in effect has the direct power (§6.2) |
WJS1 | presentation statement | §7 (ensemble §5.1) | a space’s player, with its own key |
WNK1 | alignment statement | §8.4 | a room key |
Each statement is the payload of a meta event: its magic, a version byte of 1, and the fields
its section lists. A meta payload whose first four bytes are none of these magics is not this
extension’s, and a sink that does not implement it shows none of them: they are timed metadata for
its application (live-events §4.2). A WJS1 statement whose author is not a member of a space at
its event’s t (§5.1) is not this extension’s either: it is an ensemble performer’s, which this
extension passes over. Every statement is bounded by its author’s policy (live-events §5,
max_payload), 1024 bytes for a room key, which bounds the counts §8.4 allows.
4.2 Reading
A hold statement or an alignment statement that ends before a field, that holds bytes after its
last field, whose version is not 1, or whose field holds a value its section does not allow, is
space_statement_malformed. A presentation statement is read as ensemble §4.2 and §5.1 read it,
and one that does not read is ens_statement_malformed.
4.3 Who signs
An alignment statement by any principal but a room key is space_not_permitted, and so is a
presentation statement by a member whose grant in effect at its event’s t may not subscribe: a
member that plays nothing to the place has nothing to state. A hold statement’s author is checked
by §6.2. Since a statement is a meta event, the room verifier has already held it to its
author’s grant: a principal whose policy does not permit meta cannot send one (live-rooms §9.2
step 4, kind_not_permitted).
4.4 The policy a statement is read under
A statement is read under the policy in effect at its event’s t. A statement at an instant with
no policy in effect is refused space_no_policy: since the first policy is effective from 0, a
room has such a statement only when it has no policy at all.
5. Spaces
5.1 Members
A space at instant t is a role named by the policy in effect at t. A principal is a
member of it at t when it is present at t (from the t of a join of it to the t of
the following leave of it, if any, live-rooms §7.2) and its grant in effect at t is of the
space’s role. A principal is a member of at most one space at once, since a grant has one role.
A space is a place, so its members are the devices of that place: the feed of its sound system and its ambience microphones, which publish its sound; its camera, which publishes its picture; and its player, which plays the room through the place’s speakers. Each holds its own grant under the space’s role, narrowed to what it does (live-rooms §4.3: a grant narrows its role). The authority admits a device to a place by granting it the place’s role, and moves it by a grant exchange (live-rooms §4.6).
5.2 Players
A member whose grant in effect may subscribe (live-rooms §3.3) is a player of its space. A space normally has one player; a place with two sound systems that play the room separately, two zones of one hall, has two, and each is measured and judged as itself (§8).
5.3 Sources and the return feed
A source at instant t is a principal that publishes its sound at t: from the t of a
publish of its own audio track (live-rooms §7.2: no slot, media 1) to the t of the following
unpublish of that track or leave of it, if any, as ensemble §7.2 has it. A space’s own
sources are the sources among its members. A space’s return feed is what its own sources
publish: the sound of the place, which every other space’s local mix plays (§9) and every
listener of the room may subscribe to.
6. The hold
6.1 The hold statement
| field | size | meaning |
|---|---|---|
magic, version | 5 | WNH1, 1 |
at | 8 | u64: the room-clock instant it takes effect |
hold_us | 4 | u32: the hold, in µs, above 0 |
A hold statement whose hold_us is 0 is space_statement_malformed.
6.2 Rules
A hold statement’s author is a room key, or a principal whose grant in effect at its event’s t
holds the direct power (live-rooms §3.3, bit 1). Otherwise it is refused hold_not_permitted.
A hold statement is sent ahead of its instant, so that it reaches every place before the instant
comes, and not far ahead. With t its event’s t, under the policy in effect at t:
atis at least t +lead_ms× 1000: otherwisehold_not_ahead.atis at most t +horizon_ms× 1000: otherwisehold_beyond_horizon.
Then, under the policy in effect at at:
hold_usis frommin_hold_ms× 1000 tomax_hold_ms× 1000: otherwisehold_out_of_range.
A relay or a room service that carries the room’s events MUST NOT carry a hold statement these rules refuse, and a player MUST NOT apply one.
6.3 The order of application and the hold in effect
The accepted hold statements apply in co-watch §5.4’s order: ascending at; of two with one
at, the one whose event has the lower t first; of two with one at and one t, the one whose
event digest is the lower first. Of the hold statements at one instant, each but the last is
overridden, and the last is applied. The hold in effect at instant x is the
hold_us of the last applied hold statement whose at is at or before x; before the first,
there is none, and a space plays nothing held (§6.4, §9).
6.4 What a player does
A player of a room with a space policy MUST, while it is present and a hold is in effect:
- play each sample of each source it plays at the sample’s capture instant plus the hold in
effect at the instant it plays it, on its estimate of the room clock, which it estimates as a
co-watch player does (co-watch §7.3): it holds what it has received until then, and a sample
that reaches it after its instant plus
bound_usit does not play; - apply a hold statement at its
at, and one that reaches it after itsatat once; - play the local mix of its space (§9), and so none of its own sources when its space’s
own_gainis 0.
A room chooses a hold longer than the longest path from any source to any player, so that every place can play every sound at its instant; the alignment statements (§8) show which places do, and a room raises the hold, ahead, when one does not.
7. Presentation
7.1 The statement
A player states what it played with ensemble’s presentation statement, WJS1 (ensemble §5.1):
listener is the player’s key, at an instant of the room clock, and each entry a source it was
playing at at with the capture instant of that sample. The statement’s layout, digest and
signature are ensemble §5.1’s, and its rules ensemble §5.2’s, with ensemble’s reasons: its room
is the room id (wrong_room); its listener is its event’s principal (ens_wrong_key); its
signature verifies (bad_key, bad_signature); and its at is at most its event’s t
(ens_presentation_ahead).
7.2 Own sources
A presentation statement of a player whose space’s own_gain is 0, under the policy in effect at
its event’s t, that has an entry for an own source of the player’s space at that t, is refused
space_own_presented: it states that the player played the place’s own sound back into it, which
its local mix leaves out (§9).
7.3 The page
A player MUST state, at least once in every slot (§8.1) while it is present and plays, and
SHOULD twice so that timer jitter leaves no slot empty, a presentation statement listing each
source it was playing at at, with that sample’s capture instant (the object’s timestamp on the
room clock plus the sample’s offset in the object, ensemble §5.3), and as at the instant the
sample left it for the place’s speakers, as its audio output reports it, on its estimate of the
room clock.
8. Alignment
8.1 Windows and slots
Windows and slots are co-watch §8.1’s, under the space policy: a window is a stretch of the room
clock from from up to, but not including, to, over which one policy is in effect, whose length
is a whole number of its slots from 1 to 1000; its slots are period_ms × 1000 µs long from
from.
8.2 Players and due slots
A slot is due for a principal when, for the whole slot (from at or before its start to at or after its end):
- it is a player of a space (§5.2): present, under a grant of a space’s role that may subscribe, the grant in effect at the slot’s start;
- a hold is in effect, the one in effect at the slot’s start; and
- a source that is not an own source of its space publishes its sound (§5.3): there is something for it to play, held.
The players of a window are the principals with a slot of the window due.
8.3 Samples, offsets and settling
An alignment statement names, for each player it lists, held: how many of the player’s events
the room clock held when it made the statement (its next seq). A player’s sample in a slot
is, of its accepted presentation statements whose event’s seq is below held and whose at is
within the slot, the first in the merged order. A statement the clock had not received when it
made its statement is not a sample of that statement, whenever it arrived.
An entry’s offset is a − (c + H), with a the statement’s at, c the entry’s
capture instant, and H the hold in effect at a, a signed number of µs computed without
overflow (at least 66 bits). A sample’s error is the offset of its entries of greatest
magnitude; of two of one magnitude, the one above 0. A player is as far from the hold as the
furthest of the sounds it played.
A sample is settling when its at is within settle_ms × 1000 µs (of the policy in effect at
its at) after a join of the player or the at of an applied hold statement: at or after that
instant and before it plus settle_ms × 1000. A settling sample fills its slot, and is not
counted: a player that has just joined, or every player moving to a new hold, takes a moment
that the bound is not about. A source that begins to publish needs no settling: a player holds its
first samples to their instant as it holds every other’s.
8.4 The alignment statement
| field | size | meaning |
|---|---|---|
magic, version | 5 | WNK1, 1 |
from, to | 8 each | u64: the window (§8.1) |
bound_us | 4 | u32: the bound it judges by, the policy’s |
quantile | 1 | the percentile it judges at, the policy’s |
players | 1 + 59 × v | a u8 count (1 to 8), then each player: principal (32), held (u64), due, samples, counted (u16 each), p50, pq, max (u32 each), verdict (u8) |
pairs | 1 + 17 × v(v − 1)/2 | a u8 count, then each pair: a, b (u8 each, indexes into players), n (u16), p50, pq, max (u32 each), verdict (u8) |
This is co-watch’s skew statement (co-watch §8.4), field for field, its viewers the window’s
players. Its entries are co-watch’s over this section’s errors: for a player, due is its due
slots, samples the due slots it has a sample in, and counted those whose sample is counted;
p50, pq and max are the 50th and the quantile-th percentile and the greatest of the
absolute errors of its counted samples, and all three 0 when it has none. For a pair, n is the
due slots in which both have a counted sample, and p50, pq and max are over the absolute
values of the skew in those slots, the first player’s error less the second’s. A value above
2^32 − 1 is written 2^32 − 1.
An alignment statement is space_statement_malformed as co-watch §8.4 holds a skew statement
malformed: its players are not in strictly ascending order of principal; a verdict is outside
1 to 3; its pairs are not every pair of its players exactly once, in ascending order of (a, b)
with a below b; from is not below to; to is above its event’s t; or the policy in
effect at from is not in effect up to to, or to − from is not a whole number of its slots
from 1 to 1000. Then, under the policy in effect at from:
bound_usandquantileare the policy’s: otherwisealignment_mismatch;- each player it lists is a player of the window, its
heldis at most the number of that player’s events the room holds, and its entry is the one recomputed from the room: otherwisealignment_mismatch; - each pair’s entry is the one recomputed: otherwise
alignment_mismatch.
A statement may list a subset of a window’s players, since one holds at most eight; it states the pairs among those it lists. §8.6 requires every player of the window to be listed by one.
8.5 Percentiles and verdicts
Percentiles are co-watch §8.5’s, by nearest rank: the q-th percentile of n values, n above 0, is the value at index ⌈q × n / 100⌉ − 1 of the values in ascending order. A verdict is 1 in time, 2 out of time or 3 unknown:
- a player is unknown when it has a due slot with no sample, or no counted sample; it is in time
when its
pqis at mostbound_us, and out of time otherwise; - a pair is unknown when either of its players is unknown or its
nis 0; it is in time when itspqis at mostbound_us, and out of time otherwise.
“In time” is so a claim with a stated bound, checked against the statements. A player whose statements are missing for a slot it was due is unknown, never in time: a place that stops stating is not counted as keeping to the hold.
8.6 Completeness
A room clock that states a window states all of it. Once every record is read, for each window
that an accepted alignment statement names, every player of the window is listed by an alignment
statement of that window: otherwise alignment_incomplete, at the window’s first alignment
statement in the merged order.
8.7 Spaces together
For a window that accepted alignment statements name, each player and each pair of players is read from the first alignment statement of the window, in the merged order, that lists it; a pair of players that no statement of the window lists together (a window stated in more than one statement lists each pair only within one) is unknown. A space with a player in the window is in time when each of its players is, unknown when any is unknown, and out of time otherwise. Two spaces each with a player in the window are together when each pair of a player of one and a player of the other is in time, unknown when any such pair is unknown, and apart otherwise. Every instant of the window has that window’s answer, so anyone holding the room recomputes, for each instant an alignment statement covers, which places heard the room at its hold, and which heard each other at one instant.
9. The local mix
9.1 The voices
A space’s local mix at instant x is what its player plays at x. With H the hold in effect at x (§6.3) and C the room’s composition descriptor (live-compose §3), it is live-compose §6’s mix of these voices, in this order:
- the voices of C’s composition at x − H (live-compose §4 and §6: the room as it stood when
the sound being played was captured; none when x is below H), each with its pan, and with
its gain g, but a voice of an own source of the space at x − H, whose gain is ⌊g ×
own_gain/ 4096⌋: 0 leaves the place’s own sound out, and a value between lowers it; - when the room has a crowd policy and the space’s
crowd_gainis above 0, the crowd voice (crowd-sound §8) at x, mono, at gaincrowd_gainand pan 0.
Each voice of step 1 is mixed from its decoded audio captured from x − H on: the block the
mixer mixes at x is the block of each voice that was captured at x − H. A voice whose gain is
0 is mixed as silence and changes nothing. The arithmetic is live-compose §6’s, unchanged: the sum
of up to 65 terms of at most 2^41 is exact, and an input that §6 refuses is mix_input_malformed.
With no hold in effect at x a space has no local mix, and with no composition descriptor no voice
of step 1.
So the local mix of every space is an integer function of the room’s events, its composition descriptor, the space policy, the crowd aggregates and the decoded sound: two players of one space mix the same samples, and a verifier given the room states every space’s voices at any instant (§11.3).
9.2 Why the mix is held
A place hears every other place, and the stage, at the instant it was captured plus the hold, the same instant in every place. A cheer in one hall reaches every other hall together; the stage hears the halls together, one hold after the moment they cheered at; and a place’s own sound, which its people already hear in the room, is left out or lowered so that it does not return to them a hold late. A room that wants the stage to hear the halls sooner shortens the hold for every place.
10. Where each rule is enforced
- A room service or relay that carries the room’s events carries a hold statement only when
§6.2 accepts it, and a presentation statement of a player only when §7 accepts it, and each
principal’s events in its chain order. An alignment statement it signs names, as
held, what it held when it made it, so a statement that arrives later changes nothing that statement says. - The room clock signs the lifecycle (live-rooms §7.2), and so who is a member of which space and who publishes, and signs hold statements and alignment statements: what the room states about how closely each place played to the hold. It holds the room as a verifier does, and each alignment statement is what the verifier will recompute.
- The room authority signs the policy (§3), the descriptor’s roles and the grants, and so which roles are places and which devices are in each.
- Players apply holds at their instants and play the local mix (§6.4, §9), and state what they played (§7.3). Sinks show the verdicts with the bound they are against.
After the fact, a verifier (§11) checks every one of these against the room: a hold a service carried that §6 refuses, a statement by a key that is not its player’s, a player that played its own place back, and an alignment statement that does not recompute, calls a player in time whose samples are missing, or leaves a player out, are each found out.
11. Verification
11.1 Inputs
A spaces verifier is given what a room verifier is given (live-rooms §9.1: a descriptor, grants, a key-log head or none, and the chains), and:
- policies: the room’s space policies, in a list (§3.4);
- composition: the room’s composition descriptor (live-compose §3), or none;
- instants: room-clock instants at which to state each space’s local mix, in a list, which may be empty.
11.2 Steps
It runs these steps and stops at the first refusal, which it reports with the reason and where:
- The room (live-rooms §9): a refusal, at
roomwith the room verifier’s own place. A gap is not a refusal; the steps go on, and the checks of an alignment statement that recompute from the room (§8.4 steps 2 and 3, and §8.6) are not made: each depends on events the verifier may not hold. - The policies, in the list’s order (§3.3, §3.4): at the policy’s index.
- The statements, in the merged order: each
metaevent the room accepted whose payload begins with a magic of §4.1, but a presentation statement whose author is no member of a space at itst(§4.1): §4.4 (space_no_policy), then §4.2, then §4.3, then the rules of its section, in the order each section gives. An alignment statement’s checks that recompute (§8.4 steps 2 and 3) are made after every statement has been read, in the merged order, since its samples may follow it there. At the record. - Completeness (§8.6): at the record.
- The local mixes, when a composition is given: the descriptor (live-compose §3.3, §3.5), at
composition; then, at each instant of the list, in order, the voices of each space of the policy in effect (§9.1), the composition’s refusal at that instant (live-compose §9 step 3) atmixwith the instant. A gap in a room key’s chain refuses this steplifecycle_incomplete(live-compose §4.1), atmix. - The outcome (§11.3).
11.3 Outcomes and what a verification states
- refuse: the reason and where (§11.2).
- gap: no refusal, and the room has a gap: the gaps, under the code
delivery_gap, and what accept states, computed from what the verifier holds, with each alignment statement and each window stated unchecked. - accept: no refusal and no gap.
With accept or gap, the verifier states:
- the policies’ digests;
- each hold statement, in the merged order: its digest, author,
at,hold_us, andappliedoroverridden; - each presentation statement of a player, in the merged order: its digest, player, space (its
role’s index),
at, the hold in effect atator none, each entry’s source and offset, its error, and whether it is settling; - each alignment statement, in the merged order: its digest, its window, and for each player and
each pair the entry recomputed, or
unchecked; - each window that alignment statements name, in order of
from: each space with a player in it and its verdict, and each two such spaces, in ascending order of role, together, apart or unknown (§8.7); - for each instant given, and each space of the policy in effect then, in ascending order of role:
the hold in effect, and the voices of its local mix (§9.1), each its principal and gain and pan,
and the crowd voice’s gain, or none when the space’s
crowd_gainis 0.
12. Reasons
The codes this extension adds, each with where it is raised:
| reason | raised at |
|---|---|
space_policy_malformed | §3.3 |
space_policy_unlinked | §3.4 |
space_statement_malformed | §4.2, §6.1, §8.4 |
space_no_policy | §4.4 |
space_not_permitted | §4.3 |
hold_not_permitted | §6.2 |
hold_not_ahead | §6.2 step 1 |
hold_beyond_horizon | §6.2 step 2 |
hold_out_of_range | §6.2 step 3 |
space_own_presented | §7.2 |
alignment_mismatch | §8.4 |
alignment_incomplete | §8.6 |
A spaces verifier also raises every code a room verifier raises (live-rooms §11 and the
live-events codes it lists), at room; truncated, malformed and unknown_version for a
policy that does not read; wrong_room, bad_key and bad_signature for a policy of another room
or whose signature fails, and for a presentation statement (§7.1); ensemble’s
ens_statement_malformed, ens_wrong_key and ens_presentation_ahead for a presentation
statement (§4.2, §7.1); live-compose’s codes for a composition descriptor and an instant it
refuses (§11.2 step 5), lifecycle_incomplete among them; and delivery_gap for a gap, which is
not a refusal.
13. Conformance
live-conformance/spaces/ holds the corpus, in one file,
vectors.json, written from fixed seeds by wai_spaces_vectors gen. It has rooms, each a room
(descriptor, grants, key-log head or none, chains), its policies, its composition descriptor or
none and its instants, and the outcome §11.3 gives them with everything it states; and mixes.
- Accepted: a show across three places: a stage whose band’s feed is its own source and whose player plays the halls back to it without the band, a hall that plays the stage and the other hall and returns its ambience, and a club that plays everything with its own sound lowered; a first hold set ahead and a second, longer one, with two hold statements for one instant resolved by co-watch §5.4’s order; the players’ first samples after a join and after the new hold settling; every place in time, then the club out of time, a hall player missing a slot and unknown, and a window stated in two statements; and the local mix of each place at instants before the first hold, under each hold, and after a source leaves.
- Gap: the show with one player’s record not delivered: its alignment statements unchecked.
- Refused: each reason of §12 at least once, each vector a control of one defect: among them a hold set by a principal without the direct power, a hold effective in the past, a player playing its own place back, a presentation statement lifted from another player’s chain, an alignment statement that does not recompute, and a player whose statements are missing reported in time; and policies that do not read, are of another room or name a role the room does not have.
- Mixes: blocks of decoded sound and a space’s local mix of them (§9.1): own sound left out, lowered and at full gain, the crowd voice added, and saturation.
A conforming verifier gives every room the outcome, the reason, the place, and everything else the
corpus states, and every mix its samples. wai_spaces_vectors verify and the test
tests/spaces.rs check that the file regenerates byte for byte, that wai-rs gives every room its
outcome, that every reason of §12 appears, and that §12 lists exactly the reference’s codes.
live-conformance/spaces_verify.py is the second implementation, written from this text: it shares
no code with wai-rs; it verifies each room with the live-rooms corpus’s second implementation
(live_rooms_verify.py), reads presentation statements with the ensemble corpus’s
(ensemble_verify.py), lays the composition out with the live-compose corpus’s
(live_compose_verify.py), and verifies every signature with WAI’s strict rule
(claim-conformance/_ed25519.py); and it mutates copies of the corpus and requires every copy to
fail, and drops each of its own checks in turn and requires the corpus to catch the weakened
verifier.
14. Security and privacy considerations
- Every hold and every statement is signed by its author and rides in its author’s chain, and every policy is signed by the room authority. A service can withhold an event but alter none, and a withheld event is a gap in its author’s chain.
- A hold’s instant is ahead of its sending by at least the policy’s lead, so every place holds it before it applies, as long as it reaches them within the lead. One that reaches a place late is applied at once; the offset it causes settles within the policy’s settle time, and a lead too short for the room’s delivery shows as places out of time.
- A presentation statement is a player’s claim: it proves that the holder of the player’s key stated it, not that it is true. A modified player can state any instant, as a co-watch player can (co-watch §14). A relay’s per-hop records (live-metering §3) of when it delivered each source’s objects to each session are independent evidence against a statement of a sound the session had not received.
- A player’s
atis on its own estimate of the room clock (§7.3), and each capture instant on its source’s. An estimate that is off shifts the offsets by as much, so a place that keeps its own clock wrong is measured as out of time, never as in time on another’s behalf. A source whose clock is off shifts every place’s offsets alike, and leaves their skew unchanged: the places still hear it at one instant. - The alignment statement is the room clock’s, and is recomputed by anyone holding the room: a clock that states a player in time without the samples, or leaves a player out of a window, is refused (§8.4, §8.6). What remains to the clock is to omit a player’s events from the room, which leaves a gap in the player’s chain (live-events §6.2), and every alignment statement of a room with a gap is unchecked.
- A space’s return feed is the sound of a place full of people. Each place’s own sound reaches the others as the room’s voices do, under the grants the authority signs; a place that should not be heard elsewhere is given grants that do not publish. A player’s statements say what it played and when, which is data about a device, not a person. Taking part in a room under a grant is taking part in its mechanics, and this extension adds no consent step to them.