Release gate = scriptable factual checks, not "it feels ready." Artifacts, naming, checksums, licenses, keys, rollback plan, HIL badge — go item by item; if any one fails, do not release. A gate that fails to stop a bad artifact is as good as no gate at all.
Determine Task Type
- Pre-release gate (main path): image is to be released to a channel/user → Workflow A (go through the checklist item by item).
- Naming and version decisions: how to name, how to bump the version number, how to stamp the channel field → Workflow B + naming-and-versioning。
- Signing and key governance: what scheme to sign with, where keys live, how to separate multiple channels → Workflow C + "Signing and key governance" on this page.
- Integrity/reproducibility troubleshooting: sha256 does not match, two builds are inconsistent → Workflow D.
Prerequisites / Preflight
# 产物与校验和工具就位(占位路径按项目替换)
ls -l bin/targets/*/ 2>/dev/null || ls -l out/ 2>/dev/null || echo "no artifact dir found"
command -v sha256sum || command -v shasum || echo "no sha256 tool"
- Artifact directory, target channel, and target device list are in hand;
- the HIL badge record for this version is in hand — if not → route to
fw-hil-testing; this gate does not clear a "stable release"; - the key ownership for the signing scheme is clear; if not clear → first go through "Signing and key governance" below, then talk about release.
Offline Baseline
- Walkthrough date 2026-09-02, not auto-updated.
- OpenWrt baseline 25.12.5; the five-segment naming pattern is distilled from TinyNAS closed-loop practice (its spec baseline 2026-08-31).
- OpenWrt-side reproducible build mechanism (
SOURCE_DATE_EPOCH) details are inopenwrt-image-buildreproducible-build reference; this Skill only consumes its conclusions (rebuild with a fixed epoch, hashes should match, drift troubleshooting order).
Contracts (release artifact contracts)
- sha256 must be attached: every release artifact must have a paired
.sha256(content =<hash> <filename>), and the gate mustrecomputeand pass — "it was computed at build time" does not count. - Reproducible build declaration: the release record states the
SOURCE_DATE_EPOCHvalue and source; when it cannot be reproduced, mark it truthfully; claiming deterministic is prohibited. - LICENSE/GPL compliance: distributing binaries must satisfy the license obligations of the included components — OpenWrt itself is GPLv2 (attach the source acquisition path and build scripts); list AGPL/MIT/Apache components bundled with the package one by one. Pattern reminder: the obligation form of network-service-style AGPL components (Alist-type) differs from GPLv2; add a separate check line for them. Attach the license list to the release notes.
- HIL badge prerequisite: for a version entering a channel and claiming "usable/stable," the badge must be ≥
HIL Verified(semantics →fw-hil-testing);Build Verification Only/Boot Verified (QEMU)); it can only enter internal/test channels and must be explicitly marked. - Anti-hallucination red line: version numbers, dates, and channel fields must come from build records (epoch/CI output); manually filling in an "approximate date" is prohibited.
Signing and key governance (pattern)
Commercial authorization and integrity favor asymmetric signing, with three governance invariants:
- Firmware/devices embed only the public key (or public key digest)— making verification capability public is fine;
- the private key exists only on the build/signing machine(offline machine or controlled signing service), never into git, CI plaintext variables, logs, or chat records;
- Channel subkey distribution: the root key only issues channel subkeys/sub-artifacts; a leak in one channel only revokes that channel's subkey and does not touch the root.
Applicable boundaries of symmetric short activation codes(one-sentence pattern): a symmetric scheme = the firmware must contain code-minting/key-verification capability, and extracting the firmware is equivalent to obtaining the code-minting capability; an asymmetric scheme = extracting the firmware yields only the signature-verification public key,cannot mint codes. Therefore symmetric short codes are only suitable for low-value scenarios where clone risk is acceptable; for commercial licensing, always prefer asymmetric. ESP32-side eFuse / Secure Boot v2 / Flash encryption mechanisms → esp32-secureboot(its key-governance follows the same set of governance principles as this section).
Naming and versioning strategy (five-segment template)
Pattern reference (distilled from TinyNAS practice) —five-segment image name, the filename is the metadata:
openwrt_<brand>-<tier>-<device>_v<SemVer>-<channel>_<date>.img.gz
- SemVer: MAJOR = breaking compatibility (partition layout/config not migrated/no downgrade); MINOR = new features; PATCH = fixes;
- channel: stable / beta / dev go into the filename, eliminating "same name, different quality";
- date: build date, taken from the build record (SOURCE_DATE_EPOCH / CI output), not manually filled in;
- Naming lint criteria, trimming rules, and counterexamples → naming-and-versioning。
Capability Boundaries + Hand-off
| User Intent | Skill |
|---|---|
| Insufficient HIL evidence / badge not up to standard | fw-hil-testing(the badge prerequisite of this gate) |
| Two builds inconsistent / reproducibility mechanism | openwrt-image-build(SOURCE_DATE_EPOCH mechanism side) |
| ESP32 secure boot / eFuse / encryption | esp32-secureboot(mechanism layer) |
| OTA upgrade package delivery mechanism | esp32-ota(upgrade artifact verification returns to this Skill) |
| Task classification entry point | fw-core |
| Building the CI/CD platform itself | Out of bounds: give general advice, do not replace this gate checklist |
Workflow A — Pre-release checklist (main path)
Execute item by item according to the script skeleton in release-checklist (style benchmarked against production gate scripts: pass/fail counts, exit 0 when all green):
- Artifact exists +
.sha256paired and the gate recomputation is consistent; - Naming lint: each of the five segments is valid, and the device/version/channel/date in the filename match the build record;
- Zero external link scan: bundled frontend/resources have no public CDN external links;
- Key scan: the artifact tree and overlay layer have no private keys/salt values/credentials (test keys intentionally committed must be explicitly exempted and publicly marked);
- Rollback plan exists: the previous usable version image + downgrade steps are documented;
- HIL badge up to standard: the release notes state the badge level, channel version ≥
HIL Verified; - Release notes: version highlights + known issues(even if none, write "Known issues: none");
- LICENSE list attached.
If any item fails → after fixing,rerun the full checklist(not just patching the failed item).
Workflow B — Naming and versioning decision
- Determine MAJOR/MINOR/PATCH according to the nature of the change (criteria → naming-and-versioning §2);
- Determine the channel label; confirm that channel/version/date are synchronously written into the watermark field inside the image (values come from the build record);
- Run the naming lint (reference §4); after renaming/rebuilding, rerun the release checklist.
Workflow C — Signing Scheme Decision
- Determine the scenario: firmware integrity/anti-tampering → asymmetric signing; commercial licensing/activation → asymmetric licenses (the device holds only the public key);
- Key placement: place according to the "three invariants" before starting work — if someone proposes putting the private key into CI → refusal (see Pitfalls 1);
- Multi-channel: root key + channel subkeys; release only after the subkey revocation process is documented;
- If someone proposes a symmetric short code → evaluate according to the "applicable boundaries"; if accepted, leave a written risk statement; it is not accepted for commercial licensing scenarios.
Workflow D — Integrity/Reproducibility Troubleshooting
- sha256 mismatch: first rule out transport truncation (redownload, compare sizes), then rule out "same name, different build" (naming lint item 2);
- Two builds are inconsistent: pin
SOURCE_DATE_EPOCHrebuild twice and compare hashes; if still inconsistent, troubleshoot in the order "environment differences → overlay timestamps/random IDs → ipk repository drift" (mechanism details →openwrt-image-build); - Write the conclusion into the release record — if it cannot be reproduced, state that truthfully; do not change your story to "it should be the same."
Validation Gates
- The checklist script is all green (exit 0), and the output is retained and archived with the release;
- Spot-check one channel link: from the download point to the device, checksum + signature verification pass end to end;
- Negative verification: deliberately break one item (rename/tamper with one byte of the image/delete the .sha256), and the gate must block it.
Pitfalls
- Do notput signing private keys into CI environment variables/repositories — plaintext variables will enter logs, be inherited by subprocesses, and land in image layers; "the repository is private" does not change the exposure surface. The correct approach: separate build and signing; CI keeps only the public key digest for verification checks.
- Do notshare one key with no derivation relationship across multiple channels — a single point of compromise brings down the entire line and you cannot revoke just one channel; use a root key + channel subkeys.
- Do notrelease artifacts without
.sha256, and do not trust only "it was computed at build time" — the gate must recompute. - Do notlet the version/channel/date in the filename be inconsistent with the build record — naming is metadata; a wrong name is more dangerous than a missing name.
- Do notrelease a "stable version" to a channel when the HIL badge does not meet the standard — B0/B1 may only go to internal/test channels and must be explicitly labeled.
- Do notomit license obligations — the distribution obligations for GPL/AGPL components do not disappear just because it is "only flashing firmware."
- Do nothide known issues in the release notes — if known issues are not reported, the after-sales cost is greater.
- Do notuse symmetric short codes for commercial licensing — extracting the firmware lets you forge codes; if you want to use it, first confirm in writing that the cloning risk is acceptable.
Official Sources
- Semantic Versioning
- SOURCE_DATE_EPOCH spec
- OpenWrt Image Builder
- GNU GPLv2
- GNU AGPLv3
- ESP-IDF Secure Boot v2
- ESP-IDF Flash Encryption
Privacy
The gate script only performs local checks and does not upload artifacts or checksums; key material does not enter logs or reports; when key/credential scans hit, report only the file path, not the content; treat channel and device information in release notes as user data and redact it before external transmission.