From 292aad7a432fc11d73bf5dcd0ab44232de4b50ec Mon Sep 17 00:00:00 2001 From: Alexander Kucera Date: Thu, 3 Sep 2026 13:15:13 +0200 Subject: [PATCH] build: disable App Sandbox per ADR-0009 Flip ENABLE_APP_SANDBOX to NO in both configurations: the engine gate spawns the user-installed hermes binary and provisioning writes outside any container. Hardened runtime stays ON for Developer ID notarization. No entitlements file. Closes #37. --- Museion.xcodeproj/project.pbxproj | 4 ++-- Museion/AGENTS.md | 2 +- docs/AGENTS.md | 2 +- docs/adr/0009-no-app-sandbox.md | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 docs/adr/0009-no-app-sandbox.md diff --git a/Museion.xcodeproj/project.pbxproj b/Museion.xcodeproj/project.pbxproj index c4706ae..492fd7e 100644 --- a/Museion.xcodeproj/project.pbxproj +++ b/Museion.xcodeproj/project.pbxproj @@ -398,7 +398,7 @@ COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3M7APDAAC5; - ENABLE_APP_SANDBOX = YES; + ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; ENABLE_USER_SELECTED_FILES = readonly; @@ -430,7 +430,7 @@ COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3M7APDAAC5; - ENABLE_APP_SANDBOX = YES; + ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; ENABLE_USER_SELECTED_FILES = readonly; diff --git a/Museion/AGENTS.md b/Museion/AGENTS.md index 3c79d61..884f8ce 100644 --- a/Museion/AGENTS.md +++ b/Museion/AGENTS.md @@ -13,7 +13,7 @@ Owned by the root AGENTS.md contract. The `.xcodeproj` uses **filesystem-synchro - Entry point: `MuseionApp.swift` (`@main`, single `WindowGroup` scene). - `AppMetadata` is the single source for the displayed app name and tagline; members are `nonisolated` (default-MainActor project). - Swift language mode 6, `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor`; deployment target 26.5; bundle id `com.babylondreams.Museion`. -- App Sandbox is ON (`ENABLE_USER_SELECTED_FILES = readonly`) — vault read/write will need that loosened when document storage lands. +- App Sandbox is OFF (ADR-0009) — the engine gate spawns the user-installed `hermes` binary and provisioning writes outside any container; hardened runtime stays ON for Developer ID notarization. No `.entitlements` file. - No persistence layer yet — the SwiftData template was stripped; vault-vs-database gets an ADR when the need is real. - Tabs for indentation; SwiftFormat + SwiftLint must both stay clean. diff --git a/docs/AGENTS.md b/docs/AGENTS.md index 9ab9cb6..6a9733c 100644 --- a/docs/AGENTS.md +++ b/docs/AGENTS.md @@ -10,7 +10,7 @@ Owned by the root AGENTS.md contract. ## Local Contracts -- ADRs live in `docs/adr/`, sequentially numbered `NNNNN-slug.md` (currently `0001`–`0008`: stack, license, forge/CI, content layout, learnings home, fix-card transport, state ownership, tools host). +- ADRs live in `docs/adr/`, sequentially numbered `NNNNN-slug.md` (currently `0001`–`0009`: stack, license, forge/CI, content layout, learnings home, fix-card transport, state ownership, tools host, sandbox posture). - ADR format follows the domain-modeling skill's `ADR-FORMAT.md`: short title + 1–3 sentences; optional Considered Options / Consequences only when they earn their place. - `docs/agents/` holds the engineering-skills config (issue tracker, triage labels, domain-docs consumer rules) written by `setup-matt-pocock-skills` — edit directly, no child doc needed. - `docs/sample-pass.md` is the worked sample Pass demonstrating the craft-canon skills firing as Fix Cards (issues #7 and #11 verification artifacts); card shape follows CONTEXT.md, anchors follow ADR-0006. diff --git a/docs/adr/0009-no-app-sandbox.md b/docs/adr/0009-no-app-sandbox.md new file mode 100644 index 0000000..255bc49 --- /dev/null +++ b/docs/adr/0009-no-app-sandbox.md @@ -0,0 +1,3 @@ +# 0009 — No App Sandbox; hardened runtime stays on + +Museion ships with App Sandbox off and no entitlements file: the engine gate spawns the user-installed `hermes` as a child process, and provisioning and the bridge write `~/.hermes/profiles/museion/` and real `~/Library/Application Support/Museion/` — all outside any container, which the sandbox forbids. Hardened runtime stays on for Developer ID notarization; App Store distribution is already a PRD non-goal (GPL-3). Compensating constraint: engine discovery is pinned to absolute-path probes in a documented order (#36) — the app never shells out to arbitrary paths.