Commit Graph
801 Commits
  • fix(storage): reject unsupported App settings before schema writes
    Make the existing SQLite format zero an explicit local owner and refuse other versions before DDL. Current approval scopes, namespaces, startup and bookmarks are unchanged; actual writer/reopen controls and byte-preserving newer-format rejection pass. The proposed public baseline now includes App settings and Browser identities alongside room/domain stores.
  • refactor(app): let the Domain initialize its own authority
    Generate the local owner key only when creating the Domain checkpoint. App settings keep their permission namespace and stop creating a duplicate secret. Existing and restored Domain keys remain authoritative; explicit Server seed configuration is unchanged. Focused startup, consent, restore and ticket controls and the full Rust/Server/protocol gate pass.
  • fix(conversation): return signed command decoding failures to their caller
    Retain the verified request address before decoding its typed action. Invalid SDK parameters now use the existing signed error reply instead of waiting for a timeout; bad signatures and stale bindings still fail before work. Core, Node/WASM and matched Server protocol checks pass without a new wire shape or client schema.
  • perf(routing): prefer a shallower confirmed parent at equal priority
    Take the ordinal candidate ranking from Claude proposal797092a1: preserve confirmed/pending/retry priority, then prefer the shorter authorized prefix before endpoint identity. Replace probabilistic regression with deterministic candidate ordering. The bounded independent replay shortens aggregate trees but has mixed tail waits, so narrow the evidence claim. Full Core SQLite and discovery checks pass; no extra probe budget or live route replacement is added.
  • chore(diagnostics): name the pending App host shutdown
    When existing debug diagnostics are enabled, print entry and completion around the owned host-task join. Keep waiting and retain the existing shutdown owner; add no timeout, abort or recurring logger. Capture-feature compilation passes.
  • fix(build): resolve Windows resources from the current source root
    A reused build-script executable retained an obsolete archive path through env! and could no longer find the App icon. Read the Cargo manifest directory when the build script runs, as documented by Cargo. The same cached executable now compiles resources from both the checkout and a frozen archive; Windows capture-feature checks pass without clearing the cache.
  • test(network): keep the kernel fixture aligned with discovery
    Use three distinct isolated STUN addresses, as the production survey requires, and collect namespace process diagnostics with portable ps columns. The actual kernel preparation and media comparisons executed these fixture corrections; no host networking changes are retained.
  • 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): let socket replies progress during room registration
    Take the independent writer task from bb6eaf64 and yield after each buffered reader turn. A real single-worker server then acknowledges all 32 room registrations instead of closing after 16. Writer stop and panic cleanup, slow-writer liveness and private-room restart checks pass. The private-room fixture now retains an already received ready state rather than expecting a duplicate.
  • perf(core): omit unchanged public room projections
    Every host input, revision, reply, private input grant and route reconciliation still runs. Compare owned projection and transport values only for an otherwise unchanged output, then avoid repeating its public State fanout. The controlled twenty-endpoint case drops79to19States without a persistent cache. Independent field/consumer review, full Core/Server/protocol and Web checks pass.
  • 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.
  • fix(server): give a connection's writer its own task so a burst of requests cannot starve its replies
    One task read and wrote a connection through a select. The reading branch
    dispatches a request and reads the next without yielding while frames are
    buffered, so the writing branch did not run until the burst ended. A room
    host that reconnects registers every room back to back, and each registration
    puts four events on its own queue of 64. Measured on a real Server with its
    own Native host: at 32 rooms the seventeenth registration found the queue
    full with about one event drained, the host was closed, and it reconnected
    into the same burst 57 times in a minute without one room coming back. At 16
    rooms the queue peaked at exactly 64.
    
    The writer is now a task of its own, owned by the session through an
    abort-on-drop handle, which is how a WebSocket with an outbound queue is
    usually arranged. Nothing else about the session changes: the same queue,
    the same close signal, the same drain at close.
  • 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.
  • refactor(web): use the canonical channel entry
    Remove the duplicate channel-preview route and move its launcher, owner-link, acceptance and documentation callers to the existing root URL. Query and invitation fragments retain their meaning. App launcher and component preview routes stay separate. Route, session and built-server protocol checks pass.
  • fix(server): await shutdown when the owner link ends
    Signal and await the existing service shutdown instead of dropping its future when owner IPC fails. Preserve the primary IPC failure and ordinary signal shutdown. Server lifecycle checks and matching protocol acceptance pass.
  • refactor(routing): share prepared input validation
    Name and reuse the existing candidate-input predicate after reconcile and ancestor failure. Keep derived placement separate from branch identities and capacity, and retain the current switch contract. Core recovery, branch proof and forwarding-capacity checks pass.
  • 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.
  • fix(app): keep registry reads available during restore
    Retain one exclusive host-creation fence through retirement and atomic Domain replacement while releasing the registry for launcher and approval reads. Successful and rejected HTTP restore controls preserve authority and block new host creation until completion. The existing cancellation, backup and complete Server checks pass.
  • fix(server): exclude writer work from socket idle time
    Keep ordered dispatch and the existing twenty-second read timeout. A real local WebSocket control answered five Pings during a delayed writer turn but was incorrectly closed; timing only the next read preserves the connection and command order. The complete Server suite passes.
  • refactor(app): use one control reply envelope
    Completed operations retain their authorization, cancellation and cleanup owners and pass results to the existing reply helper. Remove repeated envelope writers. Existing App lifecycle controls, complete Server checks and Windows capture-feature compilation pass.
  • refactor(conversation): deliver one signed history page
    The writer already produces a bounded complete page and readers publish it atomically. Remove the per-message/reaction envelopes and Browser/Node reassembly, retaining request, binding, transaction and live-change owners. The mixed-page component control cuts serialized bytes by 47.4% and signatures from 101 to 1. Advance private Domain wire to 51; stored formats are unchanged. Core, actual IndexedDB, Server, Node and protocol checks pass.
  • 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.
  • refactor(core): state the path-down predicate once and drop the unobserved flow entry
    Plan::path_down now states once whether a reported (child, parent) pair lies on
    a receiver's path to the source. The alternate-parent filter in reconcile, the
    switch commit check and the reduction readiness check in flow_state each walked
    that path by hand; they now call the method and keep their own starting point
    and the terms they combine with it.
    
    RoomRuntime::flow_state, which passed an empty observation set, had no
    production caller and is removed. Its tests pass an explicit empty set instead.
    With no unobserved variant left, Publication::reconcile_observed becomes
    reconcile and the flow_state_observed methods on Publication and RoomRuntime
    become flow_state. The redundant parentheses around the three viewing
    comparisons are removed.
    
    The room's disconnected_pairs field is kept: RoomHost::finish and
    RoomHost::finish_peer reconcile after a dispatch and read the set it stored, so
    removing the field needs that set carried with the dispatch's other remembered
    inputs first.
    
    Behaviour is unchanged. cargo test --features sqlite still reports 331 passed
    and 1 ignored, and cargo test without the feature reports 172 passed.
  • 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.
  • test(browser): verify current drawers and media on the selected engine
    Replace obsolete always-visible roster and old menu selectors with actual chat, room and people controls, retaining focus, draft, session and player assertions. The full five-Browser gate passes on Chrome156. Record the version-scoped Chromium152 reproduction and the passing current-engine controls; no media workaround or browser allowlist is added.
  • docs(review): distinguish relay evidence by the tested runtime
    The same reduced and complete product sequences pass on current Chrome156 while Chromium152 reproduces the rVFC-related stall. Keep product behavior unchanged and record the actual engine. Coordinate the remaining UI acceptance and G50 runtime controls with Claude.
  • 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.
  • test(media): distinguish receipt from local audio decoding
    Actual Chrome controls show deafen retains RTP receipt and two-output relay forwarding while an unplayed leaf stops decoded-sample counters. Keep decode assertions for actual listeners. Record the separately reproduced relay-unwatch video stall as unresolved, rejected candidate fixes and pinned SDK consent-window evidence; request independent Claude review.
  • 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.
  • feat(server): issue owner links through a local operator command
    Reuse the existing short-lived single-use launch ticket behind OS-scoped local IPC. Bind the operator endpoint before readiness and retire it with the Server; no network administration route or new identity is introduced. Windows and Alpine package controls pass for issuance, replay, credential reload, expiry, shutdown and cancellation. Linux denies another UID; Windows ACL was reviewed but an alternate-user run was unavailable. Native pipe cancellation and the six integrated binary tests pass; Android locked metadata remains valid.
  • 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.
  • merge(review): give the 3.0 documentation one owner per contract
    Take Claude b4c96a79 after independent semantic and engineering reviews. Preserve current remote-control, playback, language and media rules while removing duplicate 2.x copies. Actual VitePress build exposed missing Chinese deployment and unpublished-reference routes; repair both and verify generated links plus publication tests. Browser preview startup was rejected by automatic review, so this does not claim rendered documentation acceptance.
  • fix(server): refuse recognized 2.x startup configuration
    Both official 2.x Compose definitions inject PIIK_ENV. Refuse that configuration before frontend loading, listening or data initialization, with a clear version-specific remedy. A bounded actual-executable test verifies refusal and untouched data; Rust/Web/WASM/protocol integration checks pass. Unmarked manual legacy setups are not detected by this guard.
  • refactor(app): store startup preferences in one format
    Use the existing tagged JSON for every startup choice. An unreadable private preference opens the launcher for reselection; database failures still propagate. Windows startup and long-path persistence controls pass, along with the Rust/Web integration gate.
  • 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.
  • docs(standards): give playback ownership and small 3.0 rules their owners
    Playback ownership moves from the 2.x presentation lifecycle copy into
    media-status.md beside its evidence boundary, restated as the 3.0 player
    behaves: one element per received input owns its frame proof, the displayed
    element owns playback, picture-in-picture and fullscreen, and a candidate keeps
    the local pause and volume when it takes over. Typed playback facts, the
    decoded-frame silence rule and local candidate addresses join the evidence
    boundary. Viewer listening gain joins media-quality Screen Audio, and the
    two-second idle delay joins the visual language.
    
    The remaining fragments go to their 3.0 owners: the room voice ceiling to
    media-quality, the rejected-candidate distinction to the network model's
    existing sentence, App discovery and consent and the Browser debug report to
    the Server README, and the preference-restore rule to the room-data model.
  • 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.
  • refactor(app): separate control admission from ready operations
    Every valid operation now passes the shared Hello admission phase before dispatch. The ready loop owns a concrete host sender, while the outer connection cancellation and timed writer remain unchanged. Failed Hello can retry on the same socket. Independent producer review, 87 focused App tests, integrated Server tests, matching Native-session controls and the capture-enabled Windows build check passed.
  • refactor(server): remove the limits route nothing calls
    The Browser reads attachment limits from the core through WASM, and no client,
    script or test in the repository requests this path. The Server's 116 library
    tests pass.
  • refactor(core): a route wake no longer expires publications a second time
    Every dispatch reconciles each publication before it matches the action, and
    reconciling expires first, so the wake's own call found nothing due. The wake
    and its guard stay: an idle room still needs a dispatch to advance its
    deadlines. The helper is now used by unit tests only and is compiled for
    them. The core's 327 tests pass with the sqlite feature.