macos: faster snapshot hydration + job-side wait (WAIT=job); no custom base image exists; forgejo-nsc cdb29359 #159

Merged
founder merged 1 commit from claude/w6-macos-image into main 2026-08-19 07:26:41 +00:00
Owner
  • Custom macOS base image: not possible today (evidence in docs/infrastructure/namespace-macos-custom-image.md).
  • Snapshot Application hydration 67 s → ~35 s (seeded nix.custom.conf, tmutil shim scoped to the installer, optional bundled installer, payload_hash in the pin). Live-verified on stock 6x14.
  • Job-side expected + wait in ensure-nix.sh for forgejo-nsc WAIT=job (runner registers before the app finishes; first job ~60 s earlier); pin bump + macOS target env.

Adversarially reviewed (LAND). Needs: producer run → pin PR; deploy-forge-host.

🤖 Generated with Claude Code

- **Custom macOS base image: not possible today** (evidence in `docs/infrastructure/namespace-macos-custom-image.md`). - Snapshot Application hydration 67 s → ~35 s (seeded `nix.custom.conf`, `tmutil` shim scoped to the installer, optional bundled installer, `payload_hash` in the pin). Live-verified on stock 6x14. - Job-side `expected` + wait in `ensure-nix.sh` for forgejo-nsc `WAIT=job` (runner registers before the app finishes; first job ~60 s earlier); pin bump + macOS target env. Adversarially reviewed (LAND). Needs: producer run → pin PR; deploy-forge-host. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
macos: faster snapshot hydration (seeded daemon conf, tmutil shim, bundled installer), job-side wait for WAIT=job; no custom base image exists
All checks were successful
Namespace: Build Images / Refresh macOS runner lane (push) Successful in 3s
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 32s
Namespace: Build Images / Refresh Linux runner image (push) Successful in 41s
Build: Web / Build (Web) (pull_request) Successful in 42s
Release: Signing Preflight / Release (Signing Preflight) (push) Successful in 55s
Build: KaiOS / Build (KaiOS) (push) Successful in 23s
Build: Web / Build (Web) (push) Successful in 39s
Deploy: Web / Deploy (Web) (push) Successful in 2m27s
Deploy: API / Deploy (API) (push) Successful in 2m50s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 2m45s
Namespace: Build Images / Refresh macOS Nix snapshot application (push) Successful in 1m27s
Release: If Needed / Check (Release Needed) (push) Successful in 6m8s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 6m10s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Successful in 41s
Build: Apple / Check (SwiftLint) (push) Successful in 2m54s
Build: Apple / Build (visionOS) (pull_request) Successful in 1m3s
Build: Linux / Build (Linux x86_64) (push) Successful in 6m26s
Build: Linux / Build (keystore-forge x86_64) (push) Has been skipped
Build: Apple / Build (macOS) (pull_request) Successful in 2m52s
Build: Apple / Build (iOS) (push) Successful in 45s
Build: Apple / Build (visionOS) (push) Successful in 30s
Build: Apple / Build (macOS) (push) Successful in 2m44s
7dd7ce9f5b
Answer to "macOS custom base image": NO self-serve capability exists —
nsc 0.0.557 has only `nsc macos package`, Compute v1beta has no snapshot/
capture RPC, `experimental.macos_base_image_id` is a Namespace-side tenant
lookup (NotFound for anything we tried), `image.with=xcode-beta` does not
exist for 27.x; documented with evidence in
docs/infrastructure/namespace-macos-custom-image.md.

So squeeze the Application path instead (measured step by step on stock
27.0 6x14 instances; hydration was 67 s: APFS volume 13 s, users 3 s,
`tmutil addexclusion` 22 s, daemon 10 s, our nix.custom.conf append +
kickstart 9 s, import 4 s):
- entrypoint seeds /etc/nix/nix.custom.conf BEFORE the Determinate
  installer (v3.21.9 keeps an existing custom conf: CreateOrMergeNixConfig
  with an empty pending config), so no append/kickstart afterwards (-9 s);
- a `tmutil` shim on the two installer invocations' PATH writes the same
  com.apple.backupd exclusion xattr the real tmutil sets (-22 s; TM never
  runs on these VMs); removed right after install;
- optional --bundle-installer (Mach-O + sha256 in the manifest) so the
  package carries its own installer; payload_hash in the pin (entrypoint +
  daemon settings + bundle flag) so --skip-if-unchanged rebuilds on
  payload changes.
  Live: install 30 s + import 4 s (was 67 s), seeded conf kept verbatim,
  idempotent re-runs.
- job side: nix-snapshot-state.sh gains `expected` (derived from the
  dispatcher's KEYSTORE_NSC_MACOS_APPLICATION_{READY_FILE,READY,PENDING});
  ensure-nix.sh waits (90 s start grace) when a snapshot is expected but
  no marker exists yet — closes the installer race for forgejo-nsc's
  WAIT=job mode.
- forgejo-nsc pin bump to the merged WAIT=job rev; the macOS autoscaler
  target sets KEYSTORE_NSC_MACOS_APPLICATION_WAIT=job (ignored by older
  dispatchers).

The main push re-runs the producer (ENABLED=true) → new image; its pin
lands as a follow-up PR; deploy-forge-host rolls the dispatcher.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
founder deleted branch claude/w6-macos-image 2026-08-19 07:26:41 +00:00
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!159
No description provided.