Files
piik/docs/standards/versioning.md
T
AAA 499789671c feat(app): bring Android sharing and touch control into the shared runtime (#504)
## Problem and outcome / 问题与结果

Bring Android into Piik's shared App workflow and make phone control usable without a separate Web UI. One signed APK covers ARM64 and x64; screen capture, room authority, routing, voice and site approval reuse the existing Go and Browser owners. Android opens the user's system browser rather than shipping an embedded browser.

This phase also fixes capture replacement and encoding-clock failures, improves source-audio startup, contains recoverable input and transport failures, adds a bounded relay-volunteer setting and supports hostnames in `SFU_PUBLIC_IP`. The website separates desktop and mobile downloads, gives iOS users an online entry and aligns the bilingual installation guides.

Related reports: #495, #499, #500, #501, #502 and #503. For #502, input execution failures now preserve authorization, and temporary target observations suspend rather than revoke it; the original Windows report remains open for candidate feedback.

## Release notes

**Piik, now in your pocket.**

Piik App now supports Android screen sharing, with touch controls for a friend's computer.

**手机,也能开播。**

Piik App 现已支持 Android 屏幕分享,也能用手机控制朋友的电脑。

### English

Piik v2.5.0 brings the App to Android and improves capture reliability, touch control and everyday startup. The existing 2.x compatibility baseline is unchanged.

- **Android App:** share your screen, join room voice or control a supported computer. One APK supports ARM64 and x64, using your own browser and the same Piik interface.
- **Phone controls:** use direct touch or a compact floating mouse with dragging, left/right buttons and a scroll wheel. Pinch to zoom and pan the picture while controlling.
- **More reliable sharing:** keep video progressing through source and encoder-output changes, and improve low-bitrate recovery and stationary-screen keyframes. Correct Windows window-size handling and Linux NVENC settings; start optional source sound after video is ready.
- **Smoother App entry:** retry failed startup in place, reopen the running room and retain the correct App connection when returning from the browser. Compress shared page assets to reduce loading traffic and keep microphone choices stable during ordinary page updates.
- **Recovery stays local:** a rejected input or canceled source replacement no longer revokes remote-control permission. Full ICE candidate queues and failed audio-parameter updates retain healthy connections. A failed local room leaves the App and unrelated approved sites running.
- **Connection settings:** relay volunteers can cap their downstream viewers. Self-hosted SFU setups can use a DNS hostname in `SFU_PUBLIC_IP`.
- **Clearer help:** refine sharing-error guidance, preserve input-failure diagnostics without recording input content, and update the bilingual platform and network guides.

Update both the App and your self-hosted site to use the new features. Android can control a supported computer; the Android device itself is not a controlled endpoint.

If you previously installed a test APK, uninstall it once before installing this release: the official signing key is different. Uninstalling clears App-local site approvals and starred-site choices; browser settings remain in the browser. Later official releases can be installed over this one.

### 中文

Piik v2.5.0 带来 Android App,并改善采集稳定性、手机远控与日常启动体验。沿用现有 2.x 兼容基线。

- **Android App:** 分享手机画面、加入房间语音,或控制支持远控的电脑。一个安装包同时支持 ARM64 与 x64,使用自己的浏览器和熟悉的 Piik 界面。
- **手机远控:** 直接触摸操作,或展开小巧的悬浮鼠标,使用拖拽、左右键与滚轮;控制时也能双指缩放、移动画面。
- **分享更稳定:** 修复切换采集来源、编码输出时画面停止推进的问题,改善低码率恢复与静止画面的关键帧响应。修正 Windows 窗口尺寸处理和 Linux NVENC 设置,来源声音会在画面就绪后启动。
- **App 进出更顺畅:** 启动失败可原地重试,再次打开会回到正在运行的房间;从浏览器返回时保持连接到正确的 App。共用页面资源启用压缩,减少加载流量,麦克风选项不再随普通页面更新反复加载。
- **局部问题就地恢复:** 单次操作失败或取消换源不再撤销远控授权;ICE 候选队列满或音频参数调整失败时保留健康连接。本地房间故障不会连带停止 App 和其他已授权站点的分享。
- **连接设置:** 帮助转发的观众可设置承接人数上限;自部署 SFU 的 `SFU_PUBLIC_IP` 现在支持 DNS 主机名。
- **排查更直接:** 打磨分享失败提示,补充不记录输入内容的远控故障诊断,并更新中英文平台说明与网络指南。

使用新功能时,请一起更新 App 与自部署站点。Android 可作为控制端操作电脑,手机本身不作为被控端。

曾安装测试 APK 的用户需先卸载一次,再安装正式版,两者签名不同。卸载会清除 App 内的站点授权和收藏,浏览器设置仍保留在浏览器中;后续正式版可直接覆盖安装。

## Verification / 验证

- Local full Web/type/build checks passed: 104 test files, 1,848 tests; the website and documentation builds passed.
- Android full-App emulator acceptance covered real decoded screen sharing, concurrent 1080p/540p encoder allocation, live bitrate changes, stationary keyframes, Viewer departure, consent reuse/reentry and final capture-resource retirement.
- A local universal release APK passed signing, package identity, version-code, ABI and non-debuggable checks using the permanent release key. GitHub Actions receives the same key through encrypted Secrets; manual candidate runs use a disposable candidate signer.
- Windows real capture checks covered H264/VP8 window resizing and restoration. Source-audio startup and failure/close ordering passed focused runtime checks; Linux race checks passed.
- Desktop/mobile website layouts were reviewed in English and Chinese, both themes, including grouped downloads, the iOS online entry and self-hosting links.
- All three Server and six App candidate targets, including the signed Android universal APK, passed in https://github.com/TNTcraftHIM/Piik/actions/runs/40350004792. This uses the same release packaging path with publication disabled.
- The complete network laboratory passed in https://github.com/TNTcraftHIM/Piik/actions/runs/40354253735: 43 expected scenario outcomes (37 media connections, six expected-unavailable controls), six negative controls, and complete process/network cleanup.
- Recoverable-error checks cover real encrypted input replies and legacy opt-in, retained grants and held-key cleanup, real Windows target geometry recovery, candidate queue overflow, and audio-parameter retry on the existing edge. Android room failure and full shutdown use real launcher, control WebSocket and supervised-process checks; unrelated site resources remain intact.
- The lifecycle fixes at `7eb04de373567cfe7aff2db6c93adf2a38e0b1aa` passed all nine package targets and Go/vulnerability/race/Web checks in https://github.com/TNTcraftHIM/Piik/actions/runs/40362794088, including macOS x64/ARM64 cgo and Android. Publication was skipped.
- Final cross-review found and fixed the same candidate-overflow false failure in the SFU voice owner. Its real-Pion regression verifies the first 64 candidates remain queued, a valid answer drains them, and renegotiation succeeds. Independent reviews confirmed real SDP and authorization failures still propagate.
- A real-browser before/after check reduced microphone enumeration from nine calls to one across eight ordinary Host rerenders. Changing the native client or switching to Browser capture still enumerates the new devices. The separate focused contribution #507 preserves input focus during queued floating-panel opening and is not attributed to this phase.
- The verified Windows candidate and reproduction steps have been updated in #502. macOS/Linux physical-device coverage and iOS device acceptance keep their documented boundaries.

## Impact / 影响

- Planned release: **v2.5.0**; no public wire or storage version bump.
- Android is a sharing and controlling endpoint, not a remotely controlled Android device. iOS is held outside this release.
- New Android release target joins the existing complete-target, checksum, GitHub and Gitee artifact pipeline. Signing material stays outside Git; optional input SDKs/drivers are not bundled.
- The owner authorized closure and publication after the final design review and acceptance checks. Restore the publication gate after the held focused contribution and merge this complete phase once; CI publishes only after its full checks and registered packages pass.
- Current TODO, platform guidance, media/routing evidence and release operations retain their existing document owners; no additional audit ledger or changelog archive is introduced.
2026-10-26 13:37:33 -04:00

426 lines
28 KiB
Markdown

# 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](../status.md) 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](../status.md#accepted-release-contract).
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 shared App launcher displays its installed version from the existing launcher
state; development builds also show their short source revision.
The Web help menu displays its bundled build version without a network lookup.
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](./rooms-access.md#room-interactions).
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.
Android `versionName` uses the product version. Its `versionCode` is generated as
`major * 1000000 + minor * 1000 + patch`; minor and patch must each be at most
999, and the result must be in Android's `1..2100000000` range. Development
builds use code 1 and include the short revision in `versionName`. The shared
product version remains the only release ordering input; no Android counter is
maintained separately.
Desktop 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](../operations/website.md#preview) owns download presentation
and verification of the matching Gitee mirror.
Android uses the installable `piik-app-android-universal.apk` for both ARM64 and
x64. It follows the same release identity, checksum, complete-target and
mirror rules. [Android build instructions](../../mobile/README.md#signed-release-apk)
own signing input and installation details.
Public Release attachments contain the App ZIPs/APK 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](../deployment.md).
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 direct download as its primary action, with a small
Gitee mirror link below it. A newer major adds a short, visible breaking-change
notice linking to the selected provider's exact release page; ordinary updates
do not add a separate release-notes control. 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.
Keep the major warning inline, without a confirmation dialog or mandatory
website detour. The mirror link opens Gitee releases without depending on the
website. API response time does not measure package-download throughput;
do not add speed probes or automatic
provider switching to an otherwise valid update check.
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](../../CONTRIBUTING.md#commit-pr-and-branch-names).
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.
Accepted external contributions may merge ahead of a release with this existing
publication gate held off. Keep it off until the next authorized release;
that release includes the eligible contributions since the previous tag.
The [GitHub operations procedure](../operations/github.md#enable-automatic-publication-once)
owns pausing and resuming publication.
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](../operations/github.md)
owns activation and main protection; no workflow changes repository visibility.
Updates remain explicit, outside an active share, using complete matching
packages. [Deployment](../deployment.md) 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](#automatic-publication) and
[first-publication visibility check](../operations/github.md#container-registry)
apply. Preserve the original image and packages for retries.
## Release Notes
GitHub Releases owns the published changelog. Each product-changing PR supplies reviewed
English and Chinese 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.
Keep the Release title `Piik vX.Y.Z`. The body may open with one short bilingual
editorial headline. Its lifetime is independent of semver: keep, replace or omit
it based on what is worth telling readers, not whether the version is a patch
or minor update. An already-published feature, a verified community milestone,
thanks or an occasional light aside can lead. Keep Piik's friendly tone without
forced jokes; never turn an old feature into a claim that it is new in this
update, advertise an unfinished prototype or trivialize a serious failure.
When used, open with a short bold title followed by one plain paragraph explaining
that headline's concrete meaning. Write the complete English pair first, then the
Chinese pair. For example: **Play together. Your turn!** / Piik now supports
remote control and remote co-play; **远程同乐,轮到你啦!** / Piik 现已支持远程控制与远程同乐。
The explanation states the feature or fact, rather than adding another slogan;
it does not replace the description of this update below. Keep each title and
explanation to one authored line, using plain text inside `**...**` and the
description. The website reads these same pairs from
the published Release body and displays the current language; it does not keep
another copy, interpret arbitrary Markdown or guess a headline from older
releases. Gitee retains the same body. Do not add a campaign registry or automatic
version-based inheritance; review any reused headline when preparing the PR.
Then introduce **this update** in each language with one or two factual sentences:
its actual changes, who benefits and any required upgrade action. A headline is
optional; that explanation is not. An internal refactor alone does not justify
calling a release breaking or major. Urgent security, data-loss or compatibility
instructions take precedence over a playful opening.
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.
English and Chinese cover the same release facts with natural phrasing, with
English first. 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 with at most one bilingual
headline. The last included product PR owns that choice, including omission;
aggregation removes earlier headlines but retains all actual change details in
order. 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.
Piik's release scope and upgrade instructions come from its own accepted changes.
Editorial references reviewed on 2026-10-19: [Discord's update](https://discord.com/blog/discord-update-september-25-2026)
combines a friendly voice with concrete changes; [VS Code's version notes](https://code.visualstudio.com/updates/v1_95)
keep feature highlights alongside subsequent patch fixes. These inform the
presentation, not Piik's version selection or feature claims.
## 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](https://gitee.com/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](../verification-status.md).
## References
- [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html): release meaning follows a
declared public API; build metadata does not determine precedence.
- [Syncthing releases](https://docs.syncthing.net/users/releases.html) and
[BEP](https://docs.syncthing.net/specs/bep-v1.html): 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](https://go.dev/doc/go1compat): name the protected contract
and its limits instead of promising universal binary/runtime compatibility.
- [Debug Adapter Protocol evolution](https://microsoft.github.io/debug-adapter-protocol/overview.html):
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](https://www.conventionalcommits.org/en/v1.0.0/) provides
the small release-intent vocabulary; standard SemVer libraries perform ordering.
- Apple's [bundle build version](https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleversion)
and [release version](https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleshortversionstring)
are numeric; package generation derives both from the release and keeps SHA separately.
- [GitHub Releases API](https://docs.github.com/en/rest/releases/releases) and
[Gitee's official API SDK reference](https://gitee.com/sdk/gitee5j/blob/main/docs/RepositoriesApi.md):
provider endpoints and metadata. [Gitee Release documentation](https://help.gitee.com/repository/release/intro)
owns its current attachment limits. Provider checks were made on 2026-09-12.