Commit Graph
3 Commits
Author SHA1 Message Date
james.maes f1c60a31ad fix(ci): surface real xcodebuild errors on App target failure (#170)
Captures full xcodebuild output to a tempfile when check-app-builds.sh fails, so CI logs show the actual compile/link error instead of just the last 5 lines via -quiet | tail -5.
2026-05-13 09:36:11 -05:00
james.maes 6d79d9b75b fix(check-app-builds): isolate CLI DerivedData to break the Xcode-IDE race
Resolves the launch fragility we previously deferred to Phase 8 in commit
fdd03d6 — turns out it wasn't an Xcode 26 codesign-chain bug, it was a
concurrent-DerivedData race between Xcode IDE and CLI builds.

Root cause
----------
When Xcode IDE is open with the Jarvis project, its background indexer/
builder touches Jarvis.app in the shared DerivedData *after* our
postBuildScripts (verify-entitlements --pre-codesign + codesign.sh +
verify-entitlements --post-codesign) complete. The post-IDE-touch state:

  1. Bundle signature → `invalid Info.plist (plist or signature have been
     modified)` per `codesign --verify`
  2. Info.plist's `JarvisEntitlementsVerified` marker → `false` (was YES
     after pre-codesign wrote it)
  3. AppDelegate's runtime entitlement probe hard-blocks at launch via
     `Logger.critical("JarvisEntitlementsVerified missing/false …")` —
     surfaced in OSLog as a Fault under com.koftwentytwo.jarvis:system

Fix
---
Use `-derivedDataPath "$REPO_ROOT/build"` so CLI builds run in their own
DerivedData, fully isolated from Xcode IDE. Build/sign/launch chain works
end-to-end; bundle is properly signed and the entitlement marker survives.

Verification
------------
- Fresh isolated build's Info.plist → JarvisEntitlementsVerified: true
- `codesign --verify` → --prepared / --validated (clean)
- `open <bundle>` → process launches, stays alive, AppDelegate progresses
  past the entitlement gate, ~/Library/Application Support/Jarvis/ is
  created (proves storage init ran, which only happens after the gate)

Implications for Phase 6 deferral
---------------------------------
The signed Phase-8 deferral document at
`.planning/phases/06-voice/06-HUMAN-UAT.md` listed the launch fragility
as a Phase 8 unblock-task. With this fix, the six HUMAN-UAT gates
(VOICE-07/09/10/12/13/14) are now actually runnable. The Developer ID
signing + notarization concerns Phase 8 still owns are different
(production distribution); this commit only addresses Debug development.

build/ is already in .gitignore (line 2) — no further changes needed.
2026-04-27 17:15:20 -05:00
james.maes 5f9a767f9d fix(05-verify): G-01 extract await out of string interpolation autoclosure + add check-app-builds.sh gate
The CR-02 fix wired ME-04 closure correctly, but the success-path log
interpolated `await runtime.client.registeredToolNames().count` directly
inside a string literal. Swift 6 rejects 'await' inside autoclosures that
don't support concurrency; both Debug AND Release App-target builds
failed.

Masked because the Xcode 26 xctest upstream-blocker prevents the test
harness from compiling the App target — SPM tests passed (and report
'all green') while xcodebuild build never ran in the executor verify
loop. The verifier caught it on the goal-backward pass.

Fix: extract `await` to a `let toolCount` binding before the
interpolation. One-liner.

Add scripts/check-app-builds.sh as a manual/CI gate that exercises
`xcodebuild build -configuration Debug` of the App target. Wire as a
project gate (NOT a preBuildScript — that would loop). Documents the
upstream xctest-harness blocker as the rationale.

Verified: xcodebuild Debug BUILD SUCCEEDED post-fix; check-app-builds.sh
exits 0 against the repo.
2026-04-25 18:30:40 -05:00