Files
piik/docs/standards/versioning.md
T
AAAandAkazaAkalin 3707e48225 feat!: expand media controls and simplify App connections
## Problem and outcome / 问题与结果

Piik's media settings were coupled to a small preset list, and using native App capture on a Site required a separate launcher mode. This release separates numeric media requests from presets and bounded runtime admission, remembers successfully applied settings, and lets a running App serve an explicitly approved Site independently of Local/public room startup.

The same phase repairs confirmed capture-retirement, ICE discovery, media-recovery and storage failures. P2P-first routing, one room authority and the existing Browser/Native media owners remain. This phase targets **v2.0.0** with incompatible Web/App contracts. The owner authorized publication after final acceptance; the verified package and deployment records own delivery completion.

## Release notes

### 中文

Piik 2.0 扩展了画质设置,简化了 App 与站点的连接,并集中修复采集和断线恢复问题。**本次升级调整了通信协议,App 与所用站点需要一起升级。**

#### 新功能与改进

- **自定义画面设置:** 保留三档推荐预设,支持填写分辨率上限、1–240 帧的帧率上限和 0.1–240 Mbps 的视频码率上限。滑动条沿用常用范围,更高数值可直接填写并显示为“自定义”。帧率范围随画幅变化,可请求 1080p240、1440p144、4K60 和超宽画面;输出保留来源比例。
- **自定义音频质量:** 在原有三档音频预设之外,可填写 6–320 kbps 的来源音频码率上限。
- **双端 App 协同连接:** 启用增强 NAT 穿透后,适用的重试可协调双方 App 准备 UDP 连接;首次连接仍走普通 ICE,不适用时继续现有流程。已通过受控网络验证,实际连通性仍取决于双方网络。
- **记住分享设置:** 下次打开时恢复已应用的画面与音频质量。仅用浏览器时按站点保存;通过新版 App 使用时,更换临时公网邀请网址也能保留设置。
- **更直接地连接 App:** 启动页提供本地房间和公网邀请,首次默认选择公网邀请。使用已有站点时,保持 App 运行,在站点点击 **App** 并确认授权即可。App 打开的本地房主页自动获得授权,站点按钮会显示 App 就绪状态。启动页可查看或取消授权;从另一个站点连接并批准,会替换原授权。
- **置顶聊天窗口:** 支持的桌面浏览器可将聊天移入独立置顶窗口,保留当前消息、草稿和阅读位置;关闭窗口后回到原页面。

#### 修复

- **连接与恢复:** 完善备用 STUN 与 NAT 采样信息的处理;重新收集 ICE 候选时刷新网卡地址。修正观众重连的机会计数、本机媒体连接恢复,以及恢复后遗留的发送队列和带宽统计问题。保留视频编码对应的标准重传能力,改善网络地址变化后的画面恢复。
- **采集稳定性:** 修正 Windows 停止采集或预览时的异步资源释放问题,保留采集边框偏好,更快跳过无法正常输出的编码器。采集与应用音频能力按实际接口探测,不再按 Windows 版本号排除;修正 Linux Portal 来源识别和早期采集失败通知,改善摄像头与原生采集的画面比例处理。
- **状态与清理:** 房间失效时及时释放 App 连接和待完成的选源请求;本地或公网房间启动失败时,App 保持待机并保留其他已授权站点的连接;公网邀请启动失败保留底层错误。修正启动页旧查询覆盖新设置的问题,并限制原生连接准备的待完成任务。SFU 诊断区分房主发布和观众接收状态。
- **其他维护:** 收到尚不支持的表情时跳过该效果;修正 SQLite 写入失败后的事务恢复。Gitee 镜像可独立重试,官网交互、指南和依赖同步更新。App 连接失败时提供重试与下载入口;统一选源设置与自定义数值的反馈。减少重复的随机短语,仅在持续等待时定时轮换。

#### 升级须知

**2.0 与 1.x 不能混用。** 自建站点请更新 Server 和连接该站点的 App,并刷新所有分享与观看页面。本地房间或公网邀请用户请停止分享、关闭旧 App,完整解压新版程序包后重新发送邀请链接。

本次不变更房间数据库结构。重启会中断正在进行的分享;麦克风、采集权限和设备选择不会自动恢复。4K60 等设置是输出上限,实际清晰度与帧率取决于来源、设备和网络。macOS/Linux 采集及部分移动设备仍需更多实机反馈。

### English

Piik 2.0 adds more control over sharing quality, simplifies connecting the App to a Site, and fixes capture and connection-recovery failures. **The communication contracts change in this release: update the App and its Site together.**

#### Highlights

- **Custom picture settings:** Keep the three recommended presets or enter a resolution ceiling, a 1–240 fps limit and a 0.1–240 Mbps video bitrate limit. Sliders retain their familiar ranges; higher entered values are clearly marked as custom. Frame-rate limits depend on picture size, admitting requests such as 1080p240, 1440p144, 4K60 and ultrawide pictures while preserving source proportions.
- **Custom audio quality:** Enter a 6–320 kbps source-audio bitrate limit alongside the three existing audio presets.
- **Coordinated App connections:** With enhanced NAT traversal enabled, eligible retries can coordinate UDP preparation between two Apps. The first attempt remains ordinary ICE, and ineligible preparation continues through the existing path. Controlled network checks pass; real-world connectivity still depends on both networks.
- **Remember sharing settings:** Restore successfully applied picture and audio quality next time. Browser-only use saves settings per site; an updated App can retain them across changing temporary public-invitation addresses.
- **Connect the App from a Site:** The launcher offers Local room and Public invite, with Public invite selected on first use. For an existing Site, keep the App running, click **App** on the Site and confirm its authorization. Host pages opened locally by App are authorized automatically, and the Site button reflects verified App readiness. View or revoke approval in the launcher. Connecting and approving another Site replaces the previous approval.
- **Always-on-top chat:** Supported desktop browsers can move chat into a separate always-on-top window while retaining messages, drafts and reading position. Closing the window returns chat to the page.

#### Fixes

- **Connections and recovery:** Improve fallback STUN discovery and NAT survey handling, and refresh interface addresses during ICE gathering. Fix Viewer recovery-opportunity accounting, local media-connection recovery, stale send queues and bandwidth accounting after recovery. Preserve standard video retransmission when selecting a codec to improve picture recovery after network-address changes.
- **Capture stability:** Fix asynchronous Windows resource retirement after capture or preview ends, retain the capture-border preference, and reject non-performing encoder candidates earlier. Detect capture and process-audio support through actual APIs rather than Windows-version gates. Correct Linux Portal target identification and early capture-failure delivery; improve source-aspect handling for camera and native capture.
- **State and cleanup:** Release App connections and pending source selection when room authority ends. Keep the App on standby and preserve other authorized Site connections when interactive Local/public room startup fails. Retain underlying public-invitation startup errors. Prevent stale launcher reads from replacing newer settings, bound pending native connection-preparation work, and distinguish Host publication from Viewer reception in SFU diagnostics.
- **Maintenance:** Skip unsupported incoming reaction effects, recover SQLite transactions after write failures, and retry Gitee mirroring independently. Update website interactions, guides and dependencies; clarify App connection recovery, source-selection settings and custom-value feedback. Reduce repeated playful captions, with timed rotation reserved for ongoing waits.

#### Upgrading

**2.0 and 1.x cannot be mixed.** For a hosted Site, update its Server and connected Apps, then refresh every Host and Viewer page. For Local rooms or Public invites, stop sharing, close the old App, extract the complete new package and send a fresh invitation.

The room database schema is unchanged. Restarting interrupts active shares; microphone activation, capture permission and device selection are not restored automatically. Settings such as 4K60 are output ceilings: actual resolution and frame rate depend on the source, device and network. macOS/Linux capture and some mobile devices still need more physical-device feedback.

## Verification / 验证

- Product candidate: `24a28738241b9012c0476386356a515aab21f1a5`, built as `v2.0.0`. [Final full candidate CI](https://github.com/TNTcraftHIM/Piik/actions/runs/38555494851) covers core validation, vulnerabilities, races, five App packages and both Server/container targets without publishing. Later commits extend race coverage, correct the capture test fixture's inherited Go race-exit delay, and update documentation/staged website screenshots; shipped product code is unchanged. [Additional control/loopback race checks](https://github.com/TNTcraftHIM/Piik/actions/runs/38561191343) use that updated collector. Product shutdown deadlines and test assertions are unchanged.
- Local Web acceptance passes **91 files / 1,612 tests**, type checking and production build. Full Go/native checks, Windows capture compilation, five-repeat control regressions, website/documentation build and repository checks pass. Existing documentation-size and bundle-size warnings remain visible.
- The Windows candidate's original descriptor, revision and SHA-256 are checked before extraction and packaged Local/control acceptance. All candidate packages pass the release publisher's read-only identity/checksum verification.
- Serial Windows native H.264 Host acceptance passes live/paused/custom/4K settings, background/source recovery and stop/re-share. VP8 two-room SFU and H.264 SFU-only checks pass live quality/audio changes, subscription/page-reload recovery and retirement; stopping one room preserves the other room's media. Browser-to-App fanout and App-exit fallback also pass. Gates clean their processes, profiles and listeners. These checks do not establish sustained game/4K performance.
- The final network run passes **37 cases and six negative controls**, with **32 actual media outcomes and five unavailable observations**. It covers all Browser/App pairings, IPv6, remapping, STUN backup, outages, quality recovery, healthy siblings and SFU policies. Sequential-NAT App/App preparation delivers media; a mixed sequential case also connects in this run, without a claim of deterministic benefit. Fault controls reject absent faults/frozen video and verify cancellation/cleanup. No public success percentage is inferred.
- Twenty Viewer topology acceptance delivers increasing decoded frames to all Viewers, preserves the two-copy bound and recovers from relay loss. Invitation privacy checks find no grant leakage in requests, cookies, persistent storage or logs. Both are bounded synthetic-source checks, not public-network endurance.
- Current UI checks cover Chinese/English/visual, both themes and 320/360/768/1366-pixel layouts, numeric limits, source selection, App approval/revocation, architecture downloads and reader navigation. Chat/PiP retains draft/history/scroll and returns to the page on close; retirement and refused opening clean up. Real Host/Viewer UI chat continues after capture stops and while the Host is absent. Film controls, mute/seek/end/replay, mobile containment and pointer-close unloading pass. README stills and the staged launcher now use current navigation. Scoped axe checks report no violations; contrast and physical assistive-technology coverage are not certified.
- Physical macOS/Linux capture, limited decoders, mixed HDR displays, mobile permissions and sustained game/4K use retain their [evidence limits](https://github.com/TNTcraftHIM/Piik/blob/ci/gitee-mirror/docs/verification-status.md). Unmatched field reports remain open. Gitee activation and public-domain checks are publication postflight; original v1.9.2 artifact/mirror recovery already passed without remote writes.

## Boundaries and contributor credit / 边界与贡献

The candidate uses Browser/server v24 and Native control v10; capture v7 and SQLite schema 2 are unchanged. Numeric wire values remain separate from codec/allocation admission. H.264/VP8, framework-owned adaptation and automatic P2P-first routing remain; this candidate adds neither codecs, room voice, end-to-end HDR, surround audio nor Magicsock.

Local controls confirm specific repairs, not the causes of unmatched user reports or a measured increase in NAT success rate. The STUN report in #471 remains subject to paired endpoint/network evidence. Gitee's separate workflow activation still needs post-merge verification; its original-artifact and anonymous-download path has passed against v1.9.2.

The Linux Portal fix from @AkazaAkali in #470 is incorporated with original commit authorship and the co-author trailer below. #462 and #469 propose higher audio rates and 4K; neither patch is merged. Their preset-expansion implementation is superseded by the independently established numeric-media contract, so overlapping functionality alone does not warrant merging or co-authorship. #475 identifies the Linux desktop entry’s missing terminal controls; that defect is independently corrected without accepting tray or Browser-owned process-exit additions. The settings request in #460 is implemented; issue/PR closure remains part of release follow-up.

Co-authored-by: AkazaAkalin <478080766@qq.com>
2026-10-14 08:09:45 -04:00

25 KiB

Versions And Compatibility

Reviewed 2026-09-13. v1.0.0 is the declared public compatibility baseline. App, Server and the embedded Web build share one product version, plus the full Git SHA for source provenance. Status owns the current publication state; automatic publication follows the product-change boundary below.

Give Each Identifier One Job

Identifier Meaning and owner Change rule
vMAJOR.MINOR.PATCH Public Git tag/product release Patch: compatible fixes; minor: compatible features; major: incompatible public contract
Full Git SHA / REVISION Exact source revision Changes with the source commit; never use SHA inequality as release ordering or compatibility proof
Artifact SHA-256 Exact packaged bytes in the release descriptor Each artifact; one source SHA can produce different platform/toolchain binaries
Platform application version fields Generated package metadata Product version in the platform's numeric format; source SHA stays separate. XML/desktop-format versions remain specification values
Browser/Server signaling identifier WS contract in src/shared/protocol.ts and Go protocol constants Change for an incompatible wire contract, not UI edits or every release
Browser/App control identifier src/client/native/wire.ts and App loopback/control Independent compatibility boundary; installed App and Site can update separately
Capture probe and encoded-frame envelope internal/app/nativecapture and platform adapters Internal matched bundle; change only the affected format
SQLite schema, App config format, Browser storage-key format Their storage/parser owners Change with the actual stored representation; preserve accepted authority across a compatible upgrade
Release descriptor schema Packager and descriptor readers Describes metadata format, not the product release
Room authorization generation, share/route/publication/media generations, connection IDs Current authority and resource owners Runtime identity/freshness only; never reset or align them with release numbers

Current numeric values are in source and status. Keep those internal values at the first public release: resetting schema or authorization counters for visual consistency can invalidate data or stale-work fences. A room number is a user-facing address, not a software version. The private tooling-only npm package carries no independent product version. The App launcher displays its installed version from the existing launcher state; Server startup logs retain the running version and revision. The website may display GitHub's latest stable tag and published_at as optional metadata, never a manually maintained version or the installed App's identity. Publication time is distinct from build time; an unavailable check must not block downloads.

Public Compatibility Promise

The protected surface is documented App/Server startup and configuration, room and invitation behavior, persisted authority, and the Browser/Server/App interfaces needed for established sharing and viewing. Internal Go/TypeScript symbols, capture sidecar details within a matched bundle, and undocumented diagnostic fields are not separately supported public APIs.

  • Within a public major, newer releases preserve established workflows and accepted configuration/data for older public releases in that major. New features require support at the receiving end; they are not sent speculatively.
  • A Site serves its own Web build, but an already-open page or installed App can be older. Compatibility is checked at their actual contracts, not by requiring identical product versions or SHAs. New App with older Site keeps established compatible functionality; newly added features may be unavailable.
  • A patch/minor cannot remove a documented command, require a new field from an old peer, change an existing field's meaning, revoke valid room authority, or turn an incompatible HTTP response into a supposedly compatible WS release. Deliberate public breakage needs a major and clear upgrade instructions.
  • Same-major forward upgrades preserve existing durable authority. Arbitrary binary/database downgrades, cross-major interoperability, process restart without media interruption, and identical performance on every OS/browser are not promised. A security repair may restrict previously unsafe behavior; explain the impact rather than silently redefining compatibility.

This does not require retaining every historical implementation. Keep one stable baseline contract; introduce a small optional capability only for a concrete new feature. Do not add a version-range solver, general adapter framework, parallel authority writers or blanket old-client fallback paths.

Keep the 2.x baseline long-lived. Substantial new functionality can remain a minor release when older peers retain established behavior and new behavior is explicitly opted into. A small feature can still be breaking if it unconditionally changes a strict message, existing semantics or durable authority. Review those boundaries before choosing the version; neither feature count nor a desire to avoid a major justifies mislabeling an incompatible release.

Extending Interfaces

Command/event JSON objects still reject unknown keys, and required fields reject omissions. Most enums remain closed; the bounded display-only reaction identifier has an explicit receive-side exception. Therefore even adding a field can break the other side. The former required sfu addition to strict /api/capabilities demonstrated both directions of this problem; an unchanged signaling identifier does not cover HTTP compatibility.

Runtime capabilities and App discovery now ignore unknown descriptive fields while validating known types, bounds and required identity. An absent optional capability means unavailable. Commands, credentials and authority checks remain strict. A new message type, enum value or behavior-changing field is emitted only after the other side advertises support; accepting unknown metadata is not permission to execute unknown commands. A more tolerant reader does not update already-released readers: do not emit a new reaction to legacy pages merely because current pages can skip it. Verify both readers before calling a change additive.

In the 2.0 contract, numeric media descriptions and retry progress are independent of current implementation limits and retry policy. Extending those policies does not require another count-specific capability flag. Representation acceptance still requires local operation/resource admission; it is not a promise that every same-major peer can produce a new media format.

Native discovery distinguishes an incompatible Piik App from an absent App and reports protocol numbers to local diagnostics; the source picker offers update/ refresh guidance and Browser operation. Do not reload, reinstall or interrupt an active share just because an unrelated product/build label changed.

Release And Recovery

A single release plan computes the next tag and full source SHA. Packagers inject both into binaries, embedded Web/debug metadata and the schema-2 release descriptors. Local candidates use an exact release tag, development or an explicit candidate version. An explicit version labels an unpublished test artifact; it does not declare or freeze a public release. It cannot reuse a tag owned by another source revision. Do not maintain independent hand-edited App/Server/Web version files. Archive layout and checks stay in the existing packagers; a new build never replaces an already-published package.

App archive names are fixed per target: piik-app-{target}.zip. Each published tag owns its archive bytes; the full source SHA remains in REVISION and the release descriptor. Fixed names allow GitHub's native latest-asset links; website operations owns download presentation and verification of the matching Gitee mirror.

Public Release attachments contain the App ZIPs and Server runtime archives for the registered package targets. Package descriptors (.release.json), file manifests (.manifest.tsv) and standalone .sha256 files remain build/deployment inputs in the local output and CI artifacts; publishers validate them but do not upload them to GitHub or Gitee Releases. The release body includes a collapsed full source SHA and SHA-256 listing generated from the verified packages. GitHub's automatic source archives are separate from Piik's uploaded packages. Retain original build metadata with operator deployment records as described in deployment.

Update checks compare actual release precedence. The App reports its compiled OS/architecture and links to that platform's ZIP in the selected release metadata; the release page remains the fallback when no matching attachment is available. Fixed archive names and published names with that release's SHA suffix are accepted only with the provider's exact release download URL. Downloads start on click; checking for an update does not fetch the archive. Newer version wins even when the source SHA is unchanged. Same version with a different known SHA reports a different official build, not a newer one. A development build with a known differing SHA offers the official release as a manual choice; it makes no ordering claim. Older releases never cause an update notice. Unknown SHA is not inferred from a branch name in GitHub metadata. The publisher records a full SHA in target_commitish and verifies actual tag identity separately. Stable update notices ignore prereleases.

Major-Upgrade Guidance

The App update notice keeps a separate link to the selected provider's exact release page. A newer major adds a short, visible breaking-change notice; the Server logs the same distinction while preserving its checker JSON and exit codes. This is release guidance, not a replacement for actual wire checks. Updates remain a manual action. Release prose stays on GitHub/Gitee; the App does not fetch or render remote Markdown or add a second changelog store. Direct download remains the primary action; reading notes is optional. Keep the major warning inline, without a confirmation dialog or mandatory website detour.

Older installed Apps cannot acquire new warning UI from release metadata. Their historical download behavior is accepted; do not split release feeds or force a stepping-stone release solely to make advisory presentation identical. Before a major release, put bilingual upgrade guidance near the top of its release notes and on the website download entry. Name the actual incompatible App/Site combinations, required upgrade order, interruptions and any persistent data implications. Do not assume everyone installed the preceding minor/patch. Verify the oldest relevant public App/page and the last preceding-major release against the candidate: actual mismatches must fail clearly at their owning contract. Keep historical packages available through GitHub releases. A major preparation change does not itself authorize a wire bump, migration or release.

Automatic Publication

Before a product-changing merge or manual run that can publish, present the planned version and complete Chinese/English release notes to the owner and obtain explicit authorization for that release. Implementation or UI acceptance does not authorize publication. Each later release needs fresh confirmation; previous release/deployment permission is not standing authority. Once a release is authorized, its packaging, mirror retries and matching deployments may proceed within that scope without asking again. Automation executes the approved release.

After one-time activation, a complete squash PR merged to main runs the existing CI pipeline. scripts/release-version.mjs filters unreleased first-parent commits by actual changed paths. Website/film, documentation, research, agent instructions and standalone maintenance tools do not create product versions. Shared product UI, runtime code, public assets, licenses, dependencies and packaging inputs remain eligible; unknown paths are treated as product inputs. The script owns the exclusion list, shared with release-note generation.

Only eligible commit messages select the increment: feat selects minor, ! or BREAKING CHANGE selects major, and other accepted product changes select patch. A website-only feat cannot increase the next product version. Earlier unpublished product changes remain eligible when a later website commit reaches main. PR/commit naming is owned by CONTRIBUTING. Code size or an internal refactor does not itself imply a breaking release.

No version/changelog commit is written back to main. The workflow queues main runs, uses the same source SHA for Server and all App targets, and publishes only after all required artifacts and checks pass. The publisher verifies matching version, source SHA and checksums, then creates/uploads/publishes one GitHub draft. When there are no unpublished product changes, CI validates a development build and skips packaging and publication; it never assigns an old release version to a new source SHA. The separate Website and Gitee mirror workflows follow successful main CI independently. Mirror failure must remain visible without blocking GitHub publication or Website deployment; retries use the original publishing artifacts. Failed draft uploads can resume; published artifacts are never overwritten. An older draft retried after a newer release cannot take over latest.

PIIK_RELEASES_ENABLED is a GitHub repository activation variable, not a product setting. Until the first release is explicitly enabled, main runs validation and manual app_checks dispatches create candidates only. Ordinary branches do not run cloud CI. PRs run only a read-only release-note check, including after edits to their body; product scope uses the same path owner as publication and the PR's net diff. Packaging and publication remain post-merge. GitHub operations owns activation and main protection; no workflow changes repository visibility.

Updates remain explicit, outside an active share, using complete matching packages. Deployment owns artifact verification, cutover and recovery. A changed storage format needs its own upgrade and rollback treatment; restoring an old authority database after newer grants/revocations is not a safe routine downgrade. No automatic updater or generic migration framework is introduced by this policy.

Container Distribution

ghcr.io/tntcrafthim/piik wraps the same verified linux/amd64 and linux/arm64 Server archives as the GitHub release. The packager's optional --container-image <tag> builds from that architecture's extraction; CI checks its Compose recipe on the matching native runner and transfers the verified image between jobs as a CI artifact, outside public Release attachments. publish-container.mjs requires matching published GitHub source, version and Server digest in each image's labels. A standard multi-platform image index selects the matching architecture; platform tags are immutable inputs to that index. Existing version tags are retained; latest moves only when that version is GitHub's latest. Manual candidates never publish. The release approval boundary and first-publication visibility check apply. Preserve the original image and packages for retries.

Release Notes

GitHub Releases owns the published changelog. Each product-changing PR supplies reviewed Chinese and English user-facing copy under the exact ## Release notes heading in its squash commit; ### headings structure that copy. Explain benefits, fixes and required upgrade actions, including breaking changes. Keep internal work logs, audit handoffs and unverified claims outside this public section.

scripts/release-notes.mjs collects these sections from the same eligible first-parent commits since the previous stable tag. Standalone website and documentation phases need no product release notes. The first release uses only its launch commit's product introduction; private development history is not a launch changelog. Missing, empty, duplicate or visibly encoding-damaged sections fail PR and publishing validation. GitHub Actions shows the generated release text in its publishing run summary. Manual candidates validate and build the requested revision without requiring release copy in branch checkpoints; their version labels artifacts and never enables publication. The PR body remains the review surface until integration preserves it in the squash commit.

Supply multiline PR/release copy through a UTF-8 file and read back the stored body before integration. A terminal preview alone does not prove that Chinese text survived the shell/API boundary. Do not repair published history by rewriting main.

The publisher appends generated build identity and package checksums to the reviewed text, passes it through a temporary notes file to GitHub, then removes that file. Gitee copies the GitHub description. Retrying the same release preserves its reviewed prose; draft retries refresh only the marked generated build/checksum section to match the uploaded bytes. Published releases remain unchanged. An exact tag does not move the changelog's starting point. Keep no CHANGELOG.md, versioned note directory or generated history commits. PRs and Git retain editorial provenance.

Release notes introduce the release before listing changes. In each language, open with one or two sentences explaining its actual emphasis and who benefits: a maintenance update, a feature addition, or a compatibility-changing release. Match that description to the user-visible impact; an internal refactor alone does not justify calling a release breaking or major.

Then group concrete changes under useful headings such as highlights, fixes, upgrade instructions or known limitations. Omit empty categories and routine implementation/test inventories. A small fix may need only its introduction and a few bullets. Required upgrade steps or interruptions must be easy to find. Chinese and English cover the same release facts with natural phrasing. Use ### for language sections and #### for categories when both are needed.

The approved final description must read as one release when several unpublished commits are included. Preview the rendered aggregate; do not let repeated introductions or raw commit titles become its narrative. The existing pipeline preserves authored Markdown and appends identity/checksums; it does not infer an editorial summary from a version number. Keep provenance and the full changelog link after the user-facing explanation.

Editorial references: CC Switch releases and OBS Studio releases show release introductions and grouped changes; Piik's exact scope and upgrade instructions must come from its own accepted changes.

Release Sources

GitHub Releases is the primary publication; Gitee is an optional official mirror for domestic access, with a minimal README pointing development and documentation back to GitHub. The Gitee repository need not copy the source tree. Its README/tag commit is not the Piik source revision; release metadata retains the original GitHub SHA. Build each target once and copy the same archives, notices, version, full source SHA and artifact hashes to both. A Git repository mirror alone does not synchronize Release attachments. Keep one release description. Update detection reads each provider's API metadata; it does not parse the public changelog or download build descriptors. The existing pipeline owns local machine-readable build metadata.

The two providers only adapt API fields and download locations into the same release model. Share version comparison, channel filtering and package validation. The normal background check tries GitHub, then Gitee if the primary is unavailable; download links may expose both verified locations. A lagging mirror must not cause a downgrade or a version/hash disagreement to be silently accepted. Gitee's documented latest endpoint means last updated, so provider normalization must select stable release precedence explicitly, not equate provider ordering.

Synchronize only an explicitly published release; branch pushes stay quiet. Retrying a failed mirror upload reuses the original package. Advertise a mirrored package as available only after its required attachments and matching metadata are present. Tokens belong only to publishing, never the distributed Browser/App. The public mirror is TNTcraftHIM/Piik. The publisher reuses the shared artifact validator, checks every public package against GitHub's published asset digest, then uploads and verifies anonymous Gitee downloads. Gitee has no draft API: an incomplete mirror remains a preview release, and becomes stable only after every file passes. A source marker in the release body (<!-- piik-source: <full-SHA> -->) preserves the GitHub revision; the mirror's target_commitish identifies only its own README commit. App notices and the operator check share their existing version comparison across providers. Each provider has its own deadline; the mirror checks at most ten pages of 100 releases and rejects an incomplete listing. An explicit operator --api-url override checks that endpoint alone. A valid primary result, including an up-to-date result, does not consult the mirror.

Gitee currently documents 100 MB per attachment and 1 GB total repository attachments for ordinary projects. The mirror rejects files above 100,000,000 bytes before writing. GitHub retains published history; Gitee retains package attachments for the latest stable version and one preceding verified stable version. Order by semantic version, not update time; a preview cannot displace the fallback. Verify the new mirror completely before retiring older attachments, and verify that the fallback's packages remain downloadable and match GitHub. Delete only older mirror attachments with verified GitHub originals; retain release descriptions and tags. Unknown files or provenance require review. Check capacity before upload. Cleanup may reclaim versions outside the two retained stable versions; never delete either retained version to make an unverified replacement fit. Exhausted storage leaves a pending preview. Target authentication, uploads, anonymous metadata/CORS and the complete matching Server/three-platform App downloads and SHA-256 checks passed for the public release. Use API metadata in the Browser; ordinary asset-link redirects are not guaranteed to permit cross-origin fetch, even when a normal download works.

Public Release Baseline

The declared v1.0.0 release starts the compatibility promise above. Its packages, reviewed notes and descriptors are immutable. Subsequent releases preserve this baseline through compatible upgrades; the remaining physical device/network limits stay in verification status.

References

  • SemVer 2.0.0: release meaning follows a declared public API; build metadata does not determine precedence.
  • Syncthing releases and BEP: product versions, peer protocol and storage/upgrade behavior are distinct. Piik does not adopt its minor-release REST-breaking exception for the protected interfaces above.
  • Go compatibility: name the protected contract and its limits instead of promising universal binary/runtime compatibility.
  • Debug Adapter Protocol evolution: stable baseline messages and explicit optional capabilities allow independent endpoints to evolve. Piik uses that principle within its existing WebSocket/JSON contracts; it does not replace them with DAP or a generic negotiation framework.
  • Conventional Commits provides the small release-intent vocabulary; standard SemVer libraries perform ordering.
  • Apple's bundle build version and release version are numeric; package generation derives both from the release and keeps SHA separately.
  • GitHub Releases API and Gitee's official API SDK reference: provider endpoints and metadata. Gitee Release documentation owns its current attachment limits. Provider checks were made on 2026-09-12.