Commit Graph
457 Commits
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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(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.
  • fix(hosting): complete room creation by its owning session
    Confirmed creation failures now broadcast reservation removal, including after the requester resumes on another connection. A lost writer reply retains the reservation because the SQLite room may already be committed. Cancellation uses the captured session identity and the shared Core effect owner. Regressions reproduced the stale snapshot and resumed-connection leak; actual-commit lost replies and subsequent creation pass. Explicit Native admission errors retain their existing meaning.
  • 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.
  • fix(app): preserve focus when pinning voice overlays
    Owned-window traces reproduced a pinned transparent overlay retaining foreground after creation. Carry the opener foreground intent into Tao and Wry creation, avoid initial caption focus, and return focus on pin only when the popup owns it. Native controls verified initial pin, adjustment, Escape, background opening, pointer passthrough, title-bar dragging and room return while voice stayed joined. The current Windows capture-enabled app check passes; no new window mode or IPC is introduced.
  • refactor(storage): persist domain identities as individual rows
    Keep Identity as the authority, while a Domain SQLite transaction writes the admitted user and conditionally updates the small domain header. Normal startup hydrates the same model without rewriting it. This removes full-history profile rewrites and preserves recovery of a previously uncommitted room directory without a dirty-state mechanism.
    
    The private Domain physical format is 1; Room SQLite remains 10 and portable archives and wire versions are unchanged. Unsupported old private databases remain untouched. A matching old build can export the existing domain archive for import into a fresh directory.
    
    Paired local Release controls at 2000 retained identities measured join 17.78 to 4.17 ms and rename 7.75 to 4.02 ms. Full Rust, Native, WASM, protocol and 2394 Web checks pass. Actual old-Linux-export/new-Windows-import preserves credentials and records; real Browser hosting verifies storage scope and byte-bounded signed history across five pages. Correct obsolete fixture assumptions about standby pairs and private room admission.
  • 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.
  • merge(review): integrate voice ownership and scoped Server forwarding
    Take the reviewed voice owner and interface lanes, preserving room-local media lifetimes. Server forwarding is offered per kind by its operator, remains off by default, and fills participant routing gaps without sacrificing reachable receivers. Validate the registered service identity even in public rooms and advance private Domain protocol to 48 for the typed offer.
    
    Correct quick-sharing reuse, pending picker ownership and local bootstrap retirement. Keep record-extension and recovery proposals separate from production mechanisms. Full Rust, Native, Browser-WASM and protocol checks plus 2350 Web tests pass; follow-up focused controls pass 672 tests. Actual Domain-48 loopback controls verify master-off, voice-only hosted and files-only Browser-hosted traffic with unchanged room authority.
  • 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.
  • fix(app): exchange one-use tickets for local owner entry
    Chrome retained the original fragment URL in its persistent History database even after replaceState. App-owned navigation now issues a short-lived single-use ticket; the existing local Join consumes it under the domain lock. Ready, launcher links and terminal reopening no longer carry the durable bootstrap seed. Personal credentials keep their current reconnect and storage behavior.
    
    The ticket follows the short-lived, single-use bearer principle described in RFC 6749 section 4.1.2; this is an internal local bootstrap, not a new OAuth implementation. No public Join field or saved-data format changes. Full Rust, real Native session, Browser/WASM and protocol checks plus 2342 Web tests pass. Matching Windows WebView package acceptance remains in TODO.
  • fix(update): dismiss the helper message before reopening the App
    The old App could retry while the modal helper still held the prior workspace open. Report replacement failure before restarting the initiating App, then let the existing helper finish and record its outcome. Preserve the original failure chain and any restart failure, without a new result consumer or retry state.
    
    Validation: the old product helper reproduced access denied on production workspace retirement with its message still open. The revised signed-helper control restarted after dismissal and retired the workspace successfully. Twelve update tests and the capture App build passed; all owned fixture processes exited.
  • fix(update): retain the installation while another App uses it
    A Windows App holds a read-only directory lease while it may load bundled resources. Replacement cannot move that installation out from under another profile. On failure the helper requests the old App restart and records the result before showing the existing dialog, without killing other instances.
    
    Validation: the capture App built and 12 update checks passed. Isolated signed product-helper controls preserved old resources and both profiles while a second App ran, then updated after it exited. The actual owned failure dialog appeared after result.json was written; restart readiness may follow it. Protection applies to instances that include this lease, not previously released executables.
  • 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.
  • test(browser): run Windows servers from an owned build copy
    Snapshot a Cargo Server before starting Windows acceptance so later relinking cannot collide with its executable lock. The build caller explicitly identifies custom Cargo output with --built-server, and the second domain reuses that snapshot. Packaged input stays at its supplied path.
    
    Validation: five protocol checks passed. An isolated Windows control reproduced EBUSY on direct execution and successful rebuild with an unchanged snapshot hash. The actual runner timeout path retired both Servers and removed its directory; no additional wait or retry was needed.
  • fix(watch): retire obsolete webpage selection grants
    Retire a prepared reader when its candidate resource changes or disappears, using the existing projection lifetime. Ignore replies to requests whose receiver has already closed before any selection side effects. A failed or expired replacement retains the active source; page event limits share their existing named owner.
    
    Validation: independent lifecycle review and 23 Windows capture-enabled checks, including deterministic closed-receiver selection and owned HTTP range/redirect credential controls. The boundary-constant consolidation compiled and its two focused regressions passed. No change to the accepted direct-URL fallback.
  • refactor(capture): give each pending source an explicit phase
    Replace separate commit, lease and candidate fields with preparation, external readiness, prepared lease and submitted commit phases. Derive a prepared candidate ID from its lease while the submitted phase retains the ID owned by the pending host result. Room acknowledgement and active source ownership remain in their existing handlers.
    
    Validation: independent lifecycle review, 35 capture-enabled Native Session tests, 13 Server library checks and a control-WebSocket preparation-failure/cancellation check; the Windows capture App built. Update the three existing WHIP fixtures to the same phase representation. Physical source switching was not part of this check.
  • fix(app): commit site ownership with the accepted navigation
    Keep the current local-room origin while another site is only pending.
    Commit its local/site origin together when the matching document begins loading,
    so a failed navigation does not prematurely strip the existing overlay owner.
    
    The Windows capture-enabled product tests cover pending and accepted navigation,
    site verification and bookmark authority separation. Full WebView failed-load
    interaction remains a distinct runtime check; no bookmark or permission role changes.
  • fix(app): use native window activity for attended actions
    WebView can retain document focus after another Windows application becomes
    foreground. Project each Piik window's actual activation into its document
    and share that fact across message feedback, read markers, shortcut ownership
    and remote-input reset. Keep media visibility and room grants independent.
    
    The same real foreground-window transition reproduces silence and premature
    read advancement on beta.53, then triggers cues and preserves unread position
    on the candidate. Returning to Piik advances the cursor. Audio output was
    muted in the experiment; oscillator execution and completion were measured.
    All 2315 Web tests, TypeScript and the Windows capture-enabled App check pass.
  • test(server): allocate UDP independently in both browser harnesses
    Use the same OS UDP allocation helper for the primary and additional test
    Server, with the value scoped to each child's environment. Avoid reusing a TCP
    port that can be reserved for UDP on Windows. Actual protocol checks pass.
  • test(server): allocate the check Server's UDP port through UDP
    run-browser-check.mjs reserved a free TCP port and let the Server bind UDP
    on the same number. Windows reserves port ranges per protocol, so a free TCP
    port can sit inside a UDP reservation. On a machine where
    `netsh int ipv4 show excludedportrange protocol=udp` lists 52359-52458 and
    the TCP list leaves 52360-52395 free, three protocol checks in a row ended
    with "Bind Server UDP 0.0.0.0:52363 ... os error 10013".
    
    Give the Server its own UDP port, as 3713fc4c did for room_creation_policy.
    Only that child receives it, so the second Server that
    browser-native-acceptance.mjs starts from the inherited environment does not
    try to bind the same port.
  • 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.
  • fix(app): finish shutdown when the HTTP service ends first
    Both stop and HTTP-return paths await the same cleanup future, preserving
    dependency order and preventing cancellation of partially completed shutdown.
    Controlled Tokio checks cover cleanup before start, during work and after
    completion; the normal Server shutdown tests retain their existing contract.
  • 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(watch): prepare a new player without retiring the active webpage
    Keep a borrowed page and its active media reader alive while the host inspects
    another player. Commit the candidate only after the room accepts it, then retire
    the previous reader through the page owner. The native caption reopens the same
    source chooser without navigating the logged-in page.
    
    Validation: 2298 Web tests, TypeScript, Windows same-page A/B cancellation and
    commit controls, 41 current Windows page tests, Linux page tests and both Android
    ABIs. Two cancellation assertions were updated to expect the released empty slot.
    The ownership and source-selection contract is in channel-network-design.md.
  • fix(media): preserve shared encoding through pause and resume
    Read the negotiated codec separately from active allocation so pausing a sender does not permanently disable shared encoding. Refresh native page placement when pixel density changes and refresh selected-source labels when their title attributes change.