Repository navigation
feat: a nightly flavour with a dated pre-release version - #139
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]>
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]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
ci/flavor.py --selftest currently hard-codes a trunk-only nightly version expectation and will fail incorrectly on maintenance branches with RELEASE_LINE present.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Adds a third install “nightly” flavor that can be installed alongside stable/debug, with a release-only build policy and a dated pre-release reported version string while keeping LG’s integer-only package version requirements.
Changes:
- Introduces
FLAVOR=nightly(new app id/title/runtime dir/capture port) and enforces “nightly must beRELEASE=1” in the Makefile. - Extends
rust-modules/build.rsversion emission to supportPLX_CHANNEL=nightly+PLX_NIGHTLY_DATEproducingX.Y.Z-nightly-YYYYMMDD. - Centralizes “next version triplet” arithmetic in
ci/version_rule.pyand updates CI/package gates to validate nightly packages appropriately.
| File | Description |
|---|---|
| rust-modules/src/release_line.rs | Adds shared helper to validate nightly date shape (and tests), used by build script via include!. |
| rust-modules/src/paths.rs | Extends app-id parsing and runtime-dir tests to cover the nightly install id. |
| rust-modules/src/capture.rs | Assigns a distinct capture port for nightly (8912) and updates flavor handling. |
| rust-modules/build.rs | Adds PLX_CHANNEL/PLX_NIGHTLY_DATE handling and shares next-version arithmetic between dev and nightly. |
| Makefile | Adds nightly flavor, port 8912 mapping, nightly release-only guard, and uses ci/flavor.py to compute IPK_VERSION. |
| docs/agent-reference.md | Updates documentation for three installs and nightly’s versioning/port behavior. |
| ci/version_rule.py | New shared Python implementation of the “next version triplet” rule used across CI scripts. |
| ci/test_storage_service_package.py | Updates helper-package tests to iterate all flavors and includes nightly app id. |
| ci/flavor.py | Adds nightly flavor support (id/title/version bumping) and expands selftest checks accordingly. |
| ci/check-package.py | Updates gates to validate nightly package version and nightly-reported version shape; reuses shared version-rule module. |
| .github/workflows/build-package.yml | Allows flavor: nightly and plumbs a nightly-date input through to PLX_NIGHTLY_DATE. |
| .claude/hooks/outbound-guard.py | Allows generic literals for 8912 and nightly to avoid false positives in outbound guard. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+171
to
+173
| _tracked_major, _tracked_minor, _ = (int(x) for x in tracked_appinfo["version"].split(".")) | ||
| check(nightly["version"] == f"{_tracked_major}.{_tracked_minor + 1}.0", | ||
| f'nightly appinfo version is the next minor on trunk (got {nightly["version"]!r})') |
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]>
Co-Authored-By: Claude Opus 5 <[email protected]>
# Conflicts: # .github/workflows/build-package.yml
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
FLAVOR=nightly: app idcom.beb.plxnative.nightly, title "PlxNative Nightly", own runtime dir/tmp/com.beb.plxnative.nightly, port 8912. Installs beside stable. Always a RELEASE build — the Makefile refuses a nightly withoutRELEASE=1, with no override.0.7.0today) — plain integers, as LG requires. The app reports0.7.0-nightly-YYYYMMDD(X-Plex-Version, Sentry release, diagnostics panel), fromPLX_CHANNEL=nightly+PLX_NIGHTLY_DATE;build.rspanics on a missing/malformed date or a non-release nightly. WithPLX_CHANNELunset, output is unchanged.ci/version_rule.py, used byci/flavor.pyandci/check-package.py;build.rsshares its Rust helper between-devand nightly.ci/check-package.pygrades nightly packages: next-minor package version, dated reported version, and the no-dev-trigger rule (nightly is always release).build-package.ymlacceptsflavor: nightlyand anightly-dateinput..claude/hooks/outbound-guard.py:8912andnightlyadded to the generic-literal allowlist beside8910/8911/stable/debug, so the guard doesn't flag them as private values.Verification
ci/flavor.py --selftest,ci/check-package.py --selftest, outbound-guard self-test,make check,--no-default-featureslib check, actionlint.make FLAVOR=nightly RELEASE=1 ipk: id, port, run dir, package version 0.7.0 and reported version all graded ok; the only failure was the release dev-trigger leak fixed in fix: keep the replay bootstrap's trigger vocabulary out of release builds #138.Stacked on #137 (and needs #138 for a packageable release build). The workflow that publishes nightlies is the next PR.
🤖 Generated with Claude Code