Files
piik/docs/status.md
T
AAA 42588f3a8b fix(media): stabilize reconnects and quality recovery
This maintenance phase corrects connection and media recovery after startup deadlines, congestion and packet loss. Route selection remains a bounded operation; Pion and LiveKit continue to own congestion control, adaptation and retransmission.

Changes stay within existing owners:

- Preserve an untried SFU fallback when a connected P2P candidate produces no first frame before its deadline. Retire expired native preparations using the current edge identity.
- Correct paced output, probe accounting and partial-recovery demand. Negotiate RTX consistently for native forwarding and SFU publication, including repaired stream identifiers for simulcast.
- Return working IPv4 mappings without waiting for optional IPv6 work, and separate NAT observations by the local socket/address that produced them.
- Keep optional App availability separate from basic source selection; stabilize nickname/chat layouts and restore volume from zero correctly.
- Retry complete Gitee reads, including response bodies and hash verification. Ambiguous uploads remain single attempts and are reconciled against the remote inventory before rerunning.

Related: #468, #464, #471. The repairs affect paths discussed in these reports; incomplete field diagnostics do not establish that each report has the same cause, so this PR does not automatically close them.

## Validation

- Web type checks, production build and 1,624 tests passed. Go core, formatting, vet and local target builds passed.
- Delayed RTX recovery reproduced the defect before the fix; the repaired-SSRC mutation also fails the focused regression. Real Windows H.264 and VP8 capture passed the SFU gates, including settings, reload recovery and retirement.
- The media lifecycle gate passed all 14 trials across Browser/App pairings and P2P/SFU handoffs. Native connectivity, paced forwarding and negative-control checks passed.
- Responsive UI and current website architecture links were checked; Gitee's current release was independently downloaded and matched against the GitHub originals.
- [Platform candidate](https://github.com/TNTcraftHIM/Piik/actions/runs/38669095115): all five Apps, both Server architectures and container checks passed at `c534573b`. Subsequent tracked changes only update documentation, the complete-matrix CI budget and race-test coverage.
- [Full network comparison](https://github.com/TNTcraftHIM/Piik/actions/runs/38667624364) completed 70 trials before the batch's 45-minute limit. The [remaining scenario](https://github.com/TNTcraftHIM/Piik/actions/runs/38672805155) passed three paired repetitions; all 71 scenario/setting variants are covered, with 58 media and 13 expected/observed unavailable outcomes. Six negative controls passed, and owned resources were cleaned up. These are controlled observations, not a public success rate.
- The final validation also includes the shared forwarder under the Go race detector. The separate sole-active-output publication experiment still shows inconsistent recovery: two of four current-code repeats did not pass its recovery observation, so the limitation below remains open.

The native SFU allocator still has a measured recovery limitation when only its lowest rate-controlled encoding is active. Fixing that requires a supported upstream demand input; no second controller or allocator fork is introduced. Unmatched capture-failure reports and physical-platform coverage retain their documented evidence limits.

## Release notes

### 中文

这是一次连接与播放稳定性更新,重点改善重连、弱网后的画质恢复和下载镜像可靠性。与 Piik 2.0.0 保持兼容。

- 修复连接等待超时后过早跳过备用线路的问题,保留尚未尝试的媒体服务器兜底机会。
- 改善原生分享在网络拥塞后的画质恢复,并修复转发和媒体服务器发布链路上的视频重传协商遗漏。
- 修复原生观看准备超时后的清理与重试,以及音量从零恢复时的异常。
- 避免可选的 IPv6 端口映射拖慢 IPv4 准备,并修正多网卡环境下的 NAT 预测观测归属。
- 修复昵称编辑、聊天字数变化引起的布局移动;保持 App 提示简洁,并为更新提示补充官网备用下载入口。
- 修复 Gitee 镜像同步在传输中途断开时未重试的问题,校验通过后才完成镜像发布。

仍在跟进:部分原生媒体服务器链路的弱网后恢复仍可能偏慢;尚缺匹配诊断的采集失败反馈不能确认已解决。

### English

This maintenance update improves connection and playback recovery after interruptions and congestion, along with download-mirror reliability. It remains compatible with Piik 2.0.0.

- Preserve untried media-server fallback routes when a connection reaches its waiting deadline.
- Improve native sharing quality recovery after congestion and fix missing video retransmission negotiation in forwarding and media-server publication paths.
- Correct cleanup and retry after native viewing preparation expires, and restore playback volume correctly from zero.
- Prevent optional IPv6 port mapping from delaying IPv4 preparation, and associate NAT-prediction observations with the correct local interface.
- Stabilize nickname editing and chat counters, keep App guidance unobtrusive, and add the website's alternate downloads to update notices.
- Retry interrupted Gitee mirror transfers and complete publication only after verification succeeds.

Still under investigation: recovery after congestion can remain slow on some native media-server paths. Capture-failure reports without matching diagnostics are not claimed as resolved.
2026-10-14 22:57:17 -04:00

163 lines
9.6 KiB
Markdown

# Current Status
Last updated: 2026-10-15
This is the compact execution/deployment index. Product modules own behavior,
[verification status](./verification-status.md) owns unresolved physical limits,
and Git/PRs own completed history.
## Accepted Release Contract
- The 2.0 release boundary uses Browser/server v24, Native control v10 and
capture v7. App and Site must upgrade together; 1.x cannot participate in a
2.0 session. SQLite schema 2 is unchanged.
[Versioning](./standards/versioning.md#public-compatibility-promise) owns
compatibility between published Web/App/Server versions.
- Hosted Server defaults to SQLite schema 2. Room authority has no inactivity
expiry by default; replacement/deletion or grant rotation/revocation ends the
corresponding authority. Explicit memory mode and App Local end rooms at
process exit. Site access retains its separate 24-hour idle lifetime within
one service run; service restart requires site-password entry again.
- Browser/App entry lifecycle and current-edge reconnect ownership repairs
are implemented. Browser node-local pooling and detailed local Debug export
remain part of the accepted media surface. Product modules own their behavior;
[configuration](./standards/configuration.md#diagnostics) owns Debug activation,
report contents and disclosure.
- Shared feedback composition is implemented: generic loading uses the wink
mascot, concrete media waits use their owning comic, and waiting captions are
secondary to literal status. Website reduced-motion preference and player
tooltip placement follow the same presentation owners.
- Camera sharing and Host microphone commentary are accepted product features.
Both Browser and native App audio use the existing media routes; device
selection and sharing settings keep their current resource owners. The
[capture assessment](./research/camera-and-microphone.md) owns platform behavior
and the remaining physical evidence limits.
Website delivery includes a bilingual reader documentation center generated
from the repository's guides alongside the homepage, with search and detailed
troubleshooting separate from the homepage FAQ.
## Accepted Interaction Phase
The accepted [room-interaction design](./research/room-interactions.md) includes
the verified media repairs. It adds authenticated text and reactions
over existing signaling, with optional local chat overlay and a shared floating
panel. Its opted-in room session can outlive a publication; capture, quality and
route owners remain unchanged. Optional Windows screen-audio exclusion uses the
existing source/mixer boundary. Hosted Server
also accepts an optional SFU-only policy through the same route controller.
Windows native capture and thumbnails now share automatic HDR-to-SDR conversion;
synthetic GPU and Browser reception checks pass, with physical HDR display
acceptance still pending in [verification status](./verification-status.md).
Room voice is outside the product plan; Host microphone commentary remains.
These features are published; physical device limits remain open.
Release artifacts and operator deployment records own delivery completion;
[TODO](./todo.md#now) owns remaining work.
## Current Work
Post-release maintenance retains the existing protocol and route owners.
[TODO](./todo.md#now) owns the remaining quality-recovery boundary; release
artifacts and operator records own delivery and acceptance results.
2.0 separates numeric media requests from presets and bounded runtime admission,
retains successfully applied quality settings, and lets App serve an approved
Site independently of Local/public room startup. It also adds detached chat on
supporting desktop Browsers. Media, room authority and P2P-first routing keep
their existing owners; [product standards](./standards/README.md) define the
accepted behavior.
Optional coordinated Native UDP preparation augments the existing retry owner.
The [network laboratory](./research/network-lab.md) covers all Browser/App
pairings, recovery, SFU policies and successful two-App preparation through
sequential kernel NAT. These results do not establish a public success rate.
Magicsock remains excluded: its [controlled comparison](./research/nat-traversal.md#integration-cost-and-recovery-controls)
established no additional reachability worth its integration costs.
The [media assessment](./research/native-client-media.md#media-capability-extension-assessment)
owns bounded output and live-control evidence. Physical macOS/Linux capture,
limited decoders and sustained game/4K use retain the limits in
[verification status](./verification-status.md). Additional codecs, room voice,
surround delivery and end-to-end HDR remain outside this phase.
2.0 was published after final acceptance without a separate field beta.
Immutable release artifacts and operator records own exact delivery
and postflight; [TODO](./todo.md#now) owns remaining product work. Hosted room
retention stays indefinite by default. Demo uses one hour without authenticated
participants; the private deployment keeps the default.
## Deployment
Source, package identity, GitHub repository and local worktree paths use Piik.
Runtime code keeps only the Piik wire labels and stored keys.
The immutable release descriptor, runtime `REVISION` and operator deployment
record own exact identity and postflight results.
The existing deployment uses one Go process for Web, room authority/signaling,
Binding-only STUN on UDP 3478/3479/3480 and optional SFU on UDP 7882. nginx owns
HTTPS. Participants, routes and media remain process-only. This private service
is not a public demonstration.
The separate US [public demo](https://demo.piik.tv) is deployed with open site
entry, persistent room authority and P2P-only media. Cloudflare fronts HTTP/WSS
and caches static bundles; STUN uses a separate DNS-only hostname. Caddy owns
origin HTTPS, and the standard systemd service runs the published Server package.
Public DNS,
HTTPS, runtime assets, all three STUN listeners and a bounded browser P2P
sharing/stop check passed; the browser check used synthetic video on one network.
The operator record owns exact identity and postflight evidence.
[TODO](./todo.md) owns remaining verification and follow-up work. The owner declared the first
public release on 2026-09-12. Source is public, main protection is active, and
`piik.tv` runs on GitHub Pages behind Cloudflare with HTTPS. The private service
remains a separate deployment. Release descriptors and GitHub deployment records
identify published artifacts and website revisions.
GitHub owns the original Server and registered App packages. Gitee copies them
without rebuilding; mirror completion requires anonymous checksum verification.
Mirror reads retry complete transfers; ambiguous uploads are reconciled by
inventory before another attempt. Public-repository CI
and native packaging passed. App entry, update links
and bounded two-build interoperability have acceptance evidence. Accepted
product changes publish automatically; standalone website and documentation
changes validate and deploy the website without creating App/Server versions.
GitHub/Gitee release comparison, mirror publishing and PR-sourced notes follow
[versioning](./standards/versioning.md). [Verification status](./verification-status.md#device-evidence-boundary)
owns the remaining physical limits; shared lessons live in
[engineering](./standards/engineering.md).
## Media Evidence And Limits
- Compatible Native consumers share one complete stock WebRTC encoding and
adaptation pipeline per local output. Different weak demands stay independent;
suitable received media can be forwarded without decoding/re-encoding.
Pion/LiveKit retain transport, estimation, pacing and forwarding ownership.
- Windows H264/VP8 have bounded encoding/adaptation evidence. Actual Native
relay checks cover compatible sharing, weak-budget separation and rejoining,
source retirement and large encoded-frame delivery. These results do not
establish a universal encoder count, CPU saving or Browser-equivalent quality.
- Windows Host acceptance covers live and paused settings, quiet-source
preparation/restore, source changes and subsequent sharing. The owner
confirmed Windows 10 whole-display capture resolved. Specific new game/device
failures should be reopened from new evidence.
- Native Host publication through embedded SFU retains video/audio; Browser to
App fanout and App-exit fallback have bounded physical checks. Two
independent Native sessions have simultaneous media/retirement evidence.
- The Linux runtime container has non-root/read-only, memory/SQLite, diagnostic
export, STUN and listener-lifecycle evidence. This does not establish every
operator's proxy/firewall or public-media configuration.
- The independent Browser producer in ADR-0014 is integrated.
Bounded H264/VP8 checks cover direct and received-track sharing, weak-child
isolation/recovery, live/quiet settings, pause, source change and ordinary
fallback. Its native allocation and complete-frame output replace the earlier
payload-only Worker path. Fewer full encodes are established; total CPU gains
depend on codec/hardware. [Browser research](./research/browser-local-encoding-pool.md)
owns these measurements and failed controls. The owner accepted this scoped
Browser composition for release; actual deployment identity stays in the
runtime descriptor.
- Slow adaptation recovery, the extreme CPU-overload sampling limit and missing
broad device/network/endurance results remain explicit in
[encoder research](./research/webrtc-encoder-pool.md) and verification status.
macOS/Linux physical capture is deferred by the owner; Windows App and
Browser are this phase's primary targets.