Commit Graph
41 Commits
Author SHA1 Message Date
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
skylar taylor-barrick 1754016e67 nightly: derive Linux package names from the app name (#360)
* 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.
2026-11-24 19:08:16 -05:00
skylar taylor-barrick 04d4087f02 nightly: recheck Sonar after the final workflow freshness pass (#350)
* Recheck Sonar after the final workflow freshness pass

Sonar rereads (latest analysis and unresolved issues) now bracket the final workflow
freshness pass in admission and revalidation, so a Sonar change during the last GitHub
reads is refused while a workflow rerun during the first Sonar rereads still is. That
costs two fixed reads (FIXED_READS 18 -> 20). Adds status/ahead_by missing-field cases
and documents the room the fixed reads take out of the 640-read budget.

* Say exactly what the Sonar bracket covers

The bracket catches a Sonar change during the freshness reads and a workflow rerun during the
first Sonar rereads; any resource can still change after its own last read. Comment and docs only.
2026-11-24 07:48:45 -06:00
Martin Ball 82f995029c nightly: follow-ups to #345 (policy-required names, OCI payload shape, Arch nightly metadata, attestation subject names) (#353)
* nightly: require policy when naming validated bundle files

validated_names and stage_bundle fell back to scanning the bundle
directory for any Linux package file when no policy was passed. Every
production caller passes the policy, so drop the scan and make the
argument required; tests now pass their fixture policy.

* nightly: reject non-object OCI signature identity/image as invalid

A gpgv-verified payload whose critical.identity or critical.image was not
an object raised AttributeError instead of InvalidNightly.

* arch-package: namespace nightly metainfo icon/binary, mime icon and name

The nightly rename left the stable stock icon and <binary> in metainfo
and the stable icon in mime XML, and kept the display name, so stable and
nightly menu entries looked identical. Point them at the nightly ids and
binaries, and suffix the desktop entry Name= and metainfo <name> with
' Nightly', matching the photocraft deb/rpm nightly convention.

* test: pin basename subject names in multi-subject attestations

verify_unsigned_attestation(subject_name=...) relies on the pinned
attest-build-provenance (v3.2.0) naming subject-path subjects by
basename.

* Address review: developer-first metainfo name, cross-package digest test

Skip every <name> inside <developer> when suffixing the metainfo display
name, so a developer block before the component name no longer leaves the
component name unsuffixed. Also refuse a package basename paired with a
different package's digest in the multi-subject attestation test.

* arch-package: rewrite nightly XML metadata in one scope-aware pass

Metainfo and mime files now go through one whole-file awk pass that skips
comments and tracks <developer> scope across lines and whitespace. It
suffixes every component <name>, translated ones included, with ' Nightly',
and rewrites every stock icon and mime <icon name> in either quote style.
The desktop entry also suffixes localized Name[xx]= keys. Plain POSIX awk,
so it runs in the Arch container and on the FreeBSD test runner.

* arch-package: share one icon-id resolution between XML pass and icon renamer

The XML pass resolved stock/mime icons from desktop Icon= records only,
while the icon file renamer preferred a same-named desktop ID. An icon
for a desktop entry without Icon= was renamed on disk but still referenced
by its stable name. Resolve every icon id once into the desktop map and
have both read it.
2026-11-24 11:50:06 +00:00
Dylan M. Taylor 1d1155edbf feat(nightly): build, sign, and publish Linux packages and Flatpak OCI tags (#345)
* feat(nightly): dispatch artcraft-services version bump after nightly publish

* feat(nightly): build, sign, and publish Linux packages and Flatpak OCI tags

* fix(nightly): build and publish Linux packages whenever Linux is enabled

* test(nightly): allow LINUX_SIGNING_KEY in publish-linux-packages

* fix(nightly): address CodeRabbit review findings on #345

* refactor(nightly): keep Linux packages inside v3 validation and isolate OCI push

* refactor(nightly): move website dispatch out of release-ref signer

* fix(nightly): resolve CodeRabbit and review findings on #345

* nightly: address review findings on Linux packages and bundle validation

* nightly: verify skopeo inline .oci.sig payload against manifest digest and docker-reference

* nightly: preserve aarch64 tarball handoff for Arch job and verify OCI config arch

* nightly: attest and admit Linux packages, add OCI freshness check, and tighten verify

* nightly: use real v-prefixed nightly tags, newest_nightly, and NIGHTLY.json schema in OCI check

* arch-package: build -nightly pkgname and binary for nightly tarballs

* arch-package: namespace all nightly paths for side-by-side install

* arch-package: fix sed delimiter, subcommand manpages, WMClass, and completion renames

* arch-package: use awk for desktop/metainfo rewrites and # delimiter for completions

* fix(nightly): validate signed Linux package receipts, gate package_formats, and harden OCI/Arch

* test(arch): run offline makepkg and pacman side-by-side install tests without Docker Hub egress

* fix(arch): replace --nodeps with explicit --assume-installed in pacman smoke tests and pin image digest

* Fix OCI release pagination and Arch smoke handoff

* Validate Linux format types and match Arch package identities literally

* Keep stable and nightly Arch package resources distinct

* Bind OCI copies to immutable nightly publication evidence

* Use the PhotoCraft Nightly wrapper archive for Arch packages

* Bind package attestations and limit signing key exposure

* Keep one end-to-end Linux release history test

* Preserve Arch launcher metadata and completion names

* Separate Nightly OCI publication from signing

* Check the OCI entry points after moving workflow logic

* Allow OCI publication from a verified release ancestor
2026-11-24 08:01:29 +00:00
skylar taylor-barrick 605d58766e Bound nightly lineage compares and tidy release-ref follow-ups (#339)
* Bound nightly lineage compares and tidy release-ref follow-ups

* Make candidate ancestry refusal tests reach the ancestry rule

Each override is now a complete bounded compare page (commits plus the five lineage
keys) with only the property under test changed, beside a passing control, and each
asserts the specific ancestry refusal. Before, missing keys made compare_page refuse
first, so the asserts passed even with the ancestry checks removed.
2026-11-23 16:35:33 -06:00
skylar taylor-barrick a4f6fd51e8 nightly: add Linux and macOS to the PhotoCraft nightly signer (switched off) (#342)
* nightly: add Linux and macOS to the PhotoCraft nightly signer (switched off)

* Address CodeRabbit on the Linux and macOS nightly signer

* Apply the metadata size limit only to JSON metadata, not Linux tarballs
2026-11-23 14:47:27 -05:00
skylartaylor 1c63ff547c Merge the go-live fixes from #315 2026-11-23 15:35:57 +01:00
skylartaylor 43beed1762 Fix the before-go-live points: read past 400 releases and default signing off 2026-11-23 15:35:45 +01:00
skylartaylor 5799457606 Merge #315’s CodeRabbit fixes and address #330’s review
The merge resolves scripts/publish_nightly.py and also carries the fixes for CodeRabbit’s full review of this PR.
2026-11-23 03:25:44 +01:00
skylartaylor c81942d1ff Address CodeRabbit review of the nightly workflows 2026-11-23 03:25:30 +01:00
skylartaylor 695c15b533 Merge the world-writable job root check from #315 2026-11-23 02:13:27 +01:00
skylartaylor 3656d2d9de Refuse world-writable job roots instead of naming /tmp 2026-11-23 02:13:27 +01:00
skylartaylor 979f5e61ee Merge the nightly path confinement from #315 2026-11-23 02:05:53 +01:00
skylartaylor 85d2bf23bd Confine nightly helper paths to owned roots 2026-11-23 02:05:29 +01:00
skylartaylor 4fdc287a58 Confine receipt reservations and test both cloud-init clock diagnostics 2026-11-23 00:11:30 +01:00
skylartaylor e8077d2f1c Preserve verified nightly success and scope automatic signer actors 2026-11-22 23:41:31 +01:00
skylartaylor 646d4c0619 Fix nightly signer review races and actor admission 2026-11-22 21:41:44 +01:00
skylartaylor b226fe6d92 Bound release-ref signer outputs to owned job paths 2026-11-22 20:44:12 +01:00
skylartaylor 5907e9d432 Add Windows release-ref nightly signing pipeline 2026-11-22 20:24:13 +01:00
skylartaylor a8b0f81950 fix(nightly): preserve recovery state and default to scheduled calls 2026-11-22 15:03:01 +01:00
skylartaylor eddc138cd2 Harden nightly artifact and publication boundaries
Correct review findings across signing handoffs, artifact transport, policy evidence, extraction and publisher receipts. Pause privileged legacy diagnostics without changing stable releases. Keep pruning disabled and record quota-bounded proof work as an activation prerequisite.
2026-11-22 05:45:36 +01:00
skylartaylor d2df2c59b2 Harden nightly file reads, signing calls and runtime parsing 2026-11-22 00:11:55 +01:00
skylartaylor 9f8925e2ff Define reviewed nightly CI applicability and authenticated Sonar checks 2026-11-21 19:01:22 +01:00
skylartaylor b04b47f6a0 WIP: bind signed v2 publication and durable owned-nightly pruning 2026-11-21 17:38:08 +01:00
skylartaylor faf012d078 WIP: isolate required nightly signing and prepare baseline and pruning helpers 2026-11-21 17:22:26 +01:00
FredApps 438b785997 ci: validate native Cargo runner semantics with tiny fixtures (#287)
* ci: validate native Cargo runner semantics with tiny fixtures

* test: separate doctest runner context without weakening allowlist
2026-11-19 13:02:16 +07:00
FredApps 5e475d5d1e ci: audit implicit-host FreeBSD runtime planned-unit reuse (#286) 2026-11-19 12:46:00 +07:00
FredApps a44bf91fb5 ci: measure planned FreeBSD prebuild target projection without compiling (#285) 2026-11-19 12:33:12 +07:00
FredApps 0be61baefd ci: measure native bootstrap while preserving workspace features (#284)
* ci: guard a bounded native geometry measurement with exact planned closure

* ci: preserve workspace features while measuring native browser bootstrap
2026-11-19 12:20:14 +07:00
FredApps b5c6f5913e ci: compare planned Photo units on native FreeBSD without builds (#283)
* ci: compare planned Photo units on native FreeBSD without builds

* ci: verify transferred source without overriding Git ownership guard
2026-11-19 11:59:33 +07:00
FredApps 2317dca7b2 test(ci): prototype bounded libtest subprocess fixtures (#280) 2026-11-19 11:01:46 +07:00
FredApps ce7c74f743 cut_release: a minor bump follows stale path versions and versioned lock names
Two apps stopped at the lock check on a minor release. pdfcraft names its
crates at 0.21.0 beside a 0.21.1 workspace, so the path dependencies were
not bumped. vectorcraft has its own crates from an older git revision in
the graph, so Cargo.lock names the version in dependency lists.
2026-11-14 21:49:43 +01:00
FredApps 3eaa8798ac release_train: --logs is a relative folder inside the current directory (#214)
Closes SonarCloud's path-injection alert on the merged release_train.py (pythonsecurity:S8707):
an absolute path, .., or anything outside the working directory is refused before the folder is
made.
2026-11-12 21:52:12 -05:00
FredApps 840a417e3d Release: scripts/cut_release.py cuts a release from green main without a bump pull request (#207)
* Release: scripts/cut_release.py cuts a release from green main without a bump pull request

On 11 Nov 2026 the release of 14 apps took most of the day. A large part went to version-bump pull
requests that changed only version strings yet waited on the full CI of a pull request (1-2 h of
FreeBSD, sharded SonarCloud coverage), and to rerunning it. The script commits the bump on the
newest main commit whose CI passed, merges it into release (which starts release.yml), opens the
same bump for main as its own pull request, and with --publish publishes the draft once the run
passed and has assets. Tests cover the bump: workspace and path-dependency versions, only the
workspace's own Cargo.lock entries, CRLF files, the repository hook.

* cut_release: review fixes

- A trailing comment after the workspace version stays; the value alone is replaced.
- Cargo.lock: only the workspace members' entries (cargo metadata --no-deps) change, not a local
  path dependency outside the workspace that shares the version.
- Cargo.lock is checked with a resolving cargo metadata --locked, on the bump, on release after
  the merge and on the sync branch; --no-deps never compared it with path dependency versions.
- --publish refuses a draft with fewer assets than the last release (a skipped build job leaves
  the run green), unless --allow-fewer-assets.
- The sync PR never moves main backwards: versions compare as numbers, and a main at or past the
  release gets none.
- A failed auto-merge says so, with the PR to merge by hand.
- Arguments that reach git or gh are checked first (owner/name, version, commit hash, workflow,
  title), so none can be read as an option. git, gh and cargo are required up front.

* Release: scripts/release_train.py releases many apps at once with cut_release.py

Every app in parallel, a log per app, and one summary line each (published, pushed, or stopped
and why); one app stopping doesn't stop the rest. Tested on figcraft and soundcraft with
--dry-run (both done in under a minute).

* tests: release_train options before -- in the test

* release_train: only owner/name repos and known cut_release.py options reach the subprocess
2026-11-11 23:02:43 +01:00
Dylan M. Taylor 1304973f86 Keep development builds off stable OCI tags 2026-11-03 00:01:47 -05:00
Dylan M. Taylor f76b6b82d2 Fix Linux signing rollout and review findings 2026-11-03 00:00:15 -05:00
Dylan M. Taylor 96b8516a40 feat(release): sign every Linux package format with LINUX_SIGNING_KEY
A new optional LINUX_SIGNING_KEY secret (an unprotected OpenPGP signing subkey, from the
release environment) signs each Linux format the way its tools check it:

- rpm: embedded signature (rpmsign), for `rpm -K` and dnf/zypper gpgcheck
- deb: embedded _gpgorigin member (debsigs) and a detached .asc
- Arch: <file>.sig, which pacman looks for
- AppImage, tar.gz, zsync: detached .asc
- Flatpak bundle: signed commit and embedded public key (flatpak-bundle.sh, via the
  scaffold's new step 4), so `flatpak install` verifies it, plus a detached .asc
- Flatpak OCI image: a containers/image signature for ghcr.io/<repo>@<digest>, which Flatpak
  checks from its signature lookaside; the flatpak job records the pushed manifest for it
- SHA256SUMS.txt.asc over every release asset, and release-signing-key.asc

The draft-release action signs before computing checksums (embedded signatures change the rpm
and deb files) and verifies every signature against the exported public key. The new
import-signing-key action is shared by the flatpak and release jobs and refuses a key that
needs a passphrase. Without the secret, releases are published unsigned with a warning.
2026-11-02 20:55:58 -05:00
Dylan M. Taylor bdbd1e7f5e fix(flatpak): no OCI update source for prereleases; match --repo-url exactly
- A prerelease bundle (a version with `-`, as resolve-version marks it) gets no --repo-url: the
  OCI index serves only the latest stable release, so Flatpak would replace the prerelease
  with that older build. The generated script clears OCI_REPO for such a version and passes
  ${OCI_REPO:+--repo-url="$OCI_REPO"}.
- --verify passes only with the exact URL, the prerelease guard and the option on the active
  build-bundle command; a commented-out command never matches, nor is it edited.
- A script that already sets OCI_REPO or its own --repo-url fails the scaffold instead of being
  reported ready or overwritten.
- The OCI export assertion matches the whole line (CodeRabbit).
2026-11-02 19:46:48 -05:00
Dylan M. Taylor 7e8c2b6c7c feat(flatpak): make bundle installs update from the ArtCraft OCI repository
scaffold-flatpak-oci.sh now also adds --repo-url=oci+https://getartcraft.com to each app's
.flatpak build-bundle command, and --verify reports it. A bundle installed with that URL gets an
origin remote that updates from the OCI index, which points Flatpak at GHCR. Installing such a
bundle over an existing bundle install rewrites the existing origin's URL in place, so existing
users switch over on their next bundle update without a reinstall.
2026-11-02 19:24:22 -05:00
Dylan M. Taylor 09f920c3f4 feat: add Flatpak OCI repository scaffolding script and tests (#115) 2026-10-31 15:43:24 -04:00