Compare commits

..
Author SHA1 Message Date
skylartaylor 16610b20b1 nightly: fix the launcher, Windows build and profile-probe review findings
- Both Linux launchers dispatch the Launcher's protocol and a bare version query before the
  XDG_DATA_HOME/HOME guard, so neither is refused for a HOME it never reads.
- `nightly.ps1` builds into the `-TargetDir` its archive steps read.
- The writable probe retries on a leftover file with its name and removes only the file it created.
- The planted-record-link test writes at RECORD rather than a sibling name, so it exercises the
  alias it plants.
2026-11-25 01:05:43 +01:00
skylartaylor f0c68d6d2c nightly: read the built commit only from a lower-case version
gate / gate (ubuntu-24.04) failed channel::tests::the_commit_is_read_back_only_from_a_nightly_version:
`commit_for` used `is_ascii_hexdigit`, which also accepts A-F, so `...gABCDEF012345` read back
as a commit although the producer's version pattern is lower-case. The check now takes digits
and a-f only, as the nightly version pattern already requires.
2026-11-25 00:59:42 +01:00
skylartaylor 45d59d1487 nightly: enforce the signing guard and read the whole push mapping
- `nightly_compile_gui` calls `nightly_refuse_signing_env` before cargo, so an exported signing
  key cannot reach the compiler or any dependency build script. The helper existed but no path
  called it.
- The candidate-workflow check reads the whole `push:` mapping by indentation instead of a
  contiguous run of non-empty lines, so a `paths:`/`paths-ignore:` filter after a blank line is
  still rejected; a negative fixture covers that layout.
2026-11-25 00:57:24 +01:00
skylartaylor 2dfba46227 nightly: make the app_dirs tests independent of the host's separator
gate / gate (ubuntu-24.04) and SonarCloud's coverage shard 2 both failed on
`each_platform_keeps_its_published_folder`: it compared a `join`ed path against a literal with
Windows backslashes, so on Linux the function's `C:\\.../GridCraft` never matched. Both
tests now build their expectation with the same `PathBuf::join` on the same base, and the
`cfg!(windows)` home switch is gone, so they hold on either host.
2026-11-25 00:49:14 +01:00
skylartaylor bfc5a35ed7 nightly: pass set_token_root itself to and_then (clippy redundant_closure) 2026-11-25 00:29:55 +01:00
skylartaylor 04198c771d nightly: if-then-else for the imported signing identity (SC2015)
shellcheck reads `A && B || C` as a possible false branch. The identity and keychain
checks are now an explicit `if`, with the same behaviour and message.
2026-11-25 00:29:55 +01:00
skylartaylor c1e55f8d27 Nightly: keep Dylan's callers, fix rustfmt, ship the kit's tar layout
- Put his nightly.yml, nightly-sign.yml and installed signing policy back byte
  for byte (no `false &&`, his five manual actors, his 605d5876 pin), and drop
  our dormant duplicates: nightly-dispatch.yml, the policy template and the
  actionlint waiver that only hid the `queue:` key he removed.
- Adapt nightly-release-tests.py to the enabled pair: no schedule, his exact
  context guards, the release managers in caller and policy, one pin, the
  installed policy's fields and platforms, plus this branch's guards for the
  committed Linux key and the Sonar fixture scope.
- cargo fmt --all (17 hunks in 7 files); clean under rustfmt 1.10 and 1.100.
- Flat nightly tar uses the kit layout: `gridcraft` is the launcher and
  `gridcraft-bin` the GUI it starts, and the launcher never starts itself.
- docs: his go-live doc, one stale sentence corrected, plus a flavor section.
- Drop the unused GRIDCRAFT_CONFIG_DIR stable knob; an empty XDG_CONFIG_HOME
  now falls back to ~/.config.
2026-11-25 00:08:19 +01:00
skylartaylor f59fdf3e84 Linux nightlies: start every format through the flavor's launch profile
Dylan's ports keep the nightly identities but start the GUI directly, and a nightly build
refuses to start without --launch-profile nightly-v1 --profile-root <dir>. Ship the launcher
every Linux nightly format needs, so an installed, extracted or sandboxed nightly never runs
against the stable profile (his remaining re-review items close with it).

- deb/rpm: usr/bin/gridcraft-nightly is a launcher; the GUI moves to
  usr/lib/gridcraft-nightly/gridcraft, which nfpm.yaml carries with mode 0755. A stable stage
  has no such file, so the three-line entry is dropped and the rendered stable nfpm.yaml stays
  byte-identical to his head.
- AppImage: AppRun is a script, not the usr/bin/gridcraft symlink, and usr/bin/gridcraft-nightly
  is installed beside it; the desktop Exec/TryExec name the launcher.
- Arch handoff: nightly-arch-launch.sh passes the profile tokens instead of relocating the four
  XDG folders (the profile holds settings, logs, the control token and the session record).
- Flatpak: bin/gridcraft-nightly is installed and is the manifest's command: and the desktop
  entry's Exec/TryExec. profile_root now accepts that package's own id
  (ai.storyteller.gridcraft.nightly) and still refuses the stable id and every other one.
- plain tarballs: bin/gridcraft-nightly in package.sh's tree and gridcraft-nightly in the flat
  nightly.sh archive, which nightly-archive.py now requires.

The profile root is ${XDG_DATA_HOME:-$HOME/.local/share}/gridcraft-nightly/profile in every
format; it sits beside, never inside, the stable rows.

Also from the re-review: the nightly metainfo no longer lists mediatypes and names the launcher
as its binary, the nightly desktop file and metainfo are validated now that the tools are
present, and nightly-common.sh passes GRIDCRAFT_VERSION on the build command as well as
inheriting it and checks the exact identity the binary prints (with the output in the message).
packaging/linux/nightly-linux-launch-tests.py runs the launcher in both moved-tree layouts and
stages deb, tar and AppImage with stub nfpm/appimagetool/strip, so the wrappers are tested
without cargo; nightly-arch-tar-test.sh asserts the launcher argv.

Builds on dylanmtaylor's co-installable Linux packages (#4733, @dylanmtaylor).

skylartaylor <skylartaylor@users.noreply.github.com>
2026-11-24 23:19:36 +01:00
skylartaylor 6157356c1a Nightly: app-side flavor, Windows and macOS packaging, dormant release callers
Give GridCraft the isolated nightly-v1 channel from the nightlies-lead kit, rebased on
dylanmtaylor's #4733 head: his Linux tar, shared helpers, Arch wrapper and Flatpak/nfpm
changes stay his and are not re-authored here (thanks, Dylan). This commit adds the app
side, Windows and macOS packaging, and the dormant release registration.

App side:
- build.rs selects the channel (GRIDCRAFT_BUILD_CHANNEL), refuses any other value and
  requires the prepared GRIDCRAFT_VERSION for a nightly, which becomes the PE
  ProductVersion and the version the app reports.
- launch_profile.rs implements the Launcher protocol (--launch-profile nightly-v1
  --profile-root <abs> -- files…, separate tokens only) and answers both --version forms
  before any root, log, identity, IPC or window work.
- profile_root.rs fences every stable data root per OS (settings and logs, the control
  token folder, both MSI install folders, the XDG folders plus the system installs and the
  Flatpak row, the four macOS Library rows and the bundle), refuses GRIDCRAFT_CONFIG_DIR,
  an inherited FLATPAK_ID, traversal and alias escapes, and proves the profile writable.
- app_dirs.rs is the single data-root resolver: validated profile, then GRIDCRAFT_CONFIG_DIR,
  then the platform default; ui.json, prefs.json and logs follow it.
- nightly_session.rs keeps a lease and an unclean-exit record, finished in on_exit (the only
  path macOS ⌘Q runs before AppKit ends the process).
- process_identity.rs sets the nightly Windows AUMID before any window; stable never does.
- A nightly skips the updater, the control server (and refuses --control), and the inherited
  control variables; the control-token folder can be pointed at the profile.
- ui-egui gains the channel (app id, name, version, commit, window titles, stable-only
  services), which About, File ▸ Account, window titles and the updater guard use. The
  window keeps a Flatpak package's own id when FLATPAK_ID is set (#4733).
- gridcraft-cli refuses the Launcher profile flags with exit 2.

Packaging: packaging/windows/nightly.ps1 with package.ps1 -Nightly and sign.ps1
-Required/-CheckOnly/-CheckBuildEnvironment; macOS nightly.sh, nightly-lib.sh,
nightly-sign.sh, nightly-verify.sh and nightly_plist.py; the nightly icon set rendered
from a deeper-field vector master by packaging/nightly-icons.py, with provenance. The
Linux tar now stages that icon (one line changed in Dylan's script).

Release: dormant nightly.yml, nightly-sign.yml and nightly-dispatch.yml (literal false &&
everywhere), the v3 policy example with no authority, the stable Linux public key,
actionlint's queue suppression, the packaging-lint source-contract job, sonar.sources
plus the exact fixture scope, and packaging/nightly-release-tests.py. Dylan's enabled
callers, installed policy and shorter docs are superseded so the port lands switched off;
the policy content stays in his branch for the enable PR.

skylartaylor <skylartaylor@users.noreply.github.com>
2026-11-24 22:45:57 +01:00
Dylan M. Taylor 98641eae37 packaging: port nightly.sh helpers and fix PR review/CI issues 2026-11-24 16:18:22 -05:00
Dylan M. Taylor b665e351c1 fix(nightly): fix CI lint/lockfile and address review comments 2026-11-24 14:21:57 -05:00
Dylan M. Taylorandskylartaylor abc551f88f ci(nightly): enable supervised manual nightly runs
Ported from storytold/photocraft#16594 by Skylar (@skylartaylor), adapted for GridCraft:
- Add .github/nightly-signing-policy.json (v3 policy for storytold/gridcraft, repo ID 1408285582, CI workflow 380135773, Sonar project storytold_gridcraft; producer_workflow_id left null until nightly.yml lands on main)
- Add .github/workflows/nightly.yml and .github/workflows/nightly-sign.yml for supervised manual workflow_dispatch runs pinned to craft-common-actions@605d58766e8f536564da8fc81d3676ac86816dea
- Add docs/nightly-release-preparation.md and packaging/nightly-release-tests.py

Credit: Skylar (@skylartaylor), storytold/photocraft#16594

Co-authored-by: skylartaylor <hi@skylar.cc>
2026-11-24 14:14:33 -05:00
Dylan M. Taylor 8007e842b9 packaging(linux): support co-installable nightly packages 2026-11-24 13:33:42 -05:00
5 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -8,13 +8,13 @@ workflows:
'.github/workflows/house-rules.yml': []
'.github/workflows/lockfile.yml':
- 'actions/checkout@v7.0.1'
- 'step-security/harden-runner@v2.23.0'
- 'step-security/harden-runner@v2.22.4'
'.github/workflows/nightly-sign.yml': []
'.github/workflows/nightly.yml': []
'.github/workflows/nix.yml': []
'.github/workflows/packaging-lint.yml':
- 'actions/checkout@v7.0.1'
- 'step-security/harden-runner@v2.23.0'
- 'step-security/harden-runner@v2.22.4'
'.github/workflows/release.yml': []
'.github/workflows/sonarcloud.yml': []
'.github/workflows/windows-arm64.yml': []
@@ -24,8 +24,8 @@ dependencies:
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'step-security/harden-runner@v2.23.0':
ref: 'v2.23.0'
commit: 'sha1-aebdcf6156ab6691adf63218240e476564a1ed4c'
'step-security/harden-runner@v2.22.4':
ref: 'v2.22.4'
commit: 'sha1-1d88384fd173af6ecb012dfd0264a306b711241a'
owner_id: 88700172
repo_id: 422287306
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.23.0
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@v7.0.1
+1 -1
View File
@@ -33,7 +33,7 @@ jobs:
checks: read
attestations: write
id-token: write
uses: storytold/craft-common-actions/.github/workflows/nightly-release.yml@1754016e67ca9b74dfa4cf4678b2ac3548e9840f
uses: storytold/craft-common-actions/.github/workflows/nightly-release.yml@605d58766e8f536564da8fc81d3676ac86816dea
with:
tooling-revision: 605d58766e8f536564da8fc81d3676ac86816dea
producer_run_id: ${{ inputs.producer_run_id }}
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
actions: read
attestations: write
id-token: write
uses: storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml@1754016e67ca9b74dfa4cf4678b2ac3548e9840f
uses: storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml@605d58766e8f536564da8fc81d3676ac86816dea
with:
tooling-revision: 605d58766e8f536564da8fc81d3676ac86816dea
app-name: gridcraft
+2 -2
View File
@@ -30,7 +30,7 @@ jobs:
contents: read
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.23.0
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@v7.0.1
@@ -47,7 +47,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.23.0
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@v7.0.1