Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

docs(deploy): record failed host-name rollout

AAA05d14fae3fa1
diff --git a/docs/deployment.md b/docs/deployment.md
index 12698fde..62f0436c 100644
--- a/docs/deployment.md
+++ b/docs/deployment.md
@@ -19,13 +19,15 @@ STUN-only ICE and the tracked coturn example remains
`stun-only`. The shared host still retains its older authenticated-relay daemon
configuration and firewall range, but the application advertises no credential.
-Production `31bee238bc1e` runs this candidate for exact room `1` on the existing
-shared public IP. Immediate rollback to `7fea60ef6f2` uses the current v2
-database and environment. Rolling back the admission-policy cutover requires
+Production currently runs `fdd14ba0d9b5ea4c43aa0f6a3a29e0eacf182612` for exact
+room `1` on the existing shared public IP, with health 200 and SQLite v3. The
+preceding `fdd14ba` deployment completed successfully and remains the rollback
+target. Rolling back the admission-policy cutover requires
`89e6d7649169` plus the environment backup recorded below; only deeper
pre-access `9610032fc5f5` may restore matching v1 state. The production
application TURN tuple is absent and the failed canary backup is inactive. This
-is a bounded smoke, not broad-rollout acceptance.
+is a bounded smoke, not broad-rollout acceptance. The selected-edge TURN tuple
+is disabled in production.
## Topology and prerequisites
@@ -403,6 +405,19 @@ lock remained; the immutable upload, active release, and backups are retained.
No real room triggered admission rescue, so this verifies deployment and
rollback readiness, not the new route transition or media quality.
+The subsequent Host display-name candidate used exact source
+`61a87ae47e38abc943cef47b3d7318bb51bf86d6` and artifact
+`screener-61a87ae47e38abc943cef47b3d7318bb51bf86d6-20260820T143538Z.tar.gz`
+(883597 bytes, SHA-256
+`d5b4d6cc567ba96ce37f8eb9934dd5822c64dc084796047d5f6d6217e2e74acb`). The
+ephemeral deployment wrapper reached `RELEASE_PREPARED` but omitted the
+`mv` from the prepared stage into `release`; systemd then reported
+`status=200/CHDIR`. The application and database were not the cause. Automatic
+rollback left `fdd14ba0d9b5` active and healthy, with SQLite v3 retaining four
+rooms including room `1`; Screener `NRestarts=31`, while LiveKit, coturn, and
+nginx were 0. Host display-name remains source-only/not deployed. No
+selected-edge TURN enablement occurred.
+
Enabling persistence does not migrate rooms that existed only in memory. The
deployment restart invalidates those temporary links; the first subsequently
created persistent room receives ID `1`.
diff --git a/docs/project-memory.md b/docs/project-memory.md
index 804fd4a7..9499d0a1 100644
--- a/docs/project-memory.md
+++ b/docs/project-memory.md
@@ -31,27 +31,25 @@ Last updated: 2026-08-20
- 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.
- Production reports poor film audio and self-echo when system capture includes voice software. Diagnose audio A/B/C and sync; Web cannot isolate arbitrary processes and `maxBitrate` is not quality-up. A Windows 11 native candidate defaults to game-process-tree audio and never widens silently; Windows 10 remains unresolved/unsupported. See `docs/research/browser-screen-audio-quality.md`.
-- Viewer-local names and the opt-in Web participant roster remain control-plane-only. The Web Host now has a local stable-ID fallback and can rename itself; names stay socket/localStorage-only, and Native remains outside the capability boundary.
+- Viewer-local names and the opt-in Web participant roster remain control-plane-only. The Web Host name change is source-only after its failed activation; names stay socket/localStorage-only, and Native remains outside the capability boundary.
- Do not add scene detection, dynamic-FPS control, or forced AV1 without negotiation, encode, game, CPU/GPU, and sender evidence.
-- ADR-0002 grant/public access is deployed; room-password is source-only. Names/presence remain session-only without account or roster tables.
+- ADR-0002 grant/public access and the v3 room-password migration are deployed; Host display-name remains source-only. Names/presence remain session-only without account or roster tables.
- Deferred architecture audit: `docs/maintenance.md`.
## Current Implementation
- The repository is one npm package using Node.js 24, React, TypeScript, Vite, native WebRTC, `ws`, Zod, Vitest, and separate coturn.
-- Production `31bee238bc1e901e823f34e50737e202dc4b04bf` deployed at 2026-08-20 15:33:21 +08 to `https://share.bonfire.icu`. Room `1` alone enables peer/SFU routing, C+B local reparenting, and admission rescue; unlisted rooms remain ordinary P2P. Immediate rollback is `7fea60ef6f2a` with the current v2 DB/env.
+- Production currently serves `fdd14ba0d9b5ea4c43aa0f6a3a29e0eacf182612` at `https://share.bonfire.icu` after automatic rollback from the attempted `61a87ae47e38abc943cef47b3d7318bb51bf86d6` Host display-name activation. Health is 200; SQLite v3 retains four rooms including room `1`. Room `1` alone enables peer/SFU routing, C+B local reparenting, and admission rescue; unlisted rooms remain ordinary P2P. The preceding `31bee238` release remains historical rollback evidence.
+- The `61a87ae` artifact was prepared but the ephemeral wrapper omitted `mv` from `RELEASE_PREPARED` into `release`, producing systemd `status=200/CHDIR`; this was an activation-wrapper failure, not an application or database failure. Screener `NRestarts=31` reflects the attempt; LiveKit, coturn, and nginx were 0. Selected-edge TURN remains disabled.
- Production ICE is STUN-only; stale `PEER_ICE_TURN_*` keys fail startup even blank. Source has a default-off coturn REST rebuild for the original failed Host/ViewerRelay edge after Viewer-root SFU exhaustion; it is undeployed/unverified and production advertises no TURN credential.
-- Production requires an independent `HOST_ADMISSION_PASSWORD` only for creation/Host role. Default private fragment grants and explicit public-watch authorize Viewers; four anonymous Chrome routes stayed neutral until authorization. There are no accounts/JWT/session rows; SQLite v2 still contains all four rooms, including room `1`.
-- Production uses nginx, Node.js 24.19.0, coturn 4.17.2, and pinned LiveKit 1.13.5 on UDP 7882 with TCP fallback disabled. The application TURN tuple is absent; coturn retains the old authenticated-relay config and TCP/UDP 3478 plus UDP 49152-49251 rules but receives no advertised credential. All services are active with zero automatic restarts; Screener used 38,031,360 bytes with zero cgroup events at 15:39:07.
-- Old all-room application TURN wire/config remains absent. Canary release `a11a73dfa79d-r4` is inactive after rollback to `7fea60e`; final health/config/firewall/SQLite passed with zero allocations.
+- Production requires an independent `HOST_ADMISSION_PASSWORD` only for creation/Host role. Default private fragment grants, room passwords, and explicit public-watch authorize Viewers; four anonymous Chrome routes stayed neutral until authorization. There are no accounts/JWT/session rows; SQLite v3 still contains all four rooms, including room `1`.
+- Production uses nginx, Node.js 24.19.0, coturn 4.17.2, and pinned LiveKit 1.13.5 on UDP 7882 with TCP fallback disabled. The application TURN tuple is absent; coturn retains the old authenticated-relay config and TCP/UDP 3478 plus UDP 49152-49251 rules but receives no advertised credential. Current service state is health 200 with Screener `NRestarts=31` from the failed activation sequence and LiveKit/coturn/nginx at 0.
- ADR-0005 is configured with exact `PEER_ASSISTED_ROOM_IDS=1`; unlisted rooms use ordinary P2P. `screener-v2` is the only deployed signaling literal; there is no v1 parser or translator.
-- Production logs once showed two roots and two short Host participants without a retained track. Timing cannot prove retry/failback. Host exposes only its local current-revision failure stage and uploads no raw error or endpoint data; browser relays still re-encode.
-- The retained v1 backup is the only schema rollback path. Immutable releases share no regular-file inodes with rollback.
- Chrome 151/LiveKit localhost A/B cut failure-to-active/render from 1.481/2.257 seconds to 0.200/0.320; 31 new frames and 25 ms sampling kept host edges at two. It is headless synthetic 720p30 and includes SDK/network prewarm, not public-network evidence.
- Chrome 151 synthetic topology/quality-control runs kept fanout 2/1 and all viewers decoding; one relay close recovered in 5.32 seconds. This is control evidence only.
- Room `1` publishes `HIGH+LOW` with Dynacast off and subscriber `HIGH` ceilings, and now has bounded local quality reparenting. Both remain unverified on real media; test zero-child leaves and calibrated C+B loss before broad rollout.
- C+B uses three hard-bad pairs, one-use samples and guarded intent/cooldown. Deployed admission rescue moves the oldest childless zero-capacity Host leaf below an unassigned one-slot relay in one revision; no score/timer/global rebalance. Deployment passed, but no real room triggered it.
-- Deployed Web name/presence leaves Native wire/media unchanged and separates Viewer roster from Host diagnostics.
+- Source-only Web Host name/presence leaves Native wire/media unchanged and separates Viewer roster from Host diagnostics; the Host-name artifact was not activated.
## Provisional Quality Targets
diff --git a/docs/status.md b/docs/status.md
index 135f5b9c..6934c488 100644
--- a/docs/status.md
+++ b/docs/status.md
@@ -4,40 +4,45 @@ Last updated: 2026-08-20
## Phase
-`https://share.bonfire.icu` runs `31bee238bc1e901e823f34e50737e202dc4b04bf`
-since 2026-08-20 15:33:21 +08 with Viewer presence, initial-connect recovery,
-local quality reparenting, and deterministic relay-admission rescue.
+`https://share.bonfire.icu` currently serves `fdd14ba0d9b5ea4c43aa0f6a3a29e0eacf182612`
+with health 200 after an automatic rollback from the attempted
+`61a87ae47e38abc943cef47b3d7318bb51bf86d6` Host display-name deployment. The
+ephemeral wrapper reached `RELEASE_PREPARED` but omitted the `mv` from its
+prepared stage into `release`; systemd reported `status=200/CHDIR`. The
+application and database were not the failure cause. SQLite v3 still has four
+rooms including room `1`; Screener `NRestarts=31` records the failed activation
+sequence, while LiveKit, coturn, and nginx remained at zero. Host display names
+remain source-only and are not deployed.
Ordinary ICE is STUN-only process-wide; persistent room `1` alone enables the
automatic peer/SFU-UDP controller with at most two SFU roots. The old
-`7fea60ef6f2a` is the immediate rollback with the current v2 DB/env; older
-schema rollback boundaries are in `docs/deployment.md`. Native remains no-go
-and is not part of production.
+`fdd14ba0d9b5` is the current healthy rollback target with the v3 DB/env;
+older schema rollback boundaries are in `docs/deployment.md`. Native remains
+no-go and is not part of production.
## Current Snapshot
- Capture precedes room creation; source/quality changes preserve peers and pause keeps audio/connections. Quality defaults to `maintain-resolution` with balanced/fluid options.
-- Production access remains `screener-v2`: Host secret gates creation/Host; private grants and public codes authorize Viewers. The source-only, undeployed candidate adds private room-code + password entry without changing grant/public entry.
-- Production SQLite v2 retains four rooms and checked grant digests. Candidate v3 atomically adds a nullable checked 48-byte salt+scrypt-verifier BLOB; never plaintext.
+- Production access is `screener-v2`: Host admission, private grants/passwords, and public codes authorize Viewers. SQLite v3 retains four rooms and checked material; raw credentials are never stored.
+- The Host display-name change is source-only after the failed `61a87ae` activation; it did not alter the deployed wire or UI.
- Source-only Native v2 uses memory-only rooms, 300s reclaim and `ROOM_TTL`; production does not run it.
- PR #44's exact-room STUN-only/SFU-UDP router is enabled only for production room `1`: host/SFU roots <=2, browser relay <=1, bounded failure. HTTPS/WSS stays TLS/TCP.
- Fallback prewarm is token-free and limited to room `1`; mobile/iPad viewers are leaves and healthy edges stay sticky.
- 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` can publish exactly `HIGH+LOW` with Dynacast/backup codec off and subscriber `HIGH` ceilings; it has no retained real media frame.
- Room `1` C+B reparenting remains uncalibrated. Deployed admission rescue promotes an unassigned one-slot relay over the oldest childless zero-capacity Host leaf, with no scores or periodic optimization.
-- Web opt-in roster includes Host self-name; Native wire/media remains unchanged.
+- Web opt-in roster code includes Host self-name, but the Host display-name change is source-only/not deployed; Native wire/media remains unchanged.
## Verified Evidence
-- `31bee238` passed 28 files/421 tests and both builds. Health returned in 560.607 ms; observed downtime was 437.137 ms. Health/assets/routes, SQLite v2/four rooms/room `1`, and unchanged config/network gates passed. No real room triggered admission rescue.
-- At 15:39:07 Screener used 38,031,360 bytes with zero cgroup events. All four services were active with zero automatic restarts; only Screener had the planned restart.
+- Historical `31bee238` deployment passed 28 files/421 tests and both builds; no real admission rescue was triggered.
- Chrome 151 synthetic `1/3/5/8` and 720p30 quality-change runs kept 2/1 fanout and decoding; slowest first frame was 1.05 seconds and one relay close recovered in 5.32 seconds. This is control evidence only.
-- A mobile-network room-1 run produced two root participants for about 4.6 seconds and two short Host participants (about 0.46/0.27 seconds), all client-requested leaves, with zero service restarts and no retained track. This is consistent with the code's one fresh-grant retry and Peer failback, but logs cannot prove those transitions. The deployed Host now shows only the local failure stage.
- Host A+B and authenticated P2P Viewer C are sanitized, generation-bound, read-only, and fail closed for stale, ambiguous, or SFU-fed evidence; no raw media metadata is retained.
- SVC is `no-go-web-svc-cross-path-hardware-contract`: no direct/peer selection, cross-PC shared encode, or portable hardware proof; pinned screen share is `L1T3`. No browser run was warranted.
- The `a11a73d` built-in TURN canary is rejected: local allocation passed, but direct Host/Pion Viewer failed before forced relay. Full rollback restored STUN-only client ICE and zero allocations.
- Native VP8 loopback (Chrome 151) reached one Viewer: 30 sender frames, 85 source RTP packets, 877 inbound packets, 299 decoded/rendered at 1280x720, no fatal. Pion outbound delta missed a 2s refresh; hardware/multi-viewer/FIFO/endurance/public/native proof remains open.
- Access protocol/config/HTTP/storage/SQLite/signaling focused tests pass, including commit-first teardown and v1 rollback.
- Selected-edge typecheck and 131 focused control tests pass; no TURN allocation/media evidence exists.
+- Prepared artifact `screener-61a87ae47e38abc943cef47b3d7318bb51bf86d6-20260820T143538Z.tar.gz` (883597 bytes, SHA-256 `d5b4d6cc567ba96ce37f8eb9934dd5822c64dc084796047d5f6d6217e2e74acb`) was never activated; rollback left `fdd14ba` healthy and selected-edge TURN disabled.
## Unverified Boundaries