Commit Graph
409 Commits
  • fix(android): separate captured frames from refreshed presentations
    The actual Android worker replay reproduced a static keyframe refresh advancing recv_after beyond a newly arrived capture. Track raw acquisition separately from successful EGL submission, matching the existing Windows/Linux boundary. MediaCodec whole-microsecond output needs at least 12 us to advance a 90 kHz RTP tick. The production-loop replay covers late, sub-tick and previously dropped captures; the exact ARM64 source passes cargo check. Physical MediaCodec output remains unmeasured.
  • fix(input): map Windows pointer moves to the viewed pixel
    Use the Viewer picture fraction to select a source pixel, then target its integer Win32 interval after virtual-desktop translation. Keep pixel-centre placement and the producer rounding demonstrated by an actual rotated picturePoint sample.
    
    The complete Windows Native module compiles and its focused regression passes. The equivalent maintenance fix is 5dbc6fee. This does not claim to repair the distinct SendInput button rejection under issue 502.
  • refactor(nat): let the RTC retain prepared remote candidates
    The pinned SDK accepts authenticated remote candidates before remote credentials arrive. Add the candidate in the existing socket-adoption turn and remove the extra engine slot and delivery branch.
    
    Real bidirectional SCTP verifies both peers adopting before delayed SDP and selecting their authenticated tuples. Driver controls retain STUN-only early stop, bounded preparation with TURN configured, and rejection of a stale instance result. The full Native, Server and Web/WASM protocol gate passes.
  • fix(capture): preserve fresh Linux frames after a static keyframe
    Admit ordinary frames using their raw capture time while forced refreshes leave cadence unchanged. Record raw and presentation times only after successful submission, and keep local submissions at least one 90 kHz RTP tick apart. Source timing keeps its existing contract.
    
    The real x264 worker reproduces the missing first image, the sub-tick collision and a budget-dropped image mistaken for a replay. Updated production regressions reject the old paths and pass while ordinary frame limiting remains effective. Physical capture and other encoders were not measured in this control.
  • refactor(chat): share committed reply and broadcast selection
    ConversationOutcome owns the direct replies and optional live broadcast for both room writers. Browser retains current-binding checks and reads current recipients after direct completion; Native retains its local-session filter. Deletion keeps recipients captured by the committed removal.
    
    Removes per-record Browser JSON/WASM classification without changing wire records or stores. New WASM and IndexedDB controls, Native two-reader WebSocket delivery, SQLite deletion and focused SDK tests pass; the integrated Browser package and types were rebuilt.
  • refactor(nat): prepare candidates on the original RTC connection
    Start bounded Native preparation beside ordinary ICE on the Core-authorized pair, with both ordered STUN surveys running concurrently. Adopt the authenticated socket and its reader into the same Runtime turn, preserve ICE/DTLS identity and existing deadlines, and retire only optional preparation on refusal, failure or queue pressure. Remove the replacement-attempt state, deferred normal signaling and old prepared-socket constructor.
    
    Domain 54 rejects mismatched private clients because initial UDP signaling and failure semantics change. Rust and Web constants move together; App 27 and stored formats do not change. The equal-step classifier, packet/socket budgets and ordinary routing policy are retained. TURN provenance remains bounded unknown when it cannot be proved.
    
    The matched sequential-NAT control delivers H.264, Opus and a verified file on the original pair. Core, Native, Server, Web/WASM and protocol gates pass; Android ARM64 and x86_64 JNI compile/link and ELF checks pass. The real Native Session fixture now acknowledges actual binding/revision output rather than waiting again for an already received sibling reply. The full Web suite passes 2451 checks. Established TURN migration and public network rates remain explicit acceptance work.
  • fix(native): deliver acknowledged registration results after disconnect
    Once the authority Ack has arrived, the queued binding query and reply belong to the local caller. Run it despite carrier loss and settle it from the original current slot; replacing or retiring that slot still fails only its old replies.
    
    The regression uses real Core HostRegister/HostBound/Sync/Ack output while holding the preceding room completion. The baseline reports room_unavailable after carrier loss; the candidate succeeds while same-ID replacement continues to fail. All twenty product Session checks pass without warehouse probes.
  • fix(native): settle retired room registrations at their original owner
    Move the matched registration replies into the old room query when Ack arrives, using LocalAnswer for skipped or retired work. Derive hosting readiness after current events and completions so removing a failed reservation can finish admission. The new non-serialized interleavings cover same-ID replacement, a late failing reservation and fresh-session open failure.
    
    Welcome discovers files on an owned blocking task and reuses identities from still-open room owners instead of reopening their locked SQLite files. Unknown paths keep existing identity and duplicate checks. Document the signaling budget as session-wide across carriers, without a new ready state or recovery timer.
    
    The final Windows candidate passes 40 capture Session checks and 214 full no-capture Native checks with two existing manual tests ignored. A controlled exclusive SQLite transaction reproduces the old recovery wait; the candidate returns before the lock is released. Integrated Server library checks pass all 123 cases.
  • fix(media): validate the VP8 keyframe header before forwarding
    A frame-type bit alone cannot establish the first decodable input. Check the RFC 6386 uncompressed keyframe header, sync code, dimensions and first-partition bounds before ending keyframe wait. Malformed replacement keyframes re-enter the existing recovery path; no decoder or adaptation policy is added.
    
    Six targeted VP8 controls pass with real encoded samples, delta and reorder recovery, metadata and VP8-to-H264 switching. The queue control keeps a three-byte frame from producing SourceReady or Forwardable. Header validity is not reported as a decoder result.
  • fix(transport): own connectivity tasks through pump retirement
    Keep STUN discovery and TURN setup in the Engine JoinSet instead of detached-on-drop handles. Normal close waits for both and an aborted pump cancels their pending socket work. Pair and connectivity policy are unchanged.
    
    A real loopback TLS handshake remains open on the frozen baseline after aborting the pump, and reaches EOF with the fix. The new control and five existing retirement tests pass in the rebuilt Windows no-capture target.
  • refactor(native): serialize each room independently of the connection
    Keep each HostedRoom and file lock in one FIFO task, sharing bounded blocking execution and reusing existing byte and local-request admission. Session owns registration results and the wire; management and directory work no longer wait for an unrelated room. Binding, restore cancellation and same-room retirement stay ordered at the resource owner.
    
    A real WebSocket control proves B can commit while A is blocked in SQLite. Shutdown retains its first error, drains all producers and joins before returning, even after cancellation. This follows the spawn_blocking and channel lifetimes documented by Tokio: https://docs.rs/tokio/latest/tokio/task/fn.spawn_blocking.html and https://docs.rs/tokio/latest/tokio/sync/mpsc/struct.UnboundedReceiver.html.
    
    The final Windows release candidate passed 209 Native library checks and 37 capture Session checks. A retained regression runs without the warehouse SQLite hook and proves sibling cleanup after an error and canceled release. Integrated Server library checks pass all 122 cases. Other OS runtime acceptance remains in the existing platform ledger; no wire format, migration or new room deadline is introduced.
  • fix(rtc): adopt the upstream bandwidth-estimate deadline repair
    Backport str0m #1181 on the existing 0.26.0 fork and pin all three Native consumers to 9cd8827d. The SDK ignores unrelated early timeout wakes while fresh probe feedback can still update the estimate. No Piik quality policy or network timer changes.
    
    The upstream deadline regression and two recovery simulations pass. Seven Native transport/consent controls pass against the candidate sources, and the integrated published pin passes the selected-original bandwidth lifecycle control. The fixed-layer recovery measured 8.5 seconds, matching upstream's corrected nine-second assertion. Other lockfile selections remain unchanged.
  • perf(nat): extend the bounded random port search
    Raise the search from 512 to 1024 distinct targets with the same 256 sockets, five-second lifetime, schedule and concurrency limit. Matched kernel controls added eight successful checks across 64 cases; actual Rust ICE and decoded-media controls passed, including a real hit beyond target 512. No-hit traffic stays bounded at 120 KiB per pair and deadline cleanup is unchanged. This is mechanism evidence, not a field success-rate claim.
  • merge(review): wait for Native deadlines with platform timers
    Take the reviewed Windows RTC timing correction and place its owner at the Native platform boundary. Use one persistent high-resolution waitable timer plus a stop event instead of millisecond polling; same-machine controls reduced worker CPU from187.5to62.5ms over ten seconds while preserving deadline replacement and real Native media recovery. Core, Native, Server, WASM, protocol and2394Web tests pass in the integrated tree.
  • refactor(capture): share Windows frame admission
    Both Windows encoder workers consume the same latest-frame and keyframe-request state. Move their identical admission rule to that existing owner while preserving short-circuit cadence and force semantics. Both encoders compile and focused cadence/software controls pass; other platform policies stay with their adapters.
  • refactor(native): make the precise deadline the crate's platform clock
    The module sat under peer/, beside connection logic. What it knows is a fact
    about the platform and the runtime: a tokio timer on Windows has the precision
    of the system tick. That fact belongs to the Native crate beside windows_job,
    with one owner, and callers state an instant without assuming how fine a timer
    is. It moves to the crate's top level and its header says so.
    
    wait takes exclusive access, so a second waiter on one deadline does not
    compile, where before it was only a convention.
    
    The thread's cost is now measured: sleeping in one-millisecond slices for ten
    seconds on this machine takes about 570 wake-ups a second and 0.16% of one
    core. All 206 Native tests pass.
  • fix(native): meet the SDK's deadlines on Windows without waiting for the system tick
    The engine pump slept until the SDK's next deadline with a tokio timer. On
    Windows that timer fires on the system tick, 15.6 ms unless a process has
    raised it, and Windows 11 does not keep a raised period for a process that is
    neither visible nor audible. Measured here: a 2 ms tokio sleep returns about
    14 ms late, std::thread::sleep about 0.5 ms late.
    
    The pacer and the bandwidth probes need those deadlines. With the default tick
    a Native sender's estimate stayed between 200 and 300 kbit/s for twenty
    seconds on loopback, so the allocator rejected the optional flow of the
    recovery fixture and its test failed on every run on this machine. With the
    deadlines met the same fixture reaches 11.7 Mbit/s in two seconds.
    
    One thread per pump now sleeps on its behalf: an interruptible wait while the
    instant is far, then slices of a millisecond on the high-resolution timer that
    std::thread::sleep uses since Windows 10 1803. Other platforms keep the tokio
    timer. The thread's CPU cost during a session is not measured; it wakes at
    most once a millisecond while a deadline is within 32 ms.
    
    All 206 Native tests pass here with the default tick, the recovery test
    included.
  • fix(windows): retire the tunnel with its parent process
    Reuse the encoder child Job for the tunnel, with a standard OwnedHandle. An owned helper demonstrated that kill_on_drop alone leaves a child after abrupt parent exit; the existing kill-on-close Job ends it. Actual tunnel-owner controls and Windows capture-feature compilation pass. No global scratch purge is introduced.
  • merge(review): preserve preparation pacing and explicit transport retirement
    Take 26c407fc and the explicit Closed transition in 0cdfe8bd. The redundant post-disconnect drain was independently removed in 63b2d446; keep that deletion because the pinned SDK is inert after disconnect. Independent Windows timing reproduced cumulative relative-sleep drift, while its exact tick varied from the review machine. Packet budgets and preparation lifetime remain unchanged.
  • fix(native): preserve orderly retirement and measure actual consent renewal
    The pinned SDK is inert after disconnect, so remove the redundant drain that misclassified a normal local input close as failure. The recovery fixture waits for successful consent responses before measuring the next outage. Five focused close checks and the complete no-capture Native suite pass; prior failure outcomes remain intact.
  • fix(native): close a transport before its last drain reads consent
    Since the recovery change the drain fails an established transport that has no
    send consent. close() disconnects the SDK and then drains, and a disconnected
    SDK has no consent, so every orderly close of an established transport emitted
    Failed first. A local input then ended with local_input_failed instead of Ok,
    and two local-input tests failed.
    
    The transport is now marked Closed before it disconnects the SDK. The state
    says what it is, fail() returns by its own guard and no event is emitted.
  • fix(native): pace the random preparation by schedule so a coarse timer keeps its rate
    The pool and the search slept until one interval after each send. A tokio
    timer on Windows wakes on the 15.6 ms system tick, so 2 ms became about 15 ms:
    priming 256 sockets took about three to four seconds and 512 probes about
    eight, inside a preparation that has five seconds in all. Every recorded trial
    of the random method ran on Linux, where the timer is fine.
    
    The next send is now due one interval after the previous due time. A late wake
    sends what is due and the mean rate holds, which is how tokio's own Interval
    behaves by default. The schedule restarts when the probe loop starts, so the
    search does not count its wait for Ready as time to catch up on.
    
    The pool test now bounds priming at three times its nominal time. With the old
    assignment it fails on Windows at 2.9 s; with the new one the twelve
    preparation tests finish in 1.3 s.
  • test(native): exercise optional media admission through the real driver
    Use the existing feedback observation seam with real UDP/SDP/SRTP to prove selected picture and audio continue while a second flow waits, is admitted together and retires. Source demand and output decisions come from the production Driver. The integrated control passes; injected capacity is not a physical-link estimate or decoded-quality measurement.
  • fix(routing): preserve recoverable paths and adopt proved spare branches
    Keep current-socket disconnect observations separate from confirmed pairs. Existing room operations prepare and commit an authorized confirmed alternate, recheck every leg, preserve independent candidates through ancestor retirement, and reject late proof after recovery or a personal zero limit. Native reads SDK-owned send consent and retains established media; expiry uses the existing retirement boundary, including ICE Checking. Remote input releases on lost notifications and rechecks permission at the final write. Pin the existing SDK fork query at 5f1f6346 and move the private Domain wire to50, without changing stored formats or App26.
    
    Core, Native, Server, rebuilt WASM, protocol and 2389 Web checks pass, with Windows capture compilation. Matching frozen Browser/Native/Server controls verify actual decode, same-pair recovery, exact candidate adoption, late-proof cancellation, zero capacity and Native expiry. The final Checking-state regression and valid ICE restart control pass. No field NAT-success rate, cold three-hop discovery, Native GUI or physical-capture claim is made.
  • refactor(native): retry companion audio only when its inputs change
    The str0m adapter has no cross-pair audio slot allocator. Remove the old global retry on unrelated retirement and its release booleans. A real remote-SDP withdrawal reproduces unwanted reconstruction; the regression preserves video and sibling audio, then proves actual Opus reception after source replacement. Five media-reuse controls and Windows capture compilation pass.
  • merge(review): consolidate private room contracts and their readers
    Take Claude C2 at 53bea0a6 and the reviewed private contract batch. Viewer audience owns failure; invitation payloads use correlated replies; Core owns fixed observation limits; HostInput requires hosting mode; invitation digest derives from its retained key. Domain wire49, room SQLite11, IndexedDB9 and room archive4 refuse old private formats without mutation; unrelated formats retain their generations. Core/Native/Server, rebuilt WASM, five live protocol cases and 2388 Web tests pass; actual Browser storage checks pass. Broader media acceptance found a separate relay-unwatch decode stall and remains blocked; no runtime workaround or release is included.
  • refactor(core): a viewer reads delivery failure from its own audience entry
    The room carried the same fact to each viewer twice. Every snapshot had a
    failedSubscriptions list for the recipient, and every screen publication's
    audience already listed the recipient's session with the state failed. Both
    came from the publication's record of failed receivers over the sessions that
    watch the screen, and the Domain retained, validated, paused and merged them
    in matching ways.
    
    The audience is now the one carrier. The core no longer projects, retains,
    validates, pauses or merges the list, and the wire snapshot no longer has it.
    The audience validation already requires each entry to belong to an
    authorized, subscribed viewer of a screen.
    
    The client finds its entry by its own session identifier, never by user,
    because one person can watch the same screen from several endpoints. The
    projected view already drops this page's own entry when the page has stopped
    watching locally, so a screen unwatched before the room sees the unwatch still
    does not show as failed. The room preview's failed picture now comes from the
    viewer's own audience entry.
    
    No protocol, storage or format version changed: the owner batches wire changes
    and bumps once.
  • refactor(capture): share rate-based frame admission bookkeeping
    Four encoders reuse the existing rate/leak/drop sequence while keeping capture cadence, forced-frame semantics and platform feedback local. The 50-decision production-helper differential trace is unchanged. Windows capture compilation and the Native integration suite pass; physical platform behavior was not remeasured.
  • feat(rooms): explain local hosting failures in room settings
    Report known writer-lock and duplicate-file failures from the current Native hosting session. Reuse actual hosted-room authority for Server member rooms; keep Browser diagnostics separate. Read only when an authorized operator opens an offline room. Real file-lock/duplicate tests, 196 Native and 117 Server tests, TypeScript and focused Web checks pass. Rendered 320/1360 controls cover operator labels, aborted late results and no diagnostic requests for online or unauthorized rooms.
  • refactor(media): share primary flow failure classification
    Three Native retirement and attach paths apply the same primary-media predicate. Share that decision while retaining scoped cleanup and companion-audio retry. The actual track-ending control, full Native tests and integration checks pass.
  • fix(rooms): construct host policy from the accepted summary
    Native creation installed the default 64 kbps policy even when its accepted room summary advertised 96 kbps. Core now constructs the policy for Native and Server, retaining private caller choices. Default and nondefault policy regressions, Rust/Web/WASM/protocol checks and all 2385 Web tests pass.
  • refactor(native): remove unreachable room offer recovery
    The pinned SDK returns no change without an error; pending and retired room transports cannot satisfy the old stable-failure fallback. Remove that fallback and its duplicate state while preserving receive-only input checks, selected outputs and resource-release audio retry. Independent review, four direct transport controls, the Native suite and matching Server session integration passed.
  • fix(backup): bound operator room restores through installation
    The authenticated site-owner route now acquires the same room restore slot and upload budget as the per-room route. RestoreRoom retains the permit through installation, independently of archive shape. The original handler consumed the body under an occupied slot and returned 400; the corrected handler returns 409 before polling it. Full integration and backup tests passed.
  • refactor(audio): use the upstream WASAPI capture reader
    wasapi 0.27 correctly handles SILENT packets and exposes frame flags and QPC timestamps. Replace local GetBuffer/ReleaseBuffer pointer ownership with its slice reader and one reusable packet buffer, preserving the existing Float32 stereo clock and capture scopes.
    
    The Microsoft GetNextPacketSize shared-mode contract guarantees the buffer size used by the next read. Five Windows synthetic and initialization checks pass, plus integrated Rust compilation. Actual device capture and the reported field silence remain separate acceptance.
  • feat(forwarding): make Server forwarding an operator-controlled fallback
    The owner decided how a Server forwards. Forwarding spends the operator's
    bandwidth, so the operator offers it and it is off by default. Once offered,
    rooms use it without a second switch, a room manager can decline it, and the
    service ranks after participant paths (canon: P2P first, load is shared, the
    same rule for every node, automatic).
    
    a. Operator switches. PIIK_CHANNEL_SERVICE_TRANSIT is the master switch, off
    by default. PIIK_CHANNEL_SERVICE_TRANSIT_SCREEN, _VOICE and _FILES default to
    true and each turns one kind off. Files include original video forwarded for
    watching together. With the master switch off nothing is offered. The offer
    reaches room hosts with the service socket. The room removes the service from
    the relays of a kind it does not offer, and the channel rejects a projection
    that gives the service such a kind as site transit. A service that offers no
    kind reads as unavailable.
    
    b. A new room allows the service. Creation paths apply only an explicit
    choice, so Browser, App and Server-hosted rooms and room copies take the
    default, and a stored false stays false. The setting reads as declining a
    default, and its note says the site forwards only the kinds its operator
    offers, in all five locales.
    
    c. The planner names the service as the fallback. When a route is assigned it
    first extends the tree with participant relays only, then lets the service
    reach the receivers still waiting. It keeps that tree unless the joint tree,
    where the service may take a scarce output, serves more receivers, so ties go
    to participants. A strict participant-first pass could spend the source's
    outputs on direct listeners and leave those reachable only through the
    service unserved; a test reproduces that. The ranking among participants is
    unchanged.
    
    The rule applies when a route is assigned. A receiver already served through
    the service keeps that route until it fails or demand ends, even if a
    participant path appears later. A screen viewer can still make the usual move
    to a direct path from the person sharing.
    
    Left open: in a public room the service's session has ordinary read access,
    so a modified room host can list it as a plain participant relay, without the
    transit view that carries the room's choice and the operator's kinds, even
    when forwarding is off. Closing it needs the channel to recognise the
    Server's own session by identity in rooms that session does not host.
    
    Tests added in channel-core: a participant wins over the service; the service
    serves only receivers no participant path reaches; the service takes a scarce
    source output when that serves more receivers; a moved child takes a ready
    participant before the service; the service carries only the kinds its
    operator offers; a service that offers no kind reads as unavailable; a new
    room uses the offered service until its manager declines. Expectations
    changed for the new default in host_review, service_transit, stored_room and
    the first test of tests/service-transit-wasm.test.ts.
    
    Verified on the lane: cargo test for piik-channel-core with and without
    sqlite, cargo check for channel-server and channel-browser, the
    room_creation_policy test, a rebuilt WASM package, tsc -b, the whole vitest
    suite and the docs check. The channel-native suites were not run.
  • perf(native): keep the connection future at its lifecycle boundary
    Box only the connected phase after a successful WebSocket handshake. The same drive future still owns cancellation, recovery and cleanup. This keeps the large inner state machine from being carried inline through each outer caller without spawning another task.
    
    Measured Windows Rust 1.91 run_host future size drops from 33208 to 17904 bytes without capture and 33544 to 17904 with capture. The current and prior-wrapper candidates passed the same real two-process admission/resume/restart test. Current baseline already passed; this is a bounded frame-size improvement, not a claim about measured peak stack headroom.
  • fix(native): process state through one async frame
    Pass the current retirement set straight to the state owner instead of retaining a full Snapshot in an additional awaiting wrapper. The redundant layer overflowed the Windows Native main-thread stack during the real competing-process room admission check.
    
    Validation: the original integration executable and corrected Native CLI passed all 12 real-session tests; 20 capture-enabled Native session tests also passed. No larger thread stack, heap wrapper or retry was added.
  • fix(storage): isolate rooms with ambiguous local records
    Discover managed SQLite rooms by their durable identity and refuse an ambiguous target before offline deletion or restore installation. Healthy rooms and new room creation survive unrelated file failures. A resumed writer retires its known binding even when the operator cannot read that room; Core accepts retirement from the current authenticated owning session while still rejecting stale outputs.
    
    Validation: 20 Windows Native and four Server checks cover actual SQLite locks, duplicate/repaired stores, offline restore and hidden rooms. Sixteen Core room-access and seven service-transit controls verify resumed HostStop without accepting the stale socket, another session, wrong binding or unregistered HostOutput. All six source files match the validated v4 candidate. Public directory deletion retains its existing independent authority.
  • fix(session): keep draining peer events while retiring a reader
    Route watch-reader revocation through the existing await_peer owner, as registration and the other awaited Driver operations already do. The Session must continue consuming peer output while its bounded command send is pending.
    
    A controlled dispatch gate observed zero events on the old handler and one on the corrected handler. The 35 Native Session checks include the existing saturated Driver regression and reader retirement. This does not claim a field reproduction of both queues filling during revocation.
  • fix(native): admit video from the representations a receiver can use
    Integrate Claude 151f6601 with independent allocator and supply corrections. Reserve each optional flow minimum and its audio before distributing surplus; preserve standalone voice. Compute admission rates and forwarding from the same receiver-compatible supply, including reversed RID costs and H264 profile constraints.
    
    Evidence: the observed 187043/121722/53370 budget case and four reproduced failures in simultaneous optional admission, zero video budget, inverted RID costs and High-only forwarding. Corrected Windows capture checks passed 32; no-capture Native passed 195 with two hotkey checks skipped; all 125 Server checks passed. The original full capture run had two readiness timeouts that passed the same-binary serialized control. No physical-network or capture-device claim.
  • fix(native): give video admission one owner
    The allocator admitted an optional trial with a positive grant below every
    representation of its source, and the video Input then deactivated it
    silently. The flow was neither waiting nor rejected, so the route owner saw an
    admitted trial that sent audio and never video. The same split disabled a
    selected flow on a relay that cannot re-encode once the estimate fell below its
    only representation.
    
    The supply now reports a deliverable floor: the cheapest full or temporal
    representation, unknown before a complete observation and zero while idle. An
    output that the producer's encoder can serve in an accepted format has a zero
    floor, because any positive grant is usable. The allocator owns admission: an
    optional trial whose known floor exceeds its budget waits or is rejected,
    including when no selected incumbent is present. Established selected video
    keeps its floor when the estimate falls below it, which is charged before
    optional work, so floors beyond the estimate admit no optional load. Startup
    without feedback and unknown floors keep the existing bootstrap. This follows
    the shape of libwebrtc's allocator, which gives an enforced-minimum stream its
    minimum when the total is too low and pauses the others explicitly:
    https://webrtc.googlesource.com/src/+/refs/heads/main/call/bitrate_allocator.cc
    
    The Input keeps layer selection and keyframe readiness only. A positive grant
    that no longer fits after planning carries the cheapest representation until
    the next plan; Paused and a zero grant still deactivate it.
    
    Allocator tests cover the observed 187,043/121,722/53,370 bps case, exact and
    below-floor trials, unknown and idle sources, startup, the branch without an
    incumbent and selected floors above the estimate. Fixture tests whose subject
    is RTP identity or source lifetime now hold their second flow as selected media
    or give it a fixed estimate instead of relying on optional admission against
    the loopback estimate.
  • fix(native): retire a failed reader through its source owner
    A reader panic must deliver the same terminal SourceEnded event as a normal
    return. Keep the existing reader identity and source cleanup so healthy voice
    on the same pair survives, rather than retiring the entire transport.
    
    The full transport module passes 31 tests on Windows, including an actual
    injected video-reader panic with continued sibling RTP. Native without capture
    also compiles. Parent cancellation retains its existing abort-and-join path.
  • test(native): capture RTP ownership when stream reuse fails
    The cross-review machine reports fresh-SSRC failures while fixture input keeps
    advancing. On that failure, print both ends' MID/SSRC/track mappings, counters
    and bounded observation histories. Preserve the original error if diagnostic
    queries fail or their bounded collection expires.
    
    The instrumented test compiles and passes once locally without capture. This
    does not explain or dismiss the independently reproduced intermittent failure.
  • fix(native): drain peer events while checking ended captures
    An actor blocked on its full event output cannot answer the consumer's capture
    query. Share a non-recursive event pump between the session loop and await_peer;
    query-time notifications join the next bounded set of owned publications.
    
    Real Session and Driver tests exercise the saturated 64-slot queue and retain
    active replacement video and audio-only captures. Capture ownership remains in
    the Driver; no duplicate capture snapshot or unbounded queue is added.
  • refactor(audio): normalize capture scope at its authority boundary
    Validate the existing request once after cancelled audio cleanup and capture
    lease checks. Downstream producers consume Off, Source, ExcludeProcessTree or
    RenderEndpoint instead of reinterpreting independent optional fields.
    
    Preserve the current wire shape, required explicit selections and ordinary
    capture warnings. Windows, Linux capture and Android API 29 checks pass;
    a regression preserves capture_not_owned before invalid endpoint errors.
  • test(runtime): coordinate races and allocate UDP independently
    Use request barriers to select the updater provider instead of millisecond
    sleep races. Allocate the integration test's UDP port through UDP rather than
    assuming the OS accepts the separately allocated TCP port.
    
    Refresh RTP baselines at the actual warm switch and compare modular progress.
    Keep media reuse deadlines and add failing phase/cycle context. This improves
    test causality without claiming the reported intermittent capture failure fixed.
  • test(native): cover transport failure during session resume
    A real WebSocket control verifies that a dead Driver on resumed admission
    releases the old session and that a fresh Driver can reuse the fixed sockets.
    Keep the transport test lease helper confined to capture-enabled tests.
  • fix(native): isolate individual room storage failures
    Opening or installing one room must not retire independently hosted siblings.
    Handle that failure at the existing room operation, retain global directory
    and identity failures as host failures, and report the failed CLI room ID.
    
    Session and real Server tests cover a locked room, creation installation
    failure, healthy sibling chat/history, recovery after unlocking and a second
    process that cannot steal an existing binding. Invalid global layout still
    ends the HTTP service and leaves the data unchanged.
  • fix(capture): use requested keyframes across native encoders
    Linux and Windows hardware use the shared 3000-frame WebRTC interval. Linux
    caps GOP to the plugin's advertised maximum, keeping unrelated numeric
    properties strict. Windows preserves a usable driver when the optional GOP
    property is unsupported.
    
    Android follows libwebrtc's 3600-second MediaCodec interval, which avoids the
    negative-value initialization failures described in upstream 419344264cfc.
    Existing explicit keyframe requests remain unchanged.
    
    Validation includes real x264 force-key-unit output, a synthetic NVIDIA MFT
    comparison, Linux capture compilation and Android API 29 links on both ABIs.
    Physical Android and other hardware drivers remain in TODO.
    
    Sources: https://webrtc.googlesource.com/src/+/refs/heads/main/api/video_codecs/video_encoder.cc
    https://webrtc.googlesource.com/src/+/419344264cfc7445af3e82024bd285303e17b3d6%5E!/
  • fix(watch): retain confirmed source handoffs across reconnects
    The room retains the original source and current successor for its subscribed
    viewers. Ordinary snapshots project that typed predecessor, including when a
    viewer misses more than one replacement. Local playback and receiving-method
    choices remain with the Browser.
    
    Remove one-shot channel event decoration. Joining, leaving, access loss and
    session expiry retire the room record. A leave for an already-retired screen
    is routed only through that viewer's authorized pending handoff.
    
    Core regressions exercise both cross-kind chains, session recovery, revocation,
    fresh sessions and independent viewer exits. Shared Web schemas and Native
    constructors use the same pending Domain 46 contract. The existing network
    design owns the lifecycle; no persisted-data format changes.