Repository navigation
Add MacBook Neo installation and native Recovery setup - #57
Conversation
cec4ef8 to
f8e48bf
Compare
maralcbr
left a comment
There was a problem hiding this comment.
Reviewed at 880fff8. Requesting changes: there is a root-helper auth hole, several rollback gaps on boot and account state, and a handful of policy changes that need maintainer sign-off before this leaves draft.
Must fix
-
The helper creates a root-level admin account with no owner authorization.
ClosedEngineHelperServer.swift:182: unlikesubmitandremoval,recoveryAccount()never validates aMachineOwnerAuthorization.- After
inspecthands back a ticket,preparecreates uid 501 in the stub's admin group with a password the caller chooses, andfinalizegrants it a SecureToken and runsupdatePreboot. - The app UI only calls
inspectandhandoff, soprepareandfinalizeare reachable but unused. build-developer-pkg.shinstalls a root LaunchDaemon from an ad-hoc build whose client requirement is justidentifier "<app id>"(build-app.sh:72). Any local user can sign a binary with that identifier, claim the stub, and the real owner's attempt then fails with "already has a different recovery account".- Fix: drop
prepareandfinalizefrom the XPC surface, or require owner authorization and pin developer clients to a real signing identity or cdhash.
- After
-
Remove Omarchy is locked out once Stage 1 completes.
RecoveryAccountHandoff.discover()returns any live Stage 1 completion journal and never checks whether Recovery step 2 finished.recoveryAccounttherefore stays set, andcanChangeChannel(InstallerSession.swift:82) stays false.- "Remove Omarchy…" (
OmarchyAppleInstallerApp.swift:197) stays disabled, and the page shows onlyRecoveryHandoffView. - This hits both abandoned installs and completed ones. Removal eligibility shouldn't depend on channel eligibility, and discovery needs to tell pending setup apart from a finished install.
-
One unusable journal breaks inspection.
discover()callscompletedEvidencewithtry, which throws for any outcome other thanawaiting_recovery, a short transcript, or a missing evidence file.- The failure surfaces in
InstallerSession.swift:236:inspect()drops into.unsupportedand loses the existing-install/removal guidance. - Every
.attachInstallationMediacompletion and every shell-only legacy payload routes to "Installation could not be verified" (InstallerSession.swift:765). - Fix: skip unusable journals inside
discover(), and don't let aninspectRecoveryAccountfailure override the existing-install phase.
- The failure surfaces in
-
Rollback gaps can leave the target in an inconsistent boot or login state.
RecoveryActions.swift:364-389: thebputilchange and the iSCPrebootdittorun outside any rollback, anddittomerges into the existingvarrather than replacing it.- In the same block, Stage 2 is restored only when
kmutilfails, not whenatomic()fails after the swap.journal.json,isc-var.beforeandrestore.jsonare written but never read. RecoveryAccountCore.swift:699-749: Preboot metadata is backed up and itsschgflag cleared beforeupdatePreboot -od. Neither the backup norschgis ever restored, so a timeout or partial failure leaves the paired Recovery metadata half-written and unprotected.RecoveryActions.swift:393-413:.IAPhysicalMediais removed before the version metadata is restored and the completion receipt is saved. A power loss in that window loses the "Finish Installation" autolaunch with nothing recording completion, and account setup needs that receipt.
-
Recovery tests never run. Nothing invokes
AuthorizationCheck.c,EnrollmentGateCheck,BootstrapOwnerCheck,RecoveryOwnerCheck,BootSelectionCheck,InstallerLogCheckorLogTextViewCheck;Recovery/build-app.shruns only the configuration and baseline checks.RecoveryAccountCoreis covered only by the manualDevelopment/RecoveryAccountQualification. -
Notarization will likely fail.
Packaging/build-app.sh:289re-signs the bundled Recovery template without--options runtime. The outer app is signed without--deep, so the nestedOmarchyRecoveryexecutable is never hardened. -
Neo audio packages reuse the stock package names.
image-builder/audio/build-packages.py:110,117buildsalsa-ucm-conf-asahiandasahi-audioas10.aurora1-<hash>and4.1.aurora1-<hash>.- Any newer repo version (e.g.
4.1.1) replaces them onpacman -Syu, the J700 UCM/DSP profiles disappear and Neo audio goes silent. These changes should go to the upstream packages, not into forked copies. - The commit-pin checks (lines 41-42) are
asserts, whichpython3 -Oskips. - The
unit.replace(...)edits (lines 84-88) do nothing, with no error, if upstream text drifts, which would drop-C AppleJ700.
- Any newer repo version (e.g.
Policy changes that need maintainer opt-in
- Weaker boot policy than the legacy path. Native enrollment runs
bputil -nca(RecoveryActions.swift:364), where the legacy step2 runs-nc(omarchy_asahi.py:187,296). The extra-alifts the boot-args restriction, but the UI still says "Your macOS security settings are unaffected" (Recovery/Sources/main.swift:606). - Persistent admin account on the stub. Native installs now require it: uid 501 in staff/admin, a SecureToken AuthenticationAuthority written by hand via
dscl -mergerather thansysadminctl, Preboot plists overwritten andschgnever put back. Its credential lifecycle needs an explicit decision. - Common Stage 1 on every board. When
esp/aurora/stage1.binis in the image,install_board_stage1/board_stage1(omarchy_asahi.py:470-498) use it on every device class.- That bypasses J613's
os_firmware="26.6.2"gate and drops J700's 5000 ms window to 0. - It also replaces asahi's Stage 1 on M1, M2 and M3, decided by what the image contains rather than by board qualification. Needs sign-off from Chris and Ryan.
- That bypasses J613's
- Neo peripherals now block the install. Radio and Touch ID failures (
omarchy_asahi.py:728-773) were previously warnings.- The radio path hard-codes a timestamped PTX name, so a point release that renames it fails every Neo install.
- Touch ID calibration is documented as not yet hardware-qualified, yet a parse failure refuses the install.
- Native Recovery GUI turns on implicitly. It's selected just because the manifest is in the payload (
omarchy_asahi.py:1975), whileRecovery/README.mdsays the template must declarerecovery_gui. - Neo default firmware. 26.6.2 wins even when another version is offered (
test_omarchy_firmware.py:147), which contradicts the patch comment.
Minor
- Firmware ordering is unused and would break things once wired.
image-builder/firmware-ordering/is never installed or tested, despite the README's claim.- As written, it blacklists
aopeverywhere and loads it only fromExecStartPost. A failed vendor-firmware service then loses AOP mics and ALS on non-Neo Macs too. - On a Neo with a missing firmware file,
aurora-peripheral-firmware.shexits 1, which fails the service.
- As written, it blacklists
- Removal is no longer atomic (
omarchy_asahi.py:1275-1281). Root, boot and ESP are erased beforedeleteContainer, so if that fails the stub is left with no ESP and the retry reports that the approved install changed. - Recovery app template (
RecoveryAccountHandoff.swift):- It is copied from a hard-coded
/Applications/<name>.apppath and checked withcodesign --verifywithout-R. - Updates are skipped when only resources or
Info.plistchange. AppBackups/<uuid>.appis never pruned on the small stub volume.
- It is copied from a hard-coded
omarchy_recovery.py:245,282-290isn't idempotent. The app is published withos.replacebefore the launcher and marker. If either write fails, reruns stop at "already exists".- Two owner sources.
resolveOwnerreadslistUsers <systemUUID>, whilerequireOwnershipreads<dataUUID>. A hardware check is needed on which keybag Startup Disk updates. Authorization.c:- The pty fds aren't
O_CLOEXEC. - On timeout it kills only the direct child, not the process group, so kmutil/bputil helpers can outlive it.
- The pty fds aren't
- Password copies aren't wiped. The Swift
String/Datacopies of the password are never zeroed. - Private APFS call.
account-volume.ccalls the privateAPFSGetVolumeGroupIDthrough a guessed prototype, with no OS-version guard. - Source lock. It leaves out
test_omarchy_als.py,test_omarchy_isp.pyandtest_omarchy_recovery.py. - Build tooling. Building the Recovery template needs
xcodebuildmcp, so release hosts without it can't package.
Checked, no problems found
- Offline bundling: bundled artifacts are still checked against the catalog's size and hash before and after copy, and a missing file fails with no download fallback.
- Credentials and C code: passwords never reach argv, env or logs, and the C buffers are bounds-checked.
- Board gating: Neo stays gated by the signed catalog, and the
j614sexclusion still holds. - Archive and firmware extraction: archive
..members are rejected, and the ISP/ALS extraction and mesa DER bounds look right. - Test runs: the Python overlay tests pass (307), as do the engine and bless-version tests (44) and the offline packager tests (6).
a3647de to
8994430
Compare
8994430 to
19767f1
Compare
Add developer-gated J700 installation, firmware extraction, an Omarchy-branded Recovery app and recovery-account ownership handoff. Preserve per-device repair payloads, offline artifact verification and interruption recovery for boot and account metadata. Keep public model restrictions and explicit template qualification. Co-authored-by: Scott Jones <scottajones@gmail.com> Co-authored-by: Eryk Wieliczko <github@wieliczko.ninja> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
19767f1 to
ddaa53b
Compare
Keep optional radio collection failures nonfatal and pin the reproducibly repacked .42 engine. Build the standalone Recovery app and preview in macOS CI, including its authorization, journal, owner and UI fixtures. Add “Skip, Restart Now” to recovery-account setup. Verify the installed startup bundle, persist the deferral and restart directly while retaining account setup for a later Recovery visit. Preview builds simulate the restart. Cover rejected unfinished setup, persistence failures and restart ordering with a pure fixture. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Use the same target-volume mount update as enrollment before saving the deferred account choice. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
maralcbr
left a comment
There was a problem hiding this comment.
Re-reviewed at 440064a against my 880fff8 review. Big improvement: the helper auth hole, removal lockout, journal discovery, Recovery tests in CI and hardened Recovery signing are fixed, and rollback/resume is reworked. The items below remain.
Must fix before release
Engine/overlay/bin/omarchy-restore-imagehas incomplete, non-reproducible provenance. It's a 10.7 MB arm64 Mach-O, ad-hoc signed asa.out.source-lock.jsonpins only its hash, andomarchy_apple_aea.py:16-18names an engine source directory and recipe that aren't in the repo. It decrypts macOS 26 restore images (keys from Apple's FCS service), and the stub boots the output. It's used beyond the Neo: J613/J615 on 26.6.2 as well as J700. Please add the source repo, commit and a reproducible build recipe (or build it in CI), and document the new network dependency.- "Skip, Restart Now" can return to macOS with no guided way back.
skipRecoveryAccountAndRestart()(RecoveryActions.swift:638) restarts withoutbless --setBootand without checkingtargetIsDefaultBoot(). The installed receipt suppresses the macOS-side handoff (RecoveryAccountHandoff.swift:326,350-375), and.IAPhysicalMediais already gone, so the Recovery app no longer autolaunches. Manually reopening the Recovery app does resume account setup (main.swift:62-74), but nothing tells the user to. Either set or verify the boot target before restarting, or show explicit instructions for coming back.recoveryAccountDeferredis written but never read. (Where the restart lands, and what Startup Disk allows without the account, isn't hardware-verified.) - Common Stage 1 can refuse supported Macs. If an image ships
esp/aurora/stage1.bin,omarchy_asahi.py:470-492refuses every board/firmware pair missing fromqualified_machinesinstead of falling back to asahi's Stage 1. Catalog coverage of M1/M2/M3 is unchanged, but installs would narrow. The currentbuild6-m123-neo.shdoesn't ship it, so this blocks only once an image does. For pairs outside common-image qualification, keep the existing per-board selection: the J613/J700 overrides, and upstream Stage 1 everywhere else.
Should fix
- Two sources for the same packages.
image-builder/audio/build-packages.pystill buildsaurora-audio/alsa-ucm-conf-aurorawith different metadata from omarchy-pkgs#1101: a hex pkgrel andreplaces=asahi-audioon a stock name, which #1101 deliberately dropped.image-builder/firmware-ordering/duplicatesomarchy-aurora-firmwareand has already drifted (regulatory.db, optional policies). Delete both and consume the packages. - Audio fallback.
build-mac-imagequalified()(:774-793) falls back to stockasahi-audiowhen the candidate set lacksaurora-audio, so a Neo image can build without Neo audio support. It should fail for Neo images. - Durability. Rollback/resume is implemented and fixture-tested, but complete power-loss durability isn't proven.
RecoveryDirectorySwap.swift:24-30flushes the parent but not the copied contents, andRecoveryFileTransaction.swift:120-127flushes only files that existed before, not new ones. .aurora-var-before-<op>on iSCPreboot is never cleaned up after a successful install.test_an_encrypted_image_is_attached_decrypted_on_any_running_macosfails under the default macOS TMPDIR (/varvs/private/var).
Policy still open (maintainer opt-in)
- Persistent admin uid 501 on the stub, with SecureToken via
dscl -merge: the credential lifecycle needs a decision. schg is now restored. - No password minimum. Beyond non-empty,
validatePassword(RecoveryAccountCore.swift:173) sets no minimum length for that SecureToken admin. macOS's owndscl -passwdand verification still apply. - Handoff without fresh owner authorization.
handoffstill replaces the stub's Recovery app as root (pinned template,ClosedEngineHelperServer.swift:224-227). - Helper install fallback. When there's no SMJobBless declaration, it installs through an admin
do shell script(cdhash-pinned). - Neo speaker protection. The Neo replaces feedback protection (speakersafetyd) with feed-forward speakerguardd.
- J700 Stage 1 window. When a common Stage 1 image is supplied and J700 is explicitly qualified, its window changes from 5000 ms to 0 ms (the per-board image keeps 5000 ms).
- Neo default firmware. 26.6.2 still wins for J700 when 26.6 is offered (
test_omarchy_firmware.py:147), contradicting the patch comment. - Engine bump. The release engine moves
.28→.42, and the.42asset must be published first. - What users see. The Recovery app is called "Omarchy Installer", and there is a new defer path.
Now fixed
bputil -nc, explicit recovery_gui, stub-first removal (retryable when container deletion fails), Recovery template -R verification and backup pruning, resumable publish, single owner source, Authorization.c CLOEXEC/process group, private APFS call gone, source-lock test entries, xcodebuildmcp fallback. Neo radio/Touch ID failures now warn unless the template requires them. J614s is still refused.
Local runs: Python overlay 319/320 (the TMPDIR test above), Recovery fixtures 14/14, swift test RecoveryAccount/ClosedEngineHelper 37/37, audio/bless guards 4/4.
Seeking to the end of a macOS raw disk device reports 0, so Touch ID collection refused /dev/rdisk0s1 as 0 bytes on every Neo with a sensor, and a template requiring Touch ID stopped the installation after the disk was changed. A character device's size now comes from DKIOCGETBLOCKSIZE and DKIOCGETBLOCKCOUNT. Engine v0.9.2-omarchy.43 (23,860,038 bytes, f4b339dd…) carries it; two repacks from the authenticated .14 base were identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-size Size the Neo's iBoot System Container through its disk driver
Verify the selected startup target before skipping account creation, resume deferred handoff, retain the required owner account, and authorize Aura boot arguments with bputil -nca. Flush copied metadata before publication and clean committed iSC backups. Retain per-board boot fallback unless the common boot chain is qualified. Use authenticated canonical audio, firmware and boot packages in images, and update the locked engine overlay reproducibly. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Keep the production CLI and bounded concurrent range extraction, using native Apple crypto and compression. Add Go-generated interoperability fixtures and macOS debug/release CI for the source build. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Test exact HTTP range responses, redirect refusal and cancellation, retain Go compatibility vectors, require macOS 14 for native HPKE, and apply the Xcode formatter output. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Use explicit Codable field names, fix HTTP fixture initialization, and retain reference vector generators with the port. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Disable release debug metadata, normalize linker object prefixes and preserve mismatched candidates for diagnosis. Keep strict formatting and both native test configurations. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Replace the opaque Go binary with the 470104-byte native helper, bind it to its source commit and reproducible build record, and verify that identity when building the engine. Record the Apple key-service network dependency and update all engine pins. The native helper passes 11 debug and release tests and two clean builds are byte-identical. Installer CI passes 752 debug and 738 release tests plus Recovery fixtures; the engine repacks identically with the final locked recipe. Signed-off-by: DjDeveloperr <hey@djdev.me> Assisted-by: LLM
Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
maralcbr
left a comment
There was a problem hiding this comment.
Re-reviewed at a75ef5f against my 39c3832 review. Both must-fixes are fixed, -nca is now Neo-only with a disclosure, and the inspect path is side-effect free. One new likely blocker is in the Recovery publication check.
Must fix
- Legitimate re-signing can leave unequal stripped executables, so the publication check can reject a valid install.
_verify_staged_app(omarchy_recovery.py:226-232,258) strips both signatures withcodesign --remove-signatureand compares raw bytes. Stripping doesn't normalise the__LINKEDITvmsize, which reflects the original signature's size. A local repro with a larger (entitlements-bearing) signature, re-signed ad-hoc the waystage()does, kept vmsize 0x10000 vs 0x8000 after stripping, and the bytes differed at offsets 1073-1074; a runtime-only signature matched. Release templates are Developer ID + runtime + timestamp signed (Packaging/build-app.sh:282), so please reproduce actual Developer ID release publication before relying on this. The test covers only ad-hoc → ad-hoc (test_omarchy_recovery.py:153-167). Use a carefully normalised executable comparison (load commands included; CodeDirectory page hashes alone also cover the changing headers), and add a Developer ID-shaped fixture. Separately,--force --sign -(omarchy_recovery.py:375) drops hardened runtime and any existing entitlements on the staged copy, and losing runtime is a security-policy decision.
Should fix
- Engine pins. All references agree on
v0.9.2-omarchy.49, but none of .45/.47/.48/.49 is published. The app build now reproduces the engine, while the catalog still points at the unpublishedengine-v0.9.2-omarchy.49URL. - Build trust chain.
prepare-engine.pypins the.28base by sha256 and size, which is good. But that asset is a pre-release titled "draft, not a release", and deleting it breaks uncached reproduction (prepare-engine.py:118,cached_base()). Arrange durable retention or a mirror (changing its release status alone doesn't prevent deletion), and document the native-byte comparison. The.14→.28base switch rests on a README claim ("78 Mach-O match .14") that should get maintainer review. - Provenance after merge.
downstreamRevision ca3ecd5andrestore_image_source(7115941) name commits in the author's fork. They're metadata, not fetched dependencies (prepare-engine.py:110-127,verify-source-lock.py:208-219). Preserve immutable source references and reconcile release provenance after merge, especially if it's squashed. - The autolaunch marker is disarmed too early.
install()disarms it before the install transaction runs (RecoveryActions.swift:329). Finalize commits the disarm (RecoveryAccountCore.swift:855-858) before the install snapshot (RecoveryActions.swift:401), so in a deferred run a later policy or enrollment failure leaves no "Finish Installation" autolaunch for the retry. - Finalize fixture.
RecoveryAccountTests.swift:126-162exercises the metadata completion directly. Please also drive the full nativefinalize()through skip → handoff → finalize.
Minor
- The LZVN parser accepts undefined opcodes (0x1e/0x26/0x2e/0x36/0x3e, 0x70-0x7f, 0xd0-0xdf) as instructions. It fails closed (decode error, never wrong bytes), but rejecting them is cleaner.
- The firmware-range work dirs (
Ranges.swift:112-154) still rely ondefer; they hold no key. Keep the abandoned-workspace sweep limited to matching siblings beside the next output. - TOCTOU: the executable is read once, and only the bundle signature is re-verified on disk. That needs root on the stub, so it's low risk.
Policy (maintainer opt-in), unchanged
- Neo-only
bputil -nca, now with disclosure. - The persistent stub admin account, with no password minimum.
- Handoff without fresh owner authorization.
- Helper install fallback without SMJobBless.
- Neo speaker protection.
- J700 Stage 1 window (common image only).
- Neo default firmware 26.6.2.
- "Omarchy Installer" Recovery name and the defer path.
Verified fixed
- Aura scope. The Aura boot chain and support packages are scoped to
hardware_profiles.neo(policy.json:63-79). Legacy images keepm1n1-aurora/uboot-asahi,m1n1is still refused, and channel images are forced to the legacy set. - Launcher.
finishAccountSetupdisarms the launcher, restoresSystemVersion.plistand clears the deferral inside the finalize transaction (RecoveryVersionMetadata.swift:42-83,RecoveryAccountCore.swift:685-699,855), and older journals still resume. -nca. It is-ncby default and-ncaonly for j700ap, in the engine, GUI and Recovery publisher, with Neo-only disclosure text.- Inspect.
recoveryAccount()mounts read-only and no longer writes the receipt. - Restore workspaces. They're flock-leased, and abandoned ones are swept.
- LZVN. Bounds and budgets are enforced, and storage and output are SHA-256-checked.
- Owner rule. M1/M2/M3 coverage is unchanged, and legacy images exclude only j700ap. The new Neo template admits only J700, and only on firmware 26.6.2 (
build-mac-image:1529,1536); please record that exception explicitly.
Local runs at a75ef5f: overlay 326, engine 53, swift test RecoveryAccount/ClosedEngineHelper 39/39, RestoreImage 14/14, and the Recovery fixtures pass. My local image-builder/packaging run hit a collection error, so for those I'm relying on CI, which is green at a75ef5f (run 39010031009).
Copy the authenticated Recovery app unchanged, including its original signature, runtime options and entitlements. Publish target configuration and boot/firmware baselines under Aurora/Recovery/InstallData before selecting autolaunch. Bind both publications to one resumable operation and reject incompatible embedded-layout templates before disk changes. Keep app updates immutable, migrate validated legacy inputs outside the bundle, and bind app backups with separate target records. Recovery state journals retain their existing paths. Validation: 24 native publication tests, including an entitlements-bearing runtime signature, byte-identical copying, tamper rejection and interrupted app/data publication; 15 account tests pass in debug and release; Recovery enrollment build and standalone fixtures pass. Two engine50 repacks match. Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
|
The Recovery signature issue is fixed on The signed app is now copied unchanged. Per-install configuration, Stage 1/2 and device firmware are published separately under A signed Validation: 24 native publication tests pass, including a runtime-signed, large-entitlements fixture whose staged app remains byte-identical, signed-code replacement rejection, interrupted app/data publication, and external-data path/tamper rejection. The account/migration tests pass 15/15 in both debug and release. The Recovery enrollment build and standalone fixtures pass; main app/helper assembly and the release-layout guard pass. The full portable suite passes. Engine 50 reproduces in two independent repacks ( The separate kernel suffix correction is pushed to omarchy-pkgs#1101 at This addresses the two changes above; it does not claim the other review follow-ups, release-input publication or exact-image hardware qualification are finished. Assisted-by: LLM |
maralcbr
left a comment
There was a problem hiding this comment.
Checked 6b64475..991e4ba. The must-fix is resolved by the better route.
- Recovery publication. The authenticated app is now copied unchanged, keeping its original signature, hardened runtime and entitlements. The staged copy is checked by full inventory equality with the template plus
codesign --verify --deep --strict(omarchy_recovery.py:_verify_staged_app). Per-install config and payloads move toAurora/Recovery/InstallData, with their own inventory and hash checks, bound to the same resumable journal. The Python stager flushes both complete trees before publication. That removes the re-signing problem, and the--force --sign -runtime/entitlement loss with it. TheOmarchyRecoveryDataLayout=external-install-data-v1marker refuses older embedded-data templates before partitioning, and legacy installs migrate after their target UUIDs and payload hashes are checked (RecoveryInstallData.migrateLegacy). - Legacy migration durability.
RecoveryInstallData.migrateLegacy(:95-107) writes the files but never flushes the complete tree before the rename;RecoveryFileTransaction.writeflushes only each file and its immediate parent. On retry, an existing external directory passes after only its config is checked (:40-43). Flush the whole tree before publishing, and validate the full baseline on retry. (Missing guarantee, not demonstrated corruption.) - Defensive hardening.
payloadRoot()(RecoveryActions.swift:76-77) appends an uncheckedAuraPayloadsdirectory, andRecoveryBaseline.swift:31resolves that root's symlinks, whileprotectedReadrejects only a final-component symlink. Validate theAuraPayloadsdirectory too, then use bounded protected reads for its manifest (manifest()still usesData(contentsOf:)) and payloads. That isn't a demonstrated unprivileged exploit. The install data isn't signed, which matches the previous ad-hoc trust level on the stub; please say so in the README.
Still open from my previous review:
- Early disarm.
install()still runs account finalize, which disarms autolaunch, before the install snapshot (RecoveryActions.swift:332→RecoveryAccountCore.swift:855-858, snapshot atRecoveryActions.swift:404-405). A later policy or enrollment failure in a deferred run leaves no "Finish Installation" autolaunch for the retry. - Engine
.50is now pinned everywhere but not published. - The
.28base needs durable retention or a mirror. - Provenance. Fork-commit references need reconciling after merge.
- Hardware. Qualification of the PR-built Neo image.
Keep autolaunch armed while account ownership completes before boot enrollment. Flush the entire migrated baseline before publication and validate every payload again on retry. Reject linked payload roots and bound descriptor reads of manifests and assets. Validated on Neo macOS: 15 account tests pass in debug and release; 24 publication tests and all Recovery fixtures pass; native Recovery app build, signature checks and strict formatting pass. Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
Use the available engine release URL and retain an independent runtime-base mirror with identical size and SHA-256 verification. Cover unavailable-primary and invalid-mirror cases and preserve repository-qualified source references across a squash. Validation: engine tests pass and the locked producer validates the engine 50 archive. Published release asset sizes and digests match the source lock. Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
Resolve the existing Neo profile through the normal signed edge channel, including its Mesa, Vulkan and bless packages. Preserve legacy defaults and bind the profile to canonical inputs, import, inspection and provenance. Qualify base runtime requests against the selected package set. Pin the native Recovery app inventory as an explicit image input, freeze and copy the signed template unchanged into the ESP, and declare the native Recovery metadata. Refuse modified templates, embedded installation data and mismatched input records. Keep the existing board-specific Stage 1 contract. Restore the intended upstream engine catalog URL without changing allowed release locations. The previously selected fork URL failed catalog checks. Validation: image producer checks, engine payload contract fixtures and portable installer checks pass, including resumed checks after correcting fixtures. The existing native Recovery template passes macOS code-signature verification and the new inventory check. No exact-image hardware qualification is claimed; signed channel inputs remain unavailable. Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
Keep the independent portable package-role assertion aligned with the required Mesa, Vulkan and bless packages added by the image producer. The three focused role tests pass; current-head image-builder CI already passed. Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
maralcbr
left a comment
There was a problem hiding this comment.
Checked e034103..243c044. Five of my six r4 items are resolved; the engine publication is half done, and the Recovery input needs a provenance decision.
Resolved
- Migration durability.
migrateLegacyflushes the whole temporary tree before the move (RecoveryInstallData.swift:71-72). A retry runsverifiedBaselineon an existing directory, checking the config, the manifest, every payload hash and a non-symlinkedAuraPayloads. Tests cover a tampered payload and a symlinkedAuraPayloads(RecoveryAccountTests.swift:84-98). AuraPayloadshardening.payloadDirectorylstat-checks the directory,manifest()usesprotectedRead, andRecoveryBaseline.readusesO_NOFOLLOW+fstatwith bounded chunks instead of resolving the root.- Early disarm.
install()passesinstallationPending: true(RecoveryActions.swift:335), so account finalize leaves the marker and version armed. Only install finalize disarms, after the receipt is written (:464-480); there's a test atRecoveryAccountTests.swift:253-262. Note thatbputilnow also runs with the version hidden on this path, as the deferred branch already did; that's not hardware-checked. .28base. It now has a hash- and size-pinned fallback (source-lock.json:501-503,prepare-engine.py:65-74).- README. It now notes that the install data is unsigned.
Before release
- The engine
.50URL is dead..github/mac-release-pipeline.jsonnamesomacom/omarchy-mac-installer/releases/download/engine-v0.9.2-omarchy.50/…, but that release doesn't exist on omacom. It exists only as a pre-release inaurora-silicon/omarchy-mac, with a size and hash that match every pin. The missing asset blocks catalog publication, because catalog preparation verifies remote artifacts before signing (mac-catalog.yml:161-165,catalog_release.py:879-882). A maintainer should publish.50on omacom (same bytes) first. Until then,Engine/README.md:21overstates its availability. - Recovery provenance (maintainer decision).
recovery_app.py:87-104pins the digest of whatever directory is passed to--recovery-app, and the installer'scodesign --verify --deep --stricthas no-Rrequirement (omarchy_recovery.py:110,234). The enclosing payload is authenticated through the signed catalog (ClosedEngineProcessAdapter.swift:118-153), and ad-hoc signing is intentional (Recovery/build-app.sh:40-41). But nothing independently records which source built the app, which then runs as root in Recovery. Maintainers should decide whether catalog authentication is enough or whether to require build evidence (the Recovery source commit in PROVENANCE) or a signer identity. Native Recovery is optional per image, not Neo-only (build-mac-image:1561-1573).
Should fix
- No automated full Neo/native-Recovery image build. Source and fixture CI covers both features (
checks.yml:139-157), butmac-image.yml:78-88andedge-dispatch.ymlpass neither--recovery-appnor--hardware-profile neo. Please wire at least a check-only Neo lane. - Neo depends on #1101 being published.
hardware_profiles.neo.support_packagesnow includesmesa-aurora,vulkan-auroraandaurora-bless. The edge database I checked doesn't have the Neo packages, so Neo channel resolution fails until omarchy-pkgs#1101 publishes. The legacy path doesn't check the Neo list, so M1/M2/M3 aren't affected. available_basechanges legacy builds too (build-mac-image:816-830). Base names that match a set package now resolve asomarchy-candidates/<pkg>. That's probably safe, but please check it against a real legacy build.- Local test portability.
image-builder/test/allstops on macOS at two pre-existing shell failures (BSDinstallwithout-D;mac-image-inputs-test.sh:152), so the new Neo/Recovery shell cases didn't run locally. Linux CI is green.
Minor
validate_zipchecks only entries underesp/aurora/recovery/Omarchy Installer.app/, so stray files elsewhere underesp/aurora/recovery/passmac-image-check.
Owner rule
No further narrowing since r4. Legacy images exclude only j700ap. The Neo profile admits only j700ap, so that image remains a deliberate exception to the every-model rule (build-mac-image:1566-1567).
Local at 243c044: overlay 330, engine 55, image-builder pytest 225, swift test RecoveryAccount/ClosedEngineHelper 41/41, Recovery fixtures pass. CI is green. Hardware qualification of the exact PR-built Neo image is still outstanding.
Require the embedded Btrfs executable to be AArch64 ELF. Cross-build helpers can restore the target executable in the sealed root after mkinitcpio already copied a host wrapper into the UKI, so checking the root alone misses a broken first-boot encryption tool. Cover the leaked host script, an x86 ELF and a truncated header. All 63 image inspection tests passed; corrected image boot qualification is pending. Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
Reject images whose embedded initrd omits the sysroot dependency on successful encryption. This gate remains independent of the runtime mapper override. Validation: all 63 image inspection tests passed. Assisted-by: LLM Signed-off-by: DjDeveloperr <hey@djdev.me>
…o inputs Reject missing or replaced package mtree references and stray Recovery ZIP files. Check the macOS-built immutable Recovery template with the Neo image contract in CI, exercise the portable shell cases on macOS, and clarify the canonical engine publication prerequisite. Validation: portable installer suite and image-builder source suite passed, including 65 inspection tests. The combined contract check passed with the preserved native Recovery artifact; hardware and production channel qualification remain separate. Assisted-by: LLM Signed-off-by: Dj <hey@djdev.me>
Assisted-by: LLM Signed-off-by: Dj <hey@djdev.me>
Use the signed fixture set actual package table, database identity, runtime revisions and inspection report for payload provenance checks. Record their digests with the native template and source revision. Assisted-by: LLM Signed-off-by: Dj <hey@djdev.me>
Build native Recovery from the same checkout, record its source and tools, and pass the pinned template plus Neo profile to the real channel resolver and image producer. Default to input authentication, keep full image builds manual, and preserve the existing legacy release workflow. Validation: release-pipeline trigger tests, identity guard, YAML parsing and shell syntax checks passed. The live-channel workflow remains gated by published qualified Neo packages. Assisted-by: LLM Signed-off-by: Dj <hey@djdev.me>
maralcbr
left a comment
There was a problem hiding this comment.
Checked 243c044..a404657. The merge of main is clean: neither side's changes were dropped. Two new blockers, both from this round.
Must fix
- Every image build, legacy included, now depends on an unpublished
omarchy-mac-boot.- 8f667c2 adds
sysroot.mount.d/10-omarchy-mac-encrypt-required.conftoINITRD_FILES(apple_limine.py:33). check_embedded_initramfsvalidates that list for every image, with no profile check (inspection.py:409-412).- Only
omarchy-mac-boot20261010-2ships that drop-in, from the still-open omarchy-pkgs#1101 (e2d8406). Edge has20261010-1without it, andpolicy.json:43still sets the minimum at20260921-10, so resolve doesn't stop it. - Result: if this merges first, the next M1/M2/M3 edge build fails after sealing, before packaging (
build-mac-image:1733-1744). CI stays green only because the fixtures manufacture everyINITRD_FILESentry (fixtures.py:461-469), so it can't establish channel compatibility. - I've asked on #1101 for that
omarchy-mac-bootchange to go to omarchy-mac-pkgs and its own omarchy-pkgs PR, since it changes boot for every encrypted Mac. Until that's published, either drop the requirement here, or make it conditional on the boot package version and raiseminimum_versionsto match once it ships.
- 8f667c2 adds
neo-image.ymlcan't run. Line 60 uses${{ runner.temp }}in job-levelenv, where therunnercontext isn't available; actionlint rejects it. This dispatch-only workflow isn't exercised by pull-request CI. SetWORKfrom$RUNNER_TEMPvia$GITHUB_ENV, asmac-image.yml:58-59does.
Policy (maintainer opt-in)
- Root mount gated on encryption, on every Mac. Together with #1101, this adds a direct
sysroot.mountdependency on the encryption service across all Mac profiles, which prevents mounting after that service fails. The previous graph already required encryption throughinitrd-root-device.target(apple_limine.py:42), and plaintext continuation after a failure hasn't been demonstrated. Intentional plaintext installs still work (omarchy-mac-encrypt:881-891). Because it changes boot behaviour for every encrypted M1/M2/M3, Chris and Ryan should accept it explicitly. btrfsin every initramfs. Every image now requires an executable AArch64 ELFbtrfsinside its initramfs (apple_limine.py:284-294). That's safe on current edge, where the hook already adds it, but it's a new requirement for all images.
Still open from r5
- Engine
.50on omacom. Still "release not found".Engine/README.md:21now says a maintainer must publish it before catalog publication, which is accurate. - Recovery provenance. There's no dedicated Recovery-source binding in image PROVENANCE, and still no signer requirement.
neo-image.yml:32-51builds the app and image from the same checkout, whose builder commit is recorded (build-mac-image:1589).image-builder/README.md:43leaves it to maintainers, which is fine if they decide. - Real-channel Neo lane. The PR CI job (
checks.yml:182-209) is check-only against signed fixtures (channelPackagesBuilt:false). The manualneo-image.ymlwould also fail at resolve until #1101's Neo packages are on edge. available_baselegacy behaviour (build-mac-image:816-832) is unchanged, with no legacy build evidence yet.
Resolved
- Local test portability.
install -Dis replaced,mac-image-inputs-test.sh:151uses-eq, and there's a new macOS CI step. validate_zip. It now rejects stray files, directories and duplicates underesp/aurora/recovery/(recovery_app.py:124-145).
Minor
.MTREErequirement.check_package_mtreesapplies to legacy too. All current edge set packages carry.MTREE, but lab or local candidates packaged without makepkg will now fail inspection (the README notes this).- Artifact upload. In
neo-image.yml, the upload runsif: always()overout/, so a full build would upload a multi-GB image. - Action versions.
checks.ymluses download-artifact v4;neo-image.ymluses v8.0.2.
Owner rule
Unchanged: legacy excludes only j700ap, and Neo allows only j700ap.
Local at a404657: overlay 330, engine 55, image-builder 229, image-builder/test/all exit 0, swift test RecoveryAccount/ClosedEngineHelper 41/41. CI is green. Hardware qualification of the exact image is still outstanding.
Stop requiring the downstream sysroot mount gate removed from the package PR. Preserve the upstream encryption activation link and embedded AArch64 Btrfs validation. Cover an otherwise valid initramfs without the extra drop-in. Validation: all 66 focused inspection tests and the full image-builder source suite passed on native aarch64 Linux. Restoring the old gate requirement reproduces the new regression test failure. Assisted-by: LLM Signed-off-by: Diljit Singh <hey@djdev.me>
|
Thanks: 3211d49 resolves must-fix 1. Legacy images no longer need the unpublished drop-in, and the regression test covers it. Remaining asks:
Engine |
Set WORK from RUNNER_TEMP through GITHUB_ENV, matching the normal image workflow. The runner context is unavailable in job-level env. Validation: actionlint 1.7.12 passes for the workflow and rejects the prior expression. The setup step writes the expected path with spaces in RUNNER_TEMP; git diff checks passed. Assisted-by: LLM Signed-off-by: Diljit Singh <hey@djdev.me>
maralcbr
left a comment
There was a problem hiding this comment.
Approving at ef40714 (main merged in, clean). The earlier blockers are resolved, CI is green, engine .50 is published on omacom, and the Neo packages from omacom/omarchy-pkgs#1101 are on edge. DJ reports the hardware testing as covered. The real-channel neo-image.yml full build runs on main right after this merge, and catalog and release work wait until it passes.
Add developer-gated MacBook Neo installation and an Omarchy-branded native Recovery app. The flow stages firmware and boot files, guides the power-button Recovery boot, creates the recovery account, and hands ownership authorization to Startup Disk. Account setup also supports deferring setup with “Skip, Restart Now”.
The normal edge Neo image profile selects
omarchy-dev,omarchy-settings-devand the Neo support packages, and carries the pinned native Recovery template unchanged. Offline artifact verification, per-device repair payloads and interruption recovery cover boot/account metadata; helper account mutations are restricted and developer clients are bound to their code hash.Image inspection checks the actual embedded AArch64 Btrfs executable, retains the upstream encryption activation link without requiring the removed downstream root-mount gate from package PR #1101, and requires each installed package mtree to match its original archive. This catches local test packages that omitted
.MTREE; normal makepkg recipes already generate it. Recovery ZIP validation rejects extra files and directories outside the frozen template inventory.CI now checks its actual macOS-built Recovery artifact together with the Neo image contract, using a signed fixture package channel and disposable fixture filesystems. It records the source commit and native template digest, removes the synthetic image, and explicitly does not claim a full channel-image build or hardware qualification. The two image-builder shell cases also run on macOS. A separate manual
neo-image.ymlworkflow builds native Recovery from the same checkout and resolves the real channel with--hardware-profile neo --recovery-app; by default it authenticates inputs, with full AArch64 image builds opt-in. It preserves the existing legacy release path and requires published qualified Neo packages. The branch includes current main's acceptance-runner updates.Validation: portable installer and image-builder source suites passed, including 65 inspection tests at the preceding head. The combined Neo/Recovery check passed locally with the preserved native Recovery artifact. All four CI jobs at the preceding head (
3211d492) passed: https://github.com/omacom/omarchy-mac-installer/actions/runs/39107353102 . This includes native debug/release tests, Recovery/app assembly, engine reproduction, macOS shell portability, and the combined native-artifact/Neo contract check. The manual real-channel workflow has not been run against unpublished channel packages. Its work directory is initialized from$RUNNER_TEMPthrough$GITHUB_ENV, matching the normal image workflow; actionlint 1.7.12 passes and rejects the previous job-level expression as expected.The root-gate removal additionally passes all 66 focused inspection tests, including acceptance of an otherwise valid initramfs without the extra drop-in. Restoring the old requirement makes that regression test fail. The full image-builder source suite also passed on native AArch64 Linux. The embedded Btrfs checks remain in place.
Neo completed the local corrected-image installation on integration/aurora
5d570a78a4ab, kernel7.1.12-7-1-ARCH. The owner reported it works and ran a system update. After restoring the missing kernel/m1n1 mtree references from the exact original package archives, both the full Apple Silicon boot check and its update boot-chain check passed; kernel, UKI and Stage 2 hashes were unchanged by that repair. This local test does not qualify the future published channel package set or the newer SEP configuration in package PR #1101.Remaining qualification: post-update reboot, explicit Neo peripheral/suspend coverage, deferred/interrupted Recovery paths, and legacy-machine coverage. Canonical engine asset publication and any stronger Recovery provenance/signer policy remain maintainer release decisions. No release or tag is created by these changes.