Files
Piik/docs/standards
AAA ff50e0609e fix(media): preserve playback through native connection recovery
## Problem and outcome / 问题与结果

Compatible Native receiver renegotiation rebuilt the encoded source and its playback/relay consumers. Replacement backends could also lose committed-route recovery ownership, while queued events and unfinished SFU cleanup could reach a replacement with the same logical identity. Retain compatible receivers, keep recovery on the committed route, and validate physical ownership through final control delivery. SFU activation waits for the existing retirement barrier.

This phase also consumes renewed same-page invitations through the existing grant owner and avoids closing uninitialized Windows capture objects after preview failure. Camera, microphone, interaction and control redesign remain outside this patch.

## Release notes

### 中文

这是一次以连接稳定性为重点的小修复更新。

- 修复 App 接收端重新协商时不必要地中断播放和中继的问题,并保留正确的连接恢复行为。
- 修复旧连接的迟到事件及关闭时序干扰替代连接的问题。
- 修复重新打开同页邀请链接后仍沿用旧邀请的问题。
- 修复 Windows 选源预览失败时的一处异常退出。

更新 App 并刷新网页即可使用这些修复,无需修改配置。

### English

This maintenance update focuses on connection stability.

- Preserve App playback, relay connections and recovery behavior during compatible renegotiation.
- Prevent delayed events and cleanup from retired connections from disrupting their replacements.
- Use the new invitation when another invite link opens in the same page.
- Fix a Windows crash during failed source-preview cleanup.

Update Piik App and refresh the page to use these fixes. No configuration changes are required.

## Verification / 验证

- TypeScript type checking, 71 Vitest files / 1,015 tests and Web production build.
- Go core tests, vet and supported cross-target builds; receiver tests exercise H.264/VP8/Opus, ICE restart, fresh gathering and retained downstream media.
- Windows native compile/probe and deterministic capture checks, including failed-preview cleanup.
- Documentation and repository hygiene checks; independent review of the extracted patch and old/new Web/App capability negotiation.
- Local full-suite runs reached the unchanged Git fixture's 5-second timeout; that suite passed alone. The complete suite was rerun with two workers and a 15-second test deadline.

## Impact / 影响

Planned version: v1.5.6. Existing public wire versions and configuration are retained. Receiver reuse is capability-negotiated: old Apps receive no new request field, and old pages receive no new answer field. Room authority, routing policy and retry budgets are unchanged.

The established-viewing interruption report still lacks paired diagnostics; these reproduced defects do not establish that reporter's exact cause. Physical device/network endurance remains outside local deterministic acceptance. Git/PRs retain this repair history; the TODO ledger retains outstanding reports and separate feature candidates.
2026-09-20 09:45:55 +08:00
..

Piik standards

Current product and engineering rules live here. Start with the affected subject; the ownership map explains where each fact belongs. AGENTS.md owns task authority and Contributing owns delivery.

Subject Standard
Module responsibility, resources, interfaces and contextual consistency Engineering
Product names, terminology, Chinese/English voice and content layers Naming and copy
Room authority, invitation/password access and persistence Rooms and access
Automatic routes, capacity, P2P/SFU transitions and route operations Routing and transport
Capture, encoders, media adaptation and audio Media quality
Workflow, playback, presentation and Browser/App lifecycle Presentation and lifecycle
Evidence behind each status, indicator, overlay and notice Media status
Cast, symbols, colour, animation, tooltips and playful copy Visual language
Website, README and introduction-film composition Public introduction
Runtime settings, defaults, bounds and diagnostics Configuration
Compatibility, build identity, publication and release notes Versioning
Documentation responsibilities and updating a rule Documentation ownership

Before another implementation of a familiar concept, identify its fact, owner, scope and lifetime. Apply the existing rule, or explain the contextual difference at that rule's owner. Source schemas and focused tests own exact implementation details; standards need not repeat every field or function.

ADRs preserve decisions and supersession. Research preserves dated observations and limits. TODO owns work that remains, including accepted targets not yet implemented. A recorded target is not a claim of completed verification. User guides remain in the documentation index.