Commit Graph
977 Commits
  • fix(diagnostics): a sample is the report's state, and the history keeps what happened
    Corrections from review of the always-on history.
    
    A repeated measurement, and what a live owner says of itself for a report,
    is recorded through debugSample: it is the state of the report being made
    and does not enter the history, and outside a report it is kept only under
    the developer's probes. The raw statistics sample, the playback, channel
    and audio snapshots and the encoding pool's sample go that way. A track's
    state beside each statistics sample was recorded as an event twice per
    producer on every poll, with its settings; it is a sample now, and a
    track's own events stay events. Making a report no longer adds to the
    history it reads.
    
    A candidate error keeps the server that refused and the code; the local
    address and port are kept only for a developer.
    
    The App's history starts where its service starts, which the desktop
    binary and the Android runtime both enter; the Android entry never reached
    the installation in the desktop binary.
    
    A pair's facts are kept in the order their stages last happened, so a pair
    that disconnected and connected again ends on connected.
  • refactor(core): three reductions to the room record's transitions
    From review. Cancelling a reservation asks only whether the session holds
    it: binding clears the reservation, so a reserved room is never bound. The
    pause that drops the projection drops it first, since pausing would only
    empty what is discarded. Applying an output compares the old and new
    projections only when the old one was current, as it did before the
    transition was named: a stale one is replaced whatever it holds.
  • refactor(client): the forms' own name and password limits come from the limits module
    Two inputs and a title cut wrote the 64-unit name limit and two inputs wrote
    the 128-unit room password limit as literals. The password limit joins the
    checked module and the compiled Core emits it. The comment on the audio send
    bound says what it is: a budget for a frame of average size, not a promise
    about every encoded frame.
  • refactor(core): only the room address of a command is asked for
    The classification of a command by its owner had one runtime reader, the
    lookup of a room command's room. Its other classes were read by a test
    alone, and the set of commands whose change is undone stayed a separate
    list beside it. The classification is reduced to what is read: a helper
    that gives the room address of the commands a room's writer applies. The
    fixture test states each specimen's variant as before.
  • fix(core): an outcome says only what its turn did
    Corrections to the typed outcome of an authority turn, from review.
    
    A member's request for its room's writer is carried in the commit as the
    writer's connection and the event. It was the turn's last effect with a
    flag saying so, which the hub popped by position: with the writer's session
    offline nothing was delivered and the pop took another event or found none.
    
    A summary is reported as changed only when the output was applied; an
    output the binding had already passed is acknowledged and changes nothing.
    A removal forwarded to an online writer reports nothing durable: the header
    changes when the writer's answer arrives, and that turn saves it.
    
    A refusal carries no code of its own, since its scoped answer is already
    among the effects and nothing read the copy.
    
    The authority copies itself before fewer turns: not for a join by a
    personal credential, which is admitted as its stored user or refused and
    writes no user record, and not for a turn its session state will refuse.
  • fix(core): projection work between inputs keeps the channel's clock
    Taking the time of a turn as an argument removed the room host's stored
    clock, and with it the one thing that field was: the channel's clock as of
    the authority's last input. Route deadlines are set in that clock. A peer
    turn does not come through the authority, so finish_peer was given the
    writer's own time, and a writer whose clock runs ahead could expire a live
    preparation when a deleted message's attachment reconciled the projection.
    
    The room host keeps that clock again, named for what it is, written by
    dispatch alone. finish and finish_peer read it and take no time from their
    caller, so a caller can no longer supply a different one; the WASM binding,
    the stored room host and the tests follow. Channel's entries still take the
    turn's time as an argument.
  • refactor(core): the room record's transitions are named for what they do
    From the review of the previous commit. A registration's effect on a
    binding is invalidate_scope_and_read_policy, beside invalidate_scope. The
    pause that also drops the projection is named for that, so the two ways a
    room pauses can be told apart where they are called. apply_output returns
    whether it left the projection as it was and its caller combines that with
    its own condition. failed_pair retires routes through the binding's own
    method, which the test used a copy of. hosted_by is private. Behaviour is
    unchanged.
  • refactor(core): a room record and its binding make their own transitions
    RemoteRoom and Binding now keep every field private to remote.rs. The
    writes that channel.rs, channel/discovery.rs and lib.rs made by hand move
    unchanged into named transitions on the records: reserving a room for its
    creator, a host binding or resuming, a registration asking for a covering
    scope and read policy, a session retiring, the creation policy pausing a
    room it no longer permits, applying a validated host output, settling
    replies, taking a deleted room's reply, and forgetting acknowledged pair
    failures. Readers ask named questions (reserved, reserved by, bound,
    hosted by, identified by, issued, read policy needed, routes covered,
    pair failed, route wake pending) or use borrowing accessors. Tests build
    the records through test-only constructors.
    
    Behaviour is unchanged: each moved block keeps its statements and their
    order, and no wire shape, error code or effect order changes.
  • docs(core): say what the route and the undoable set promise
    Notes from reading the four framework commits. Command::route states that
    its match has no catch-all, which is what makes it the one classification.
    Command::undoable states its contract with Authority::turn: the authority
    keeps its earlier state only for these commands, so a branch that reports a
    changed user or header record must be listed. The upper end of the audio
    send range has its reason again.
  • refactor(core): each Core limit has one writer and TypeScript reads one checked copy
    The Core wrote several limits as bare literals, some of them twice: the voice
    bitrate default and send range, the relay capacity default, member, room and
    title name lengths, short keys, IDs, attachment names, message and reply text,
    watch URLs and rate, signal SDP and candidates, and room passwords. Each is now
    one named const in the Core module that validates it, and the production Rust
    copies, Native's screen source title among them, refer to it. Boundary tests
    keep their own literals.
    
    TypeScript held its copies in protocol.ts, shared/protocol.ts,
    relay-capacity.ts, room-interactions.ts and remote-control/protocol.ts. They
    move to src/shared/core-limits.ts and the callers import from there.
    channel_wire_limits now emits every limit under its TypeScript name, so the
    parity test compares the whole module with the compiled Core. protocol.ts and
    relay-capacity.ts re-export only the names that session.ts and
    ChannelShareControl.tsx still import, because those files are held elsewhere.
    No value changes.
  • feat(diagnostics): history is always recorded, and only active probes wait for a developer
    A person had to turn recording on before a problem for its report to say
    what led up to it, and nobody does that before a problem. Recording is
    now passive and always on: the page and the App keep a bounded history in
    memory (8,192 events or 8 MiB), and a report is exported on demand. There
    is no recording switch for a person any more.
    
    The page's diagnostic control is one button that downloads the report, and
    the App launcher's is one button that downloads the App report. The
    launcher state no longer carries a debug field, the route that enabled App
    recording is gone, and the App no longer adds a debug flag to the pages it
    opens. The App installs its recorder at its start, before anything can
    log; the Server binary does not, so it is unchanged. Every guard that kept
    an event from being recorded is removed, and audio capture and capture
    frame counters always count.
    
    What stays off by default is the work that costs something of its own:
    the page's per-frame gap loop and console echo, which `?debug=1` starts,
    and the App's window-loop lateness probe and shutdown progress lines,
    which `PIIK_DIAGNOSTIC_PROBES=1` starts. Reports say whether probes ran
    instead of whether recording was on. The copy describes the report in all
    five languages, and keys and the visual kind that lost their last user are
    removed.
    
    Tests now assert that history is recorded with nothing switched on, that
    the probes run only with the developer's flag, and keep every assertion on
    bounds, secret filtering and report contents.
  • refactor(core): one exhaustive classification of a command
    wire::Command::route now names the owner of every command in one match with
    no catch-all arm: the session, the domain, a room addressed by its id, a
    publication or a flow, a room's host, transport between sessions, or a
    conversation packet. A new command must be classified where it is declared.
    
    The per-class properties moved beside the type as methods with one
    definition each. Command::pair_report names the transport report a command
    carries, which the channel checks for currency without its own catch-all.
    Command::needs_peer replaces the room runtime's local match, and
    Command::undoable replaces the Authority's. Channel::command_room resolves the
    room from the route's address instead of re-listing the room commands.
    
    The command fixture test now asserts the route of every specimen as well as
    its variant. Error codes, wire shapes and checkpoint decisions are unchanged.
  • feat(diagnostics): the App's report can always be made, and holds how each connection stands
    The App refused a report unless recording had been switched on before
    the problem, in every new process. So the one report that would say
    which path a connection took, and how its preparation ended, was the
    one nobody had.
    
    The recorder now keeps, for each pair this process has known, the last
    fact of each stage: whether a preparation ran, what the two mappings
    were read as, how it ended, its check counts, which path was selected,
    how the pair closed. These are the reviewed values the history already
    used, with no address, port or identifier; the newest 256 pairs are
    kept and nothing is formatted or hashed until a report is made. A
    report writes them as `connections.json`, each pair under the alias
    both sides share, beside the build and the history.
    
    The export answers whether or not history is recorded, from the
    launcher and from the terminal. The launcher shows the report and the
    switch side by side. Recording the history stays the person's choice.
  • refactor(core): an authority turn returns its typed outcome
    Authority::handle now returns Handled: the effects to deliver and an Outcome
    that each branch writes from its own result. A rejection carries its code and
    room. A committed turn names the durable record it changed (the acting user,
    the header, or a summary a host committed), the hosted room creation or
    deletion its storage owner must finish, and whether its last event is a
    request for the room writer. Admission reports a new user or renewed owner
    credential, the channel reports profile and domain changes, and the host
    branches report directory changes. For a change that is undone when it cannot
    be saved, the Core hands back the authority from before the turn.
    
    The Server hub saves, undoes or keeps what the outcome tells it, so
    changes_metadata, the hub's command matching, the inference from the last
    event and the stripping of deferred replies are gone, along with
    Event::Deferred. A completion without a request ID now exists only for a
    failure. In hosted mode the Core leaves the creation or pending deletion
    answer to the hosting owner instead of emitting a reply for the hub to remove.
    Hosted room creation decides whether to keep a reservation from a typed
    OpenRoomError::MayExist instead of matching error strings, with the codes sent
    to clients unchanged.
    
    Tests that asserted the removed prediction or the internal deferred event now
    assert the same behaviour through the outcome or through a reply with a
    request ID.
  • refactor(core): the time of a turn is an argument, not stored state
    Channel and RoomAuthority each kept a stored clock: Channel.now was written
    by some Authority entries and read later by reconciliation, host input,
    forwarding and host sync, and RoomAuthority.now kept the last dispatch's
    time for the later finish and finish_peer calls. Entries that did not write
    it judged repair and admission deadlines against an older turn's clock, and
    nothing in the types showed which ones.
    
    Both fields are gone. Channel::reconcile, reconcile_transports, host_input,
    forward_room, sync_hosts, register_host, stop_host, accept_host,
    unsupported_host_input and remove_room take now, and every Authority entry
    that reaches them passes its own, including set_service_endpoint and
    failed_room_delete, which now take it explicitly. RoomHost::finish and
    finish_peer take now: StoredRoomHost passes the dispatched input's time and
    its peer turn's time, the Browser binding and its room host pass the same,
    and the Server passes its own clock. Tests that assigned the stored clock
    pass the argument instead. RequestContext.now, HostInput.now and the wire
    are unchanged.
  • refactor(core): the room binding names what its floors mean, and readers ask by name
    The applied revision of a binding has one writer. It was compared with
    the three floors in eight places in six combinations, each reader
    writing its own idea of "current" as raw comparisons, and the topology
    read had the wrong one until a fresh build showed it.
    
    The binding now says the three things itself: the applied output knows
    the present participants (`scope_current`), its routes stand
    (`routes_current`), it covers the read policy that was asked for
    (`read_policy_current`). The eight readers ask by those names and no
    floor is compared anywhere else. Behaviour is unchanged; what each
    reader requires can now be read at its call.
  • test(app): expect unchanged page catalogs to stay quiet
    The native window fixture still expected a repeated catalog after closing an empty, unselected opener and reselecting the same child video. Assert the surviving WebView, selected media lifetime and complete catalog are unchanged, and require the specific empty queue outcome. Real candidate loss and final closure must still emit their existing events.
    
    This corrects the assertion reached in hosted Windows run 46167682687. That run remains failed; the corrected GUI fixture and previously skipped input check require a new isolated run. Production code is unchanged.
  • feat(watch): simplify video selection and preserve playback intent
    Start from one address and select a page video with one action. Keep resource ordering across direct, DASH and indexed offers, and keep each resource with its supported playback methods. Automatic viewers try the site before eligible sharer bytes; an explicit route stays selected. A room refusal ends the attempt rather than retrying a different source.
    
    Share, cancel and stop use a stable control footprint. End actions suppress native popover activation while preserving keyboard focus. The existing picker remains available for manual source and track choices. Update the English and Chinese flow descriptions.
    
    Built on reviewed queue changes 3378bca2 and f8ed4c1c, corrected through independent source-identity and operation-lifecycle regressions. The integrated Web suite passes 2631 tests; Windows compilation and 31 pure tests pass. Chrome at 390 and 820 verifies the combined workflow, keyboard focus and retry. Final TypeScript checks pass after matching the shared optional event signature. Native GUI and real-site acceptance remain separate.
  • docs: separate current contracts from investigation history
    Condense collaboration procedures, protocol field inventories and repeated audit or experiment narration into their existing owners. Keep accepted decisions, unresolved work, primary sources and measurement limits. Detailed historical trials remain accessible at their measured Git revision without a second archive tree.
    
    Align both language guides with the existing contribution value criteria. Keep local operating instructions out of public contributor guidance. Independent reviews preserved closed baseline choices and single-run evidence limits. Documentation and repository hygiene checks pass; this phase changes no runtime code.
  • fix(watch): tell the room a webpage's catalog only when it changed
    The bridge reports its candidates on every batch of document changes, and
    the host told the room each time: a catalog with a source read from every
    view, sent over the App link, and a render of the whole room page. The
    comparison now sits with the catalog's owner on the host, which knows the
    page's address and the limit on candidates: the bridge-side comparison is
    undone because, as Codex showed, it lost an address change of a page whose
    video sits in a frame, and a child's report refused for capacity.
  • feat(diagnostics): measure the native window loop after debug starts
    Renderer frame timing cannot see WebView2 work that blocks the host window thread. Send at most one timing probe through the existing Tao event loop and aggregate its queue delay there into the opt-in App report. The sampler shares the existing service lifetime and adds no window or network data.
    
    Summaries include the actual observation window, sample count, maximum delay and counts at 16, 50 and 100 ms. Existing Windows App compilation and deterministic threshold checks pass; independent review confirms bounded admission and cancellation ownership. Actual native-window delay injection and shutdown remain runtime acceptance, not established by the pure test.
  • fix(app): move windows from the host instead of CSS drag regions
    The App's whole window stalled in ordinary use. WebView2 recomputes a page's
    CSS drag regions in the embedding process, on the window thread, after each
    layout change, and answers pointer moves over a region from there. With the
    top bar marked app-region: drag, a posted event reached the window thread up
    to 217 ms late on maximize, 85 ms late on opening or closing a popover and
    505 ms late while the pointer moved along the bar; with no drag region it was
    never late, and the page's own frames showed nothing in either case. Others
    report the same path: WebView2Feedback 5798, and a sampled trace of another
    wry application that puts the window thread in Controller::UpdateDraggableRegions.
    
    The page's top bar, the standalone caption and the permission prompt now ask
    the host on a press, and the host starts the system's own move of the window
    (the first press moves, the second maximizes), as Tauri's drag regions do. No
    page uses app-region any more, and WebView2's non-client region support is
    turned off for every WebView, so that a site's own style cannot hold the
    window thread either.
    
    Measured in the App built from this tree with a real pointer: no late event
    in any of those phases, also with chat text selected and with a page that
    sets a drag region itself; a press and a move on the room's name, on the bar
    and on a detached panel's caption moves the window, a double click maximizes
    and restores, a drag from the maximized state restores and moves, and a
    control in the bar still takes its click. Not exercised: the permission
    prompt's heading. Lost with the regions: the system menu on a right click of
    the bar, and moving the window by touch.
  • fix(protocol): retain unfamiliar audience readiness descriptions
    Audience readiness describes an authorized viewer; it does not grant admission or select a route. A new well-formed description previously rejected the whole Domain snapshot and retired an established client session. Reuse the existing short wire key rule and retain the original value through Domain, Native and Browser.
    
    One presentation owner maps unfamiliar readiness to the existing joined label. Only active counts as received picture and only failed triggers failure. Malformed values retain validation. Real Domain host-output and Native image round trips, all 355 SQLite Core tests, both TypeScript projects and 102 focused Browser checks pass with the rebuilt WASM. Independent ownership review passed. Current writers still emit the original three states; this repairs the first-public extension boundary rather than attributing a field incident.
  • feat(diagnostics): record the first transport failure cause
    UU playback reports retained capture progress but lacked the event before flow retirement. Record the existing Engine failure branch in the opt-in RTC log before Driver retirement. Causes state only what the transport knows; unavailable send consent is not labeled as expiration.
    
    Independent callsite and privacy review plus the existing in-memory diagnostics ZIP fixture pass on Windows Rust 1.91. Repeated failure remains bounded by the existing Engine terminal state. No routing or recovery policy changes; the historical field cause remains unconfirmed.
  • fix(nat): keep STUN results when one destination rejects sends
    A configured destination can reject a UDP send while the same socket still reaches other destinations. Retire only that STUN transaction and preserve completed observations and pending destinations. Existing socket errors, cancellation and survey deadlines retain their owner.
    
    A Windows kernel-rejected send reproduces the old failure; the repaired survey retains the other real Binding response and its original socket. A separate local unicast control confirms send failure need not invalidate the socket. All 22 Native preparation tests pass, including all-target rejection. This is controlled local evidence, not regional reachability or field success-rate evidence.
  • fix(app): return unsupported for unknown page resource methods
    Treat the nested action as a request-method discriminator. Fold an unfamiliar
    string into the existing unsupported operation before looking up a page or
    starting I/O. Preserve its request ID and keep malformed known requests on
    the invalid-request path.
    
    The real App request parser reproduces the previous invalid-request result
    on the baseline and passes with the correction. Missing and numeric actions
    and a known read missing its resource ID remain invalid. The exact Windows
    Server library test passes; no App process or new recovery state is added.
  • fix(files): separate original media types from preview support
    Preserve a valid MIME essence in attachment metadata, signed history and file
    plans. Readers offer a generic download for formats they do not preview.
    Recognized raster bytes retain their original MIME and thumbnail behavior
    even when File.type is absent or wrong.
    
    Thumbnails keep their own raster, binding and budget validation independently
    of the original format. Historical inline originals still require the exact
    size and digest and a case-insensitively equivalent MIME type. Existing image
    decoders and retained original bytes are unchanged.
    
    Core SQLite passes 354 tests; Web TypeScript, 826 focused checks and 32 fresh
    WASM consumer checks pass. Real Chrome 156 exercises signed history, atomic
    restore/reopen and cross-frame file storage with the same WASM. The first
    browser harness bundle needed its dynamic module kept separate; the complete
    fixture then passed without product-source changes. The beta.62 missing-image
    report remains unlocated.
  • fix(ice): ignore unsupported hints without retiring the connection
    Preserve bounded origin labels through their assigned Domain pair. Browser
    and Native discard a hint they do not support before it can enter the pre-SDP
    queue or ordinary ICE. Native admission stays in Driver; Transport receives
    only ordinary candidate strings. Other coalesced signaling fields continue.
    
    The actual Domain and Native decoder/Driver controls pass, including continued
    bidirectional traffic on the original RTC. Browser's socket control preserves
    ordinary candidates, a coalesced offer and a pending request. Stale unassigned
    pairs retain their existing silent-disposal behavior. Combined Core and Web
    verification passed with the rebuilt shared WASM.
  • fix(rtc): nominate an available alternate without keepalive delay
    Advance the existing str0m patch stack to e8d043a0, retaining its consent and
    delay-controller repairs. The upstream nomination correction clears a cached
    check deadline when nomination changes the pair's state. Original authorship
    and the regression test are retained in the fork.
    
    All 120 ICE library tests pass. The actual Windows Native loss comparison
    changes nomination dispatch from 354 ms later to the same SDK tick, retaining
    both original SCTP channels and send consent. Total loopback recovery remains
    dominated by failure detection; this is not a WAN success-rate claim.
    
    With the Git pin, 31 focused Windows and 28 Linux Native checks pass. Seven
    Native/Server/Android metadata contexts resolve all four SDK crates solely
    from the same revision with unchanged feature sets. No package is relabeled.