Skip to content

feat: a nightly flavour with a dated pre-release version - #139

Merged
GLinnik21 merged 7 commits into
mainfrom
feat/nightly-flavour
Sep 19, 2026
Merged

GLinnik21 merged 7 commits into
mainfrom
feat/nightly-flavour

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Summary

  • New FLAVOR=nightly: app id com.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 without RELEASE=1, with no override.
  • Package version is the next minor (0.7.0 today) — plain integers, as LG requires. The app reports 0.7.0-nightly-YYYYMMDD (X-Plex-Version, Sentry release, diagnostics panel), from PLX_CHANNEL=nightly + PLX_NIGHTLY_DATE; build.rs panics on a missing/malformed date or a non-release nightly. With PLX_CHANNEL unset, output is unchanged.
  • The "next version" rule now has one Python home, ci/version_rule.py, used by ci/flavor.py and ci/check-package.py; build.rs shares its Rust helper between -dev and nightly.
  • ci/check-package.py grades nightly packages: next-minor package version, dated reported version, and the no-dev-trigger rule (nightly is always release).
  • build-package.yml accepts flavor: nightly and a nightly-date input.
  • .claude/hooks/outbound-guard.py: 8912 and nightly added to the generic-literal allowlist beside 8910/8911/stable/debug, so the guard doesn't flag them as private values.

Verification

Stacked on #137 (and needs #138 for a packageable release build). The workflow that publishes nightlies is the next PR.

🤖 Generated with Claude Code

GLinnik21 and others added 3 commits September 19, 2026 01:44
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]>
Copilot AI lite review requested due to automatic review settings September 19, 2026 01:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity

Open (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 be RELEASE=1” in the Makefile.
  • Extends rust-modules/build.rs version emission to support PLX_CHANNEL=nightly + PLX_NIGHTLY_DATE producing X.Y.Z-nightly-YYYYMMDD.
  • Centralizes “next version triplet” arithmetic in ci/version_rule.py and 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 thread ci/flavor.py
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})')
GLinnik21 and others added 3 commits September 19, 2026 04:31
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]>
Base automatically changed from ci/reusable-build to main September 19, 2026 07:25
# Conflicts:
#	.github/workflows/build-package.yml
@GLinnik21
GLinnik21 merged commit 1c96bb7 into main Sep 19, 2026
5 checks passed
@GLinnik21
GLinnik21 deleted the feat/nightly-flavour branch September 19, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants