Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。
docs(deploy): record healthy reselection cutover [skip ci]
AAA9d8d97826f70
diff --git a/docs/adr/0005-automatic-hybrid-media-routing.md b/docs/adr/0005-automatic-hybrid-media-routing.mdindex 5e7bcff2..12f6da4e 100644--- a/docs/adr/0005-automatic-hybrid-media-routing.md+++ b/docs/adr/0005-automatic-hybrid-media-routing.md@@ -459,18 +459,18 @@ mobile, or resource evidence. Chrome reported `candidateType=prflx` for the samelocal candidate; the standards-bounded interpretation and raw-counter summaryare retained in the linked research rather than normalized away.-### Deferred Optimization And Source-Only Follow-Up+### Deferred Optimization And Deployment Boundary-These items are not deployed runtime behavior; source-only status is called out-explicitly:+Current deployment status is explicit:- A room in which the Host and every possible root are restricted may requireseveral server-fed exceptional edges. Any such extension requires a per-roomselected-relay and central-egress admission cap; it must wait or fail at thatcap rather than become unbounded server fanout.-- Bounded healthy SFU-to-peer reselection is accepted below. The first- source-only slice is implemented for one SFU root and its existing baseline- parent; it is not deployed or browser-canary evidence.+- Bounded healthy SFU-to-peer reselection is accepted below. The one-root slice+ and its existing baseline parent are deployed in exact `6ccb516a`; browser,+ media, and production-route evidence remain unverified. Relay-capacity+ transition `0 -> 1` and multi-root healthy reselection are not implemented.#### Bounded Healthy SFU Reselectiondiff --git a/docs/deployment.md b/docs/deployment.mdindex a087a0cf..900c151f 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -20,24 +20,24 @@ tracked coturn example remains `stun-only`; the shared host retains its olderauthenticated-relay daemon configuration and firewall range. The applicationdoes not pre-advertise TURN credentials to ordinary peers.-Production currently runs exact `1331fbddb59fc2b0b99ba9e5ee4848768ae907c8`+Production currently runs exact `6ccb516a47261054f91dfa2fafa408d39ced59fc`on the existing shared public IP, with local/public health 200 and SQLite v3-integrity. Its immutable source artifact is 606,386 bytes with SHA-256-`7defb2c8d813de0576301f011a61cfc45481ce6ff209f14d61d2b9f0096a6a99`;-the locally built dist artifact is 355,113 bytes with SHA-256-`f20719d415396e6bc1feb6fba883c3a7ef0c619ba70fe1feafff96c93f8c8740`.-The 2026-08-21T09:19:09Z UTC cutover held the deployment lock for 848.008 ms;-local health returned 626.778 ms after service stop (560.282 ms after the symlink+integrity. Its immutable source artifact is 619,674 bytes with SHA-256+`ec0048023de4b40c32579c31db44cab8746dbae8e67430c16457a5bd437a4885`;+the locally built dist artifact is 358,621 bytes with SHA-256+`5d21c11e00e46525afbb40051b5276193f02c511728fce2c1e2df667b035cf73`.+The 2026-08-21T10:14:26Z UTC cutover held the deployment lock for 2,048 ms;+local health returned 1,272 ms after service stop (888 ms after the symlinkswitch). Screener, LiveKit, coturn, and nginx are active/running withobserved `NRestarts=0`. SQLite v3 contains five rooms including room `1`, with theservice owner/mode `screener:screener`/0600 and SHA-256`aef724ae52c4107be8ec8791e72f8dcaa11b0ec849fb432d022e2cfb9cfe0974`.-The immutable release is `/opt/screener/releases/1331fbddb59f`; backup-`/opt/screener/backups/1331fbddb59f-precutover-20260821T091908Z` preserves the+The immutable release is `/opt/screener/releases/6ccb516a4726`; backup+`/opt/screener/backups/6ccb516a4726-precutover-20260821T101426Z` preserves thedatabase, environment, artifact digests, firewall snapshot, and exact previous-target. Exact `261e980c3a9ff2d1a6b54ce18cf3daedb491b777` is the immediate rollback-target; exact `691863e1720ebbee1b5368f29e94f05b3710ccf8` and-`6634cb9fca8278b44d57e5fcddcbaf9f0dc9b137` remain secondary and tertiary.+target. Exact `1331fbddb59fc2b0b99ba9e5ee4848768ae907c8` is the immediate rollback+target; exact `261e980c3a9ff2d1a6b54ce18cf3daedb491b777` and+`691863e1720ebbee1b5368f29e94f05b3710ccf8` remain secondary and tertiary.This release keeps one stable SFU subscriber stream, clears unavailable SFUvideo state, stays neutral until current media evidence proves P2P or SFU, andlabels TURN plus a protocol only from actual local relay stats. Routing remains@@ -50,7 +50,10 @@ shared entry/nickname UI, and twodownstream slots per Webrelay remain deployed; a third child remains rejected. ProductionSTUN/SFU/selected-edge configuration and the database were unchanged.-Fresh exact-source acceptance passed typecheck, 32 test files/473 tests, both+One-root healthy-SFU make-before-break reselection is now deployed with its+revision/session/connection/media-proof and overlap guards; capacity `0 -> 1`,+multi-root, browser/media, and production-route evidence remain open.+Fresh exact-source acceptance passed typecheck, 32 test files/489 tests, bothbuilds, and repository hygiene. Deployment verified both artifact manifests andhashes, one bounded production-only install, runtime imports, `node:sqlite`,UTF-8 paths, zero cross-release regular-file inodes, and immutable permissions.@@ -151,7 +154,7 @@ ICE. The accepted ladder is direct/peer UDP, then the revision-bound SFU/UDPvirtual parent, then optional authenticated TURN for one controller-selectedexceptional edge. LiveKit participants receive only revision-bound `sfu-config`URL/token messages and negotiate within LiveKit's separate ICE domain. The-selected-edge TURN config/wire is deployed in the current `1331fbdd` release with one+selected-edge TURN config/wire is deployed in the current `6ccb516a` release with oneUDP URL and a 120-second credential TTL. It was not exercised by a real mediasession during this cutover.diff --git a/docs/project-memory.md b/docs/project-memory.mdindex 03adaf2f..ab637049 100644--- a/docs/project-memory.md+++ b/docs/project-memory.md@@ -27,7 +27,7 @@ Last updated: 2026-08-21- Production Web prefers H.264 through standard ordering, keeps the browser fallback list, and requests SFU H.264 with `backupCodec=false`; VP8 is used only when H.264 is unavailable. This is not a second encoder stack or shared-encode proof. ADR-0006's browser bridge remains no-go.- Mobile endpoints are Web Viewer-only. Current Android/iOS browsers do not expose Web Host capture; AirPlay/system mirroring is Viewer-local output.- ADR-0005: direct/peer UDP -> bounded SFU roots -> selected-edge TURN. The deployed controller caps pending/answered `peer-selected` at one per room; Host ingress is independent. A pre-`ecc794d` exact-source/production-media canary proves active Host ingress only. Ordinary peers stay STUN-only.-- `PEER_ASSISTED_MEDIA=true` enables isolated all-room controllers; room `1` is historical. Keep sticky P2P and one recovery attempt per layer. Source-only healthy-SFU MBB covers one root and retained parent after reauth/recovery, gated by media proof, Host2/browser1 overlap and cooldown. It excludes `peer-selected`; active-SFU loss aborts into normal recovery. Capacity `0 -> 1`, multi-root and browser gates remain open.+- `PEER_ASSISTED_MEDIA=true` enables isolated all-room controllers; room `1` is historical. Keep sticky P2P and one recovery attempt per layer. Deployed healthy-SFU MBB covers one root and retained parent after reauth/recovery, gated by media proof, Host2/browser1 overlap and cooldown. It excludes `peer-selected`; active-SFU loss aborts into normal recovery. Capacity `0 -> 1`, multi-root and browser gates remain open.- C+B quality reparenting is edge-local and cooldown-bound; no score, timer, or global parent penalty.- Flagship media is UDP; HTTPS/WSS stays TLS/TCP; the old release remains rollback-only.- Treat settings as ceilings and degradation as unclassified. Use correlated Host A+B/Viewer C and one-variable evidence; never force AV1, infer by UA, or create a composite score.@@ -43,7 +43,7 @@ Last updated: 2026-08-21## Current Implementation- The repository is one npm package using Node.js 24, React, TypeScript, Vite, native WebRTC, `ws`, Zod, Vitest, and separate coturn.-- Production is exact `1331fbddb59fc2b0b99ba9e5ee4848768ae907c8`; source/dist artifacts are 606,386/355,113 bytes, with hashes in deployment; cutover 848.008 ms lock/626.778 ms stop-health/560.282 ms switch-health; rollbacks `261e980`, `691863e`, `6634cb9`.+- Production is exact `6ccb516a47261054f91dfa2fafa408d39ced59fc`; source/dist artifacts are 619,674/358,621 bytes, with hashes in deployment; cutover 2,048 ms lock/1,272 ms stop-health/888 ms switch-health; rollbacks `1331fbdd`, `261e980`, `691863e`.- Web keeps one SFU stream, clears unavailable video, exposes evidence-backed routes/transports and paused preview, and drops signals to a grace-retained offline current-edge target. Routing is automatic; entry/nickname UI is live; Native remains source-only.- Web relay is cap2 with one upstream; child3 rejects and no UA/visibility split exists.- Four services are active/running at `NRestarts=0`; local/public health are 200. SQLite v3 has five rooms, SHA-256 `aef724ae52c4107be8ec8791e72f8dcaa11b0ec849fb432d022e2cfb9cfe0974`, owner/mode `screener:screener`/0600.diff --git a/docs/research/advanced-peer-distribution.md b/docs/research/advanced-peer-distribution.mdindex 49a03cd7..36bfa09f 100644--- a/docs/research/advanced-peer-distribution.md+++ b/docs/research/advanced-peer-distribution.md@@ -4,8 +4,9 @@- Scope: at most eight trusted viewers, sub-second interactive media, endpointdownstream fanout at most two, and minimal central-server media egress- Status: bounded C+B local reparenting and admission rescue are deployed;- one-root healthy SFU reselection is implemented source-only; advanced- encoded-media routes remain isolated candidates+ one-root healthy SFU reselection is deployed but browser/media/production-route+ evidence is unverified; relay-capacity `0 -> 1`, multi-root reselection, and+ advanced encoded-media routes remain unimplemented candidates## Termsdiff --git a/docs/status.md b/docs/status.mdindex 44672d71..f17b485f 100644--- a/docs/status.md+++ b/docs/status.md@@ -4,8 +4,8 @@ Last updated: 2026-08-21## Phase-Production at `https://share.bonfire.icu` is exact `1331fbddb59fc2b0b99ba9e5ee4848768ae907c8`; immutable source/dist artifacts are 606,386/355,113 bytes, with hashes in deployment.-Cutover: 848.008 ms lock/626.778 ms stop-health/560.282 ms switch-health. SQLite v3/five rooms has SHA-256 `aef724ae52c4107be8ec8791e72f8dcaa11b0ec849fb432d022e2cfb9cfe0974`, owner/mode `screener:screener`/0600. Four services are active/running at `NRestarts=0`; rollbacks are `261e980`, then `691863e` and `6634cb9`.+Production at `https://share.bonfire.icu` is exact `6ccb516a47261054f91dfa2fafa408d39ced59fc`; immutable source/dist artifacts are 619,674/358,621 bytes, with hashes in deployment.+Cutover: 2,048 ms lock/1,272 ms stop-health/888 ms switch-health. SQLite v3/five rooms has SHA-256 `aef724ae52c4107be8ec8791e72f8dcaa11b0ec849fb432d022e2cfb9cfe0974`, owner/mode `screener:screener`/0600. Four services are active/running at `NRestarts=0`; rollbacks are `1331fbdd`, then `261e980` and `691863e`.Ordinary ICE is STUN-only; limits are SFU roots <=2, one `peer-selected` attempt excluding Host ingress, and selected UDP TTL 120. This rollout ran no browser/media/SFU/TURN/performance canary; earlier exact-`16f6eab` Host-ingress proof remains separate.Stable SFU, route/transport truth, preview notice, entry/nickname UI and Web relay cap2 are live. Native is source-only. Production prefers H.264 with negotiated VP8 fallback.@@ -19,7 +19,7 @@ Parallel flagship work; minimum relevant checks and rollback proof. Research plu- Production `screener-v2` admits private fragment grants directly. Code-only Viewers need site access, then public rooms accept the code while private rooms also require their password. `SITE_ACCESS_PASSWORD`, `/api/site-access`, and its cookie are deployed atomically; raw credentials are never stored.- Source UI uses adjacent nickname editing, distinct site/room prompts, and a shared room-code form. Status and details stay neutral before media proof; current evidence labels green P2P/yellow `SFU fallback`, while relay evidence adds `TURN` plus only a locally observed protocol.- Native v2 is source-only (memory rooms, 300s reclaim); it follows authenticated direct-child assignments up to two and fails unsupported SFU/selected ingress boundedly.-- Production is roots/Web relay <=2; every Viewer has one upstream and rejects child3. One-root healthy-SFU MBB is source-only, not deployed; capacity `0 -> 1`, multi-root and browser gates remain open. Room `1` is historical; HTTPS/WSS is TLS/TCP.+- Production is roots/Web relay <=2; every Viewer has one upstream and rejects child3. One-root healthy-SFU MBB is deployed but media-unverified; capacity `0 -> 1`, multi-root and browser gates remain open. Room `1` is historical; HTTPS/WSS is TLS/TCP.- After an answer, a generation-bound 15s initial-connect deadline enters ICE restart; success/replacement/disposal cancels it. It is deployed but not mobile-verified.- Room `1` C+B reparenting remains uncalibrated. Deployed admission rescue promotes an unassigned relay over the oldest childless zero-capacity Host leaf, with no scores or periodic optimization.@@ -35,11 +35,11 @@ Parallel flagship work; minimum relevant checks and rollback proof. Research plu- Local gate proves pre-DOM fragment clearing, room-scoped session isolation, no site/grant transport-log hits, and no raw room-password SQLite sentinel; rotate/revoke tests pass. Headless loopback only.- Native wire/session tests enforce at most two authoritative children, no presence-created edge, stale-revision ignore, and one bounded unsupported-route failure per revision.- Production caps pending/answered `peer-selected` at one per room; Host ingress is independent. Focused admission/release/rollback/STUN-only tests pass; earlier Chrome proves active Host-ingress function only.-- Exact `1331fbdd` passed typecheck/build/hygiene and 32/473; deploy gates preserved runtime, artifacts, config/nft/DB hashes and four zero-restart services. Healthy-reselection source passed the same local gates and 32/489; no browser/deploy ran.+- Exact `6ccb516a` passed typecheck/build/hygiene and 32/489; deploy gates preserved artifacts, config/nft/DB, zero shared inodes and four zero-restart services. No browser/media/SFU/TURN/performance canary ran.## Unverified Boundaries-- The `1331fbdd` cutover ran no browser/media/SFU/TURN/performance canary. Earlier `16f6eab` proof covers Host ingress only; audible quality, last mile, external cohorts, admission rescue, resources/performance and game blur remain open.+- The `6ccb516a` cutover ran no browser/media/SFU/TURN/performance canary. Earlier `16f6eab` proof covers Host ingress only; healthy reselection, audible quality, last mile, external cohorts, resources/performance and game blur remain open.- Mobile is Viewer-only. Its persistent audible media element keeps media/signaling active while the page lives; iOS lock-screen, reclamation and background reconnection remain device gates. AirPlay/system mirroring is local output; live WebRTC `srcObject` has no portable in-app TV-output contract.- Silent partitions can wait 30 to 60 seconds for heartbeat detection before the default 5-second grace; this remains unverified.- Production startup blur remains open. One local Chrome synthetic same-`balanced` A/B kept route/PC/SSRC/track and coincided with 720p -> 1080p without loss/freeze, but natural ramp prevents causal, production, or SFU proof.