Files
craft-common-actions/scripts
skylar taylor-barrickandDylan M. Taylor e08bf3b8d4 nightly: run the shared nightly pipeline for any reviewed registry app (PhotoCraft unchanged) (#363)
* nightly: derive Linux package names from the app name

The nightly Linux package checks compared deb, rpm, Arch and Flatpak names against PhotoCraft
literals. scripts/nightly_linux_names.py derives them from inputs.app-name (the reviewed registry
identity when present, else ai.storyteller.<app>.nightly), and the checks and smoke steps use it.

* nightly: read the names registry from its fixed checkout path

nightly_linux_names.py no longer takes a --registry path (Sonar S8707): it reads the nightly-apps.json
beside scripts/ in its own checkout, and the workflow stops passing one.

* nightly: refuse partial package reads and test the checks' behaviour

Each deb, rpm and .PKGINFO read is its own assignment, so a tool failure after partial output
refuses instead of passing a matching name. New tests run the workflow's own check steps against
package-metadata fixtures with stub tools: designcraft packages pass, PhotoCraft-named ones and
partial reads refuse.

* nightly: run the shared nightly pipeline for any reviewed registry app

The registry row gains display_name, env_prefix and per-platform entrypoints, and
scripts/nightly_app.py (replacing nightly_linux_names.py) derives every app-specific name
from it. An admit-app job replaces the literal PhotoCraft gates in nightly-unsigned.yml,
nightly-release.yml takes a required app-name, and the compile and smoke steps use the
row's build prefix and binary paths. A plain Linux nightly tar may start through a short
launcher that execs the registry-named x86_64 ELF with the nightly profile; the smoke runs
the ELF directly. Every PhotoCraft name and fixture is unchanged.

* test: compare PhotoCraft's registry row with a fixture, not git history

CI checkouts are shallow, so `git show 8f58b6d0:nightly-apps.json` failed with exit 128. The
pre-change PhotoCraft row is now tests/fixtures/nightly-apps-photocraft-targets-8f58b6d0.json.

* nightly: launcher grammar, launcher layout at admission, optional pending (CodeRabbit)

- nightly_unix: a launcher must match a fixed grammar (its directory, quoted profile-root values with only
  parameter expansions, a case on $1, set -e/-eu, and the exec of the GUI binary); any other command,
  command substitution or backticks refuses.
- nightly_app: admission requires the GUI binary in or below its launcher's directory, the layout the
  archive check derives the exec path from.
- nightly_signing: the optional pending file is resolved once and used for both the inventory and the
  final Mac check, so omitting --pending no longer fails after signing.

* nightly: one canonical Linux launcher template instead of validating scripts

The Linux nightly tar's entrypoint is now either the GUI ELF itself or, byte for byte,
scripts/nightly-launcher.sh.in rendered for the app (only the registry row's strictly validated
binary path and the app's package identity are substituted). The template resolves its own
directory once, makes the directory, target and profile root readonly, sets the profile root from
XDG data home (or HOME) and the app identity, and execs the target with the nightly launch profile.
The line-grammar launcher validator is removed. `nightly_app.py launcher` prints the rendered file.

* nightly: launcher passes the Launcher's own profile argv through unchanged

The ArtCraft Launcher starts the tar's entrypoint with `--launch-profile nightly-v1 --profile-root
<per-install root> -- [files...]`. Wrapping that again gave the app two profile pairs, with the fixed
root overriding the Launcher's. When $1 is exactly --launch-profile, the template now execs the
readonly target with "$@" unchanged and lets the app's own parser validate the pair; everything
else keeps the fixed profile.

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-25 11:19:37 -05:00
..