Repository navigation
ci: publish a nightly prerelease every day main moves - #140
Merged
Merged
Conversation
Extract the ARM build+verify job release.yml and canary.yml each hand-kept a copy of into a new reusable workflow, .github/workflows/build-package.yml, parameterized by flavor, telemetry pair, and which optional steps (Homebrew manifest, LGPL source asset, caches, firmware-database gate) apply. The release path runs the exact same commands as before (90/90, verified by a command-coverage script against origin/main): the only two changes are the wrong-flavour guard and the source-asset step's ipk lookup, both now derived from `make -s print-appid` instead of a hard-coded stable id, so a future non-stable caller is checked correctly too. canary.yml gains a `dry_run` dispatch input that skips `publish` so the shared pipeline can be proven on a branch without publishing anything. This also prepares the coming nightly caller, which needs no new copy of the job — just another set of inputs. Co-Authored-By: Claude Opus 5 <[email protected]>
…-closed default Make the workflow_call contract match reality (every caller's upload step hard-fails without SENTRY_AUTH_TOKEN), and document why source-asset defaults true: any publisher of the package owes LGPL source, not just release. Co-Authored-By: Claude Opus 5 <[email protected]>
…ilds The canary dry run (CI run 35404204884, FLAVOR=debug RELEASE=1) failed ci/check-package.py's "the packaged binary is a RELEASE build (no dev triggers compiled in)": the --no-default-features ARM binary carried the dev witness `plxnative-noidle`. Root cause: 235e519 ("refactor: establish owned UI and controlled bootstrap") added app::bootstrap, whose Initial::validate() checked the recorded trigger list against a `matches!` over full `plxnative-*` literals, and boot.rs's replay path looked up `plxnative-noidle` the same way. Neither was cfg-gated, so the recorder's whole trigger vocabulary compiled into release. The rec/recplay/app-init readers were guarded only at runtime (`dev::ENABLED`), which still leaves the names in the bytes. Fix: the vocabulary is one table in dev.rs (`CONTROLLED`), gated like DIAG on `any(devtriggers, test)`, behind two accessors: `dev::controlled_trigger` and `dev::listed`. Their release versions answer false without naming a trigger, which is truthful because a release build never arms one (`armed_triggers` is empty there). bootstrap.rs and boot.rs are migrated to them. The rec, recplay and app-init readers in dev::scenarios are now cfg-gated items that go through dev's own path door. The release versions return None. Verified: `make FLAVOR=debug RELEASE=1 ipk` FAILed that check before the change and passes it after; `make check` green. Co-Authored-By: Claude Opus 5 <[email protected]>
Adds FLAVOR=nightly beside stable and debug: always RELEASE=1, own app id/port/runtime dir, package version is the next minor (or next patch on a maintenance line) via a new shared ci/version_rule.py, and the reported version is that triplet suffixed -nightly-YYYYMMDD from PLX_NIGHTLY_DATE. PLX_CHANNEL/PLX_NIGHTLY_DATE plumb through build.rs; with PLX_CHANNEL unset, behavior is byte-identical to today. nightly.yml itself is left for a later lane. Co-Authored-By: Claude Opus 5 <[email protected]>
…/nightly-workflow
Adds ci/nightly.py (plan/notes/latest-json/prune, stdlib only, --selftest wired into `make check`) and .github/workflows/nightly.yml, a scheduled workflow that cuts one dated nightly build (X.Y.Z-nightly-YYYYMMDD) from main through the shared build-package.yml pipeline, publishes it as an immutable prerelease beside stable, refreshes the site's latest.json via a new workflow_call trigger on pages.yml, and prunes releases past 30 days while always keeping the newest. README and the cut-release skill note the new install path and its retention policy; canary.yml is marked superseded but left in place. Co-Authored-By: Claude Opus 5 <[email protected]>
Adds a pull_request trigger (paths: nightly.yml, build-package.yml, ci/nightly.py, ci/flavor.py, ci/version_rule.py, ci/check-package.py, Makefile, rust-modules/build.rs) that builds the PR's own head sha through plan+build only, gated by one `dry` output computed once in `plan` (true for pull_request or dry_run) rather than scattered event checks; fork PRs are skipped entirely since the Sentry secret is unavailable there. `ci/nightly.py plan --dry` never skips on "nothing changed" and never refuses an existing same-day tag, since a dry run never publishes. Also: renders "## Changes" instead of a dangling "## Changes since" when there is no previous nightly, with a selftest case; and drops pages.yml's now-stale legacy-Pages- source paragraph (gh api confirms build_type is already "workflow"). Co-Authored-By: Claude Opus 5 <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Pagination, hostsim bootstrap, retention, and Pages-only dry-run gaps can break supported workflows or nightly operations.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (4)
What changed in this PR
Adds a daily, dated nightly prerelease pipeline integrated with the shared ARM build, Pages deployment, and retention tooling.
Changes:
- Adds nightly planning, release notes, latest-build JSON, publishing, and pruning.
- Makes controlled bootstrap triggers unavailable in release builds.
- Documents nightly installations and updates reusable workflow support.
| File | Description |
|---|---|
ci/nightly.py |
Nightly planning, notes, JSON, and retention logic |
.github/workflows/nightly.yml |
Scheduled build, publish, Pages, and prune jobs |
.github/workflows/pages.yml |
Reusable Pages deployment with nightly metadata |
.github/workflows/build-package.yml |
Documents nightly pipeline integration |
rust-modules/src/dev.rs |
Controlled trigger vocabulary and release gating |
rust-modules/src/dev/scenarios.rs |
Feature-gated bootstrap readers |
rust-modules/src/app/bootstrap.rs |
Uses gated trigger accessors |
rust-modules/src/app/boot.rs |
Uses recorded trigger lookup |
Makefile |
Runs nightly self-tests |
README.md |
Documents nightly builds |
.github/workflows/canary.yml |
Notes nightly supersession |
.agents/skills/cut-release/SKILL.md |
Clarifies nightly retention policy |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+243
to
+246
| def _nightly_releases(repo: str) -> "list[dict]": | ||
| releases = _gh_json(["api", f"repos/{repo}/releases", "--paginate"]) | ||
| assert isinstance(releases, list) | ||
| return [r for r in releases if r.get("tag_name", "").startswith(TAG_PREFIX)] |
Comment on lines
+126
to
+130
| #[cfg(any(feature = "devtriggers", test))] | ||
| const CONTROLLED: &[&str] = &[ | ||
| "rec", "recplay", "focus", "noidle", "token", "app-init", "settings", | ||
| "detail", "detailsec", "detailok", "filmography", "personcredits", "nowan", | ||
| ]; |
| # every PR. Widen this list if another file the nightly path depends on gains one. | ||
| paths: | ||
| - .github/workflows/nightly.yml | ||
| - .github/workflows/build-package.yml |
Comment on lines
+278
to
+279
| needs: [plan, publish] | ||
| if: ${{ needs.plan.outputs.dry != 'true' && needs.plan.outputs.skip != 'true' }} |
Rust string literals in .rodata are packed back to back with no NUL separator, so a nightly binary's [email protected] can be followed immediately by the next literal with no boundary at all. The gate's trailing \b assumed one always exists and failed a real nightly build (PR #140, run 35412511191) whose next literal started with a digit. (?![0-9]) asserts the true thing instead: the date is exactly 8 digits, so anything but a 9th digit ends it. Also: factor the pattern into nightly_stamp_pattern() with selftest coverage of the adjacent-literal, 7-digit and 9-digit cases, and make a failure list the plxnative@ strings actually found in the blob so the next regression is self-explaining. Co-Authored-By: Claude Opus 5 <[email protected]>
Two prior fixes tried to find where the 8-digit nightly date ends inside the packaged binary's own bytes, first with a trailing \b, then with (?![0-9]) in its place. Both failed against real nightly builds: Rust's concat!() output in .rodata is packed back to back with no separator, so when the next packed string literal happens to start with more digits (as proven twice, most recently [email protected]...), no shape-based boundary assumption can tell where the date stops. Stop guessing the date from the blob. The Makefile now records the exact PLX_NIGHTLY_DATE it built with as a +nightly:<YYYYMMDD> token in pkg/.build-config's RUST_CFG stamp, guarded by FLAVOR=nightly the same way +symbols and +tel: are already guarded, so the stamp (and therefore the forced relink) changes whenever the date changes. ci/check-package.py reads that token via nightly_stamp_date() and grades the binary the same way stable's exact version is graded: a precise substring match, no boundary assumed on either side, because the substring itself is now exact. Missing or malformed stamp fields fail the gate; on a substring miss the check still lists the plxnative@... strings actually present in the blob. Selftest cases cover the token parse (present/absent/short/long) and the substring grading (matching date passes, one day off fails). The shape-only helper is removed. Co-Authored-By: Claude Opus 5 <[email protected]>
The nightly dry run (CI 35413694942) died in "Versioned source asset and
isolated reconstruction" with only a CalledProcessError: collect-source-
inputs.py swallowed cargo's stderr. Reproduced from an empty CARGO_HOME
populated with only the release ARM graph:
error: failed to sync
Caused by:
failed to download packages for .../rust-modules
Caused by:
failed to download `asn1-rs v0.7.2`
Caused by:
attempting to make an HTTP request, but --offline was specified
Root cause: #104 (910b947) added the `rcgen` dev-dependency. `cargo
vendor` takes every package in Cargo.lock (all targets, dev-deps too); the
release ARM build downloads only its own graph, so the offline vendor hit
crates nobody had fetched. release/v0.6 had no such gap.
- build-package.yml: `cargo fetch --locked` (no --target) before the
collection, pinned by Cargo.lock checksums; the collection script stays
download-free as its contract says.
- With vendoring fixed, the next gate refused the tree: the credential scan
matched doc/test sample keys in pem 4.0.0 (README.md, src/lib.rs) and
rcgen 0.14.10 (src/certificate.rs). The digest-pinned DSN exemption is
generalised to PUBLIC_SAMPLE_FILES: one pattern, one file, one digest;
a new test proves the exemption does not cover a different pattern.
- collect-source-inputs.py run() now prints the tool's stdout/stderr (home
shortened to ~); verify-source-rebuild.py prints the failing command and
the last 200 lines of build.log instead of exiting silently.
- The GPL scan also covers the development telemetry pair
(PLX_SENTRY_DSN_DEV / PLX_POSTHOG_KEY_DEV), which a telemetry:
development build compiles in.
Evidence: empty CARGO_HOME + ARM-only fetch -> collect exit 1 with the
error above; + `cargo fetch --locked` -> collect exit 0, every archive
pattern_scan PASS. test_source_bundle.py 32/32, actionlint clean.
Co-Authored-By: Claude Opus 5 <[email protected]>
…d path CI run 35414278456 got past vendoring and died in prepare-source-release.py: FileNotFoundError on ~/webos-ndk/.../arm-webos-linux-gnueabi-gcc.br_real. The NDK action now installs into $GITHUB_WORKSPACE/.webos-ndk and exposes it as steps.ndk.outputs.sdk-dir; the source step never received it, and both source scripts fell back to a guessed ~/webos-ndk. - The source step passes WEBOS_SDK from steps.ndk.outputs.sdk-dir. - prepare-source-release.py and verify-source-rebuild.py no longer guess: they exit with a clear FAIL when WEBOS_SDK is unset or holds no NDK compiler. The prepare check runs before the (slow) collection. The rebuild's `make` inherits the same WEBOS_SDK. - .webos-ndk/ is gitignored. It could not reach the bundle (only tracked, allowlisted paths are archived, and all 26k NDK names pass safe_name), but it is a toolchain, never source. Other ~/webos-ndk fallbacks (arm-cc.py, stage-link-evidence.py, build-*.sh, check-elf.sh) mirror the Makefile's local default and every CI call of them already passes WEBOS_SDK; left as they are. Co-Authored-By: Claude Opus 5 <[email protected]>
…ken-shaped fixture Nightly dry run 5 (CI 35414736592) failed the source step's credential scan on first-party code: a synthetic test token in rust-modules/src/app/session_resource_tests.rs:709, long enough (20+ chars) to match the X-Plex-Token pattern. Nothing before the ARM build ever ran scan() over the tree, so it only surfaced after a five-minute cross-build. - The selection the bundle archives (tracked files that pass allowed(), release records redacted) is now ONE function, source_bundle. tracked_sources(); make-source-bundle.py builds from it. - test_source_bundle.py scans every file tracked_sources() yields, with no private values, so `make check` sees what the release step will. Watched red on exactly that file, green after the rename. - The fixture token is now "synthetic-new-tok" (under the pattern's 20 chars). No exemption: PUBLIC_SAMPLE_FILES is only for checksum-pinned upstream sources. Co-Authored-By: Claude Opus 5 <[email protected]>
…orts The bundle name was read from the tracked pkg/appinfo.json template, so a nightly produced plxnative-source-0.6.0.tar.gz next to a 0.7.0 nightly package. It is now taken from what the build produced: the package version from the ipk's own filename (the Makefile's IPK_VERSION), plus `-nightly-<date>` when pkg/.build-config carries the `+nightly:<date>` field, the same stamp check-package grades the binary's reported version against. Stable has no such field and keeps plxnative-source-X.Y.Z. release.yml and nightly.yml both collect `plxnative-source-*.tar.gz*` by glob; no release-audit code names the file. A label that is not X.Y.Z[-nightly-YYYYMMDD] fails the step instead of naming a bundle wrongly. Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 19, 2026
* ci: one ARM build pipeline shared by release and canary Extract the ARM build+verify job release.yml and canary.yml each hand-kept a copy of into a new reusable workflow, .github/workflows/build-package.yml, parameterized by flavor, telemetry pair, and which optional steps (Homebrew manifest, LGPL source asset, caches, firmware-database gate) apply. The release path runs the exact same commands as before (90/90, verified by a command-coverage script against origin/main): the only two changes are the wrong-flavour guard and the source-asset step's ipk lookup, both now derived from `make -s print-appid` instead of a hard-coded stable id, so a future non-stable caller is checked correctly too. canary.yml gains a `dry_run` dispatch input that skips `publish` so the shared pipeline can be proven on a branch without publishing anything. This also prepares the coming nightly caller, which needs no new copy of the job — just another set of inputs. Co-Authored-By: Claude Opus 5 <[email protected]> * ci: build-package requires the Sentry token; source-asset is the fail-closed default Make the workflow_call contract match reality (every caller's upload step hard-fails without SENTRY_AUTH_TOKEN), and document why source-asset defaults true: any publisher of the package owes LGPL source, not just release. Co-Authored-By: Claude Opus 5 <[email protected]> * feat: a nightly flavour with a dated pre-release version Adds FLAVOR=nightly beside stable and debug: always RELEASE=1, own app id/port/runtime dir, package version is the next minor (or next patch on a maintenance line) via a new shared ci/version_rule.py, and the reported version is that triplet suffixed -nightly-YYYYMMDD from PLX_NIGHTLY_DATE. PLX_CHANNEL/PLX_NIGHTLY_DATE plumb through build.rs; with PLX_CHANNEL unset, behavior is byte-identical to today. nightly.yml itself is left for a later lane. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(check-package): grade the nightly version without a word boundary Rust string literals in .rodata are packed back to back with no NUL separator, so a nightly binary's [email protected] can be followed immediately by the next literal with no boundary at all. The gate's trailing \b assumed one always exists and failed a real nightly build (PR #140, run 35412511191) whose next literal started with a digit. (?![0-9]) asserts the true thing instead: the date is exactly 8 digits, so anything but a 9th digit ends it. Also: factor the pattern into nightly_stamp_pattern() with selftest coverage of the adjacent-literal, 7-digit and 9-digit cases, and make a failure list the plxnative@ strings actually found in the blob so the next regression is self-explaining. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(check-package): grade the nightly date by value from the build stamp Two prior fixes tried to find where the 8-digit nightly date ends inside the packaged binary's own bytes, first with a trailing \b, then with (?![0-9]) in its place. Both failed against real nightly builds: Rust's concat!() output in .rodata is packed back to back with no separator, so when the next packed string literal happens to start with more digits (as proven twice, most recently [email protected]...), no shape-based boundary assumption can tell where the date stops. Stop guessing the date from the blob. The Makefile now records the exact PLX_NIGHTLY_DATE it built with as a +nightly:<YYYYMMDD> token in pkg/.build-config's RUST_CFG stamp, guarded by FLAVOR=nightly the same way +symbols and +tel: are already guarded, so the stamp (and therefore the forced relink) changes whenever the date changes. ci/check-package.py reads that token via nightly_stamp_date() and grades the binary the same way stable's exact version is graded: a precise substring match, no boundary assumed on either side, because the substring itself is now exact. Missing or malformed stamp fields fail the gate; on a substring miss the check still lists the plxnative@... strings actually present in the blob. Selftest cases cover the token parse (present/absent/short/long) and the substring grading (matching date passes, one day off fails). The shape-only helper is removed. Co-Authored-By: Claude Opus 5 <[email protected]> * docs: name the nightly install where the skills still said two Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
An error occurred while trying to automatically change base from
feat/nightly-flavour
to
main
September 19, 2026 07:53
# Conflicts: # .github/workflows/build-package.yml
4 tasks done
GLinnik21
added a commit
that referenced
this pull request
Sep 19, 2026
nightly.yml (landed in #140/#148) replaced canary.yml as the pipeline that proves the shared build-package.yml publishing path end to end, with a real flavour and a retention policy canary never had. Delete the now-unused canary.yml and update every live comment/error string that named it, so build-package.yml's reused inputs (source-asset, caches, fwcompat) and its development-telemetry checks describe their current callers (release.yml, nightly.yml) instead of a workflow that no longer exists. Genuinely historical mentions ("used to carry", "canary tags exist on GitHub") stay, since they are still true and existing canary releases/tags are out of scope here. Co-authored-by: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
.github/workflows/nightly.yml: every day at 03:00 UTC, ifmainchanged outsidesite/anddocs/since the last nightly, buildFLAVOR=nightlythroughbuild-package.yml(release configuration, dev telemetry, symbols to the dev Sentry project, firmware gates, LGPL source) and publish an immutable prereleasenightly/v0.7.0-nightly-YYYYMMDDwith--latest=false, so stablereleases/latestnever moves. One nightly per UTC day; a same-day tag is refused.plxnative-v<label>.ipk,nightly.sha256, FFmpeg source +build-ffmpeg.sh, and the versioned source tarball.ci/nightly.py(stdlib,--selftestwired intomake check):plan,notes(generated body: sha, untested warning, squash-commit subjects since the previous nightly, install steps, sha256, LGPL, 30-day retention),latest-json,prune.pages.ymlis now also callable; each nightly republishes the site withhttps://plxnative.com/nightly/latest.jsonpointing at the newest build.cut-releaseskill's "never delete a public tag" rule is scoped to stable releases.workflow_dispatchwithdry_run, and automatically on pull requests that touch the nightly pipeline (plan + build, never publish). Fork PRs are skipped (no Sentry secret there).How it is proven
ci/nightly.py --selftest32/32;plan/notes/latest-json/prune --dry-runrun against the real repo.Stacked on #139 and includes #138 via merge (needed for a packageable release build). Merge order: #137 → #138 → #139 → this.
🤖 Generated with Claude Code