Repository navigation
Dev app: reload action and reporting an open launch that exits early #97
Description
Status (Oct 15)
- fix(desktop): isolate checkout development runs from installed helpers #112:
bun desktop devruns a checkout's source host and app together on their own port and data profile, refuses existing listeners, never registers or restarts Ace Helper, and stops host and app together. - fix(desktop): connect dev runs to their native client #118: dev runs give their source host and workers the checkout's signed native client.
- fix(desktop): share one development permission identity #123: all checkouts deliberately share one
dev.ace.desktop.devidentity and Apple Development signature, so one permission grant covers every dev run; separate profiles keep data, settings, Keychain services, ports and WebKit storage apart. Source dev runs coexist with installed Canary, not with an installed Ace-dev managed helper (details). - Name the Ace holding a port; add ace serve --loopback for test hosts #386: conflict errors name the Ace holding a port (bundle, path, PID), and
ace serve --loopbackkeeps test hosts off the tailnet;bun desktop devuses it.
The original expectation of a per-lane helper identity running side by side with an installed Ace-dev is superseded by #123.
Remaining
- A reload action in the dev app, so a UI rebuild doesn't require relaunching the client (also hit in Verify native development and recovery end to end in Ace #55).
- An
openlaunch that exits before showing a window reports why (not verified on current main).
Original report
A desktop build made from a lane cannot be exercised in isolation: every development build shares one helper identity, port, and data directory, so the new client connects to whichever older Ace-dev helper is already installed and running. Validating a UI change in the shipped desktop shell then requires replacing the user's installed development helper.
Reproduction (dogfooding #91 from Ace Canary 0.0.11)
- In a lane at
origin/main(1ab91be, desktop 0.0.11) plus the Attach images pasted into the composer #91 UI change, runbun scripts/build.ts devinapps/desktop. This buildsapps/desktop/dist/dev-macos-arm64/Ace-dev.app(bundle iddev.ace.desktop.dev) and warns that native desktop inspection needs an Apple Development signature. openthat bundle. The client process (PID 35146) exited before showing a window, with no dialog or log.- Run its
Contents/MacOS/launcherdirectly. The client (PID 35598) shows: "Could not connect to Ace Helper. Ace Helper on port 4141 uses an incompatible protocol; restart it". - Port 4141 belongs to
/Applications/Ace-dev.app/Contents/MacOS/Ace Helper(PID 2326, launchddev.ace.desktop.dev.helper, running since the previous day), an older installed development build. Its host also listens on the tailnet. - The only offered remedy is to restart that helper. That would replace the user's installed development helper and its channel host, so the lane build was never connected and the new UI code was not exercised.
During the same session the supervisor reported that Canary was trying to use an old Ace instance, and stopped validation.
Cause
apps/host/src/config.ts desktop() gives every dev build the same port (4141), ~/.local/state/ace-dev home, settings directory, and keychain service. apps/desktop/src/helper.ts connects to whatever answers on that port and registers the same launchd identifier. Nothing ties a client to the helper built from the same bundle or lane.
Blocks UI validation for #91. Related to #55 ("Keep a working installed Ace separate from the source build under development"). Part of #5.
Activity
iamnbutler commentedon Oct 5, 2026
Workaround used to unblock #91 validation from Ace Canary 0.0.11 without touching the installed Ace-dev helper (PID 2326 on 4141) or Canary (4142). No code changes were needed:
ACE_HOME=/tmp/ace-paste91/home ACE_CONFIG_HOME=/tmp/ace-paste91/settings ACE_KEYCHAIN_SERVICE=ace-paste91 ACE_PORT=4151 ACE_WEB_PORT=5151 ACE_APP_DIR=/tmp/ace-paste91/web bun apps/host/src/cli.ts serve --port 4151, whereACE_APP_DIRisvite build --outDirof the lane'sapps/app.dist/dev-macos-arm64/Ace-dev.appand run itsContents/MacOS/launcherdirectly with the same environment.desktop("dev")keeps explicitACE_*values, finds the running host on 4151, skips helper registration, and loads the host's UI in its WebKit window.index.htmland bundle match the lane build.Problems found while doing this, which still belong to this issue:
config.app), not by the bundle. A "lane build" therefore shows the lane's UI only if the host is also from the lane. Old helpers serve old UI even when the protocol matches.vite build, and a manual launcher run. There is no supported command such asbun desktop dev --isolatedthat does this and cleans up afterwards.100.x:4151and:5151). There is no way to keep a test host on loopback only.iamnbutler commentedon Oct 5, 2026
Validating the Issues/PRs row actions in an isolated lane runtime (source host on 4161, lane-built Ace-dev with explicit
ACE_*env, as described above) turned up one more isolation gap.dev.ace.desktop.dev, so a lane build and the installed/Applications/Ace-dev.appshare~/Library/WebKit/dev.ace.desktop.dev/WebsiteDataStore/<id>. Each test port leaves its own origin directory there (localStorage and IndexedDB forhttp://127.0.0.1:<port>). I found leftovers for 4151 (Attach images pasted into the composer #91), 4161 (this run), and older ports 4187/4189/4193 that I didn't create. After the test client exited, I removed only the 4151 and 4161 origin directories. An isolated run needs its own bundle identifier or data store so that cleanup doesn't mean editing the installed app's WebKit data.iamnbutler commentedon Oct 5, 2026
Diagnosis of today's dev Helper startup blocker (read-only; helper-recovery owns the repair). It is two problems, and Canary is not one of them.
Canary plus Ace-dev is not the conflict. Canary and Ace-dev have separate bundle IDs, launchd labels, BTM items and launch constraints, ports (4142/4141),
ACE_HOME, Keychain services and WebKit stores.sfltool dumpbtmshows both registrations side by side.1. The immediate macOS failure was an in-place bundle swap under a live registration.
/Applications/Ace-dev.app(an older build, helper PID 2326) was replaced with an Apple Development-signed lane build after the helper was killed rather than unregistered.backgroundtaskmanagementd: registerLaunchItem: found existing item: uuid=F482B0B0…, thenxpcproxy exited due to OS_REASON_CODESIGNING | Launch Constraint Violation … (Constraint not matched) … failure proc [vc: 3], and launchd removed the service.launchctl print gui/501/dev.ace.desktop.dev.helpernow showsLWCR = { signing-identifier "Ace Helper", team-identifier 8S43JJMN6B, validation-category 3 }. Apple defines validation category 3 as development signing, 5 as ad-hoc and 6 as Developer ID.lsregister→ enable.2. The recurrence is a stale build, and it will come back.
ce1bd9b, not origin/main (Start lanes from origin's default branch and measure their diff against it #96). It is desktop 0.0.10, and its/healthreports protocol 7.HOST_PROTOCOL = 8, so the next main-based dev client will hit "uses an incompatible protocol; restart it" again.3. The underlying design flaw (this issue). Every dev build shares one bundle ID, label, BTM item, port, data, Keychain service and WebKit store.
HostInfocarries no version or path, so the error can't name the stale install.Proposed fixes, smallest first:
ACE_*values and a free port, launches the lane bundle with the same environment, and cleans up afterwards. This pattern already worked twice today for Attach images pasted into the composer #91 and Open GitHub items on GitHub or in a new channel from the Issues and PRs lists #107.BrowserWindowdoes not forwardpartition./health, and have the protocol error name the conflicting install and offer the isolated run./Applications/Ace-dev.appfor validation. Upgrade it only from origin/main, with the same Apple Development identity and the documented unregister-first order. A small install script could enforce that order.iamnbutler commentedon Oct 5, 2026
Fix for the default branch-run path: #112 (open, not merged).
Root cause of Nate's recurring Ace-dev dialogs (Oct 5). Every development build, whether installed or in any lane's
dist/, shareddev.ace.desktop.dev: bundle ID, launchd label with a bundle-relativeBundleProgram, BTM item/LWCR, port 4141,ace-devdata, Keychain service and WebKit store.OS_REASON_CODESIGNING | Launch Constraint Violation(vc 10).#112
dev.ace.desktop.dev.<hash>, with its own data, preferences, Keychain service, WebKit store and port (4200–4999). It ignores ambient profile variables.bun run devstarts the checkout's source host serving its freshapps/app/dist, refuses any existing listener on its port, and stops host and app together.ACE_DEV_INSTALL=1and an Apple Development signature.Validated live alongside Canary (4142) and installed Ace-dev (4141):
index.htmlmatches the lane build, and each WebKit process talks only to its own host.ACE_HOME=ace-devetc. are ignored./health).Still open here
dev.ace.desktop.dev. LaunchServices re-registered one of them (image-paste-91/.../dist/dev-macos-arm64/Ace-dev.app) without anyone launching it. Deleteapps/desktop/dist/dev-macos-arm64in old checkouts, or rebuild them after rebasing on the fix.iamnbutler commentedon Oct 5, 2026
Update: #112 is at 00f203f, open and unmerged. CI passes, and dev-ui-validation's read-only review found no blockers.
Added since the last comment:
ACE_CODESIGN_IDENTITY, else the untracked repository Git settingace.codesignIdentity(shared by all worktrees and lanes), else ad hoc.ACE_CODESIGN_IDENTITY=-still builds ad hoc.image-paste-91/apps/desktop/dist/dev-macos-arm64/Ace-dev.app(dev.ace.desktop.dev), which LaunchServices had re-registered on its own, was unregistered and moved, inert, to~/.local/state/ace-quarantine/helper-recovery-2026-10-05/image-paste-91/Ace-dev.app.disabled. LaunchServices now listsdev.ace.desktop.devonly at /Applications. Other old checkouts'dist/dev-macos-arm64builds should be deleted or rebuilt after rebasing on fix(desktop): isolate checkout development runs from installed helpers #112.Installed Ace-dev and Canary are unchanged after all runs:
dev.ace.desktop.dev.helper: PID 55171, BTM F59D93B3, 0.0.10, protocol 7 on 4141.dev.ace.desktop.canary.helper: PID 9041, BTM 74FE912C, 0.0.12, protocol 8 on 4142.~/.local/state/ace-devmtimes are unchanged.Still open here: health doesn't name a conflicting managed helper's bundle, test hosts still listen on the tailnet, and there's no reload menu item. A lane run's source host also doesn't wire
ACE_DESKTOP_CLIENT, so agents in channels created inside a lane run lack native desktop tools. Installed Ace-dev remains 0.0.10/protocol 7 until it's deliberately upgraded from origin/main.iamnbutler commentedon Oct 5, 2026
The missing native-client wiring is fixed and merged in #118.
bun desktop devnow gives its source host/workers the signed client from the same checkout bundle, after filtering inherited Ace settings.Validated a signed build through the root dev command alongside Canary. With an intentionally wrong inherited
ACE_DESKTOP_CLIENT, a real gateway-created channel worker used the correct isolated home/client and completed native app inventory through pi/OpenAI. Strict signatures, type/lint checks, independent review and CI passed. Root-runner termination removed its own host/app processes and listener; Canary remained healthy. No development app was installed, and no new OS grants were needed for inventory.The disposable channel's cleanup exposed a separate storage-close race, now #119. It does not affect the successful native-client check. The other diagnostic/reload/dev-host items in this issue remain open.
iamnbutler commentedon Oct 5, 2026
More dogfooding exposed confusing permission labels across isolated development builds:
desktop-actions:dev.ace.desktop.dev.c1a6b9d2desktop-app-state:dev.ace.desktop.dev.4472239cBoth appear as Ace-dev. After an Ace-dev entry was enabled, the current build still returned
permissionDeniedfor Accessibility on read-only window inventory. System Settings' add-app chooser remembered the other checkout's path. We selected the exactdesktop-app-stateapp for its grant; no permission was changed by the agent. The enabled row's bundle identity was not established, so this does not prove a stale grant or signing failure.Small UX follow-up: make each checkout's development app distinguishable using its existing short dev ID, and show its exact app path beside permission controls in This Mac. Preserve bundle identity, signing requirements, and profile isolation. Part of githubnext/desktop-tools#11 / #5.
Separate tooling observation: Codex Computer Use inventories the current bundle ID but cannot select it by that ID; selecting its exact app path resolves to the old
dev.ace.desktop.devidentity. Registration refresh and a tool-session reset did not change this. That is not evidence of an Ace registration bug and does not explain the permission denial.iamnbutler commentedon Oct 5, 2026
Nate made this the sole priority: there must be one Ace-dev permission identity across all development runs. The earlier suggestion to distinguish checkout-specific permission labels is superseded; each checkout must not need a separate grant.
Fix in draft #123:
dev.ace.desktop.devapp identity and the configured Apple Development signature; missing/ad-hoc signing is refused before building.Two real builds have identical app/launcher/GUI designated requirements and different profiles. With a single user grant, the LaunchServices-launched second checkout successfully completed window inventory and combined Accessibility/screenshot inspection, without a new request. A client from the other profile was correctly refused. Both persistent WebKit partitions exist separately. System Settings now shows exactly one enabled Ace-dev app-control entry and one enabled screen-recording entry. Three obsolete hashed-identity build bundles were unregistered and quarantined; their source and channel data were preserved. Canary's running helper is unchanged.
The PR remains draft while the supported dev runner is updated to use LaunchServices and its exact-instance shutdown behavior is verified. No other githubnext/desktop-tools#11 feature work is proceeding until this is complete.
iamnbutler commentedon Oct 5, 2026
The development-permission fix is implemented and live-validated in #123 (head
4e8f89a; ready for review). Two independent causes were confirmed:dev.ace.desktop.devand the same configured Apple Development signer; the separate checkout profile preserves data, credentials, ports, WebKit storage, and native-client routing. Missing/ad-hoc signing is refused before building.One shared grant successfully covered two real signed checkouts and a subsequent rebuild using the final standard dev runner. Native Accessibility and screenshot inspection passed without another prompt. System Settings has one enabled Ace-dev entry in each relevant privacy panel. A native client targeting the other checkout was rejected. Normal app Quit and SIGTERM to the dev runner cleaned up its app and source host; the other checkout and Canary stayed running during the isolation check. Type, lint/format, signature, and independent source reviews passed.
The old duplicate permission rows were removed, obsolete dev bundles were quarantined recoverably, and all validation dev apps/hosts are stopped. Channel data is unchanged. The normal checkout has the fix; paused feature branches are receiving only this identity update, with their feature work still paused.
Source dev runs should coexist with installed Canary, not an installed Ace-dev managed helper: launchd can resolve the shared dev service from another registered bundle. This limitation and the one-time grant migration are now documented. No dev app was installed in Applications.
Merge is pending GitHub's required check, currently queued. GitHub reports an Actions runner-assignment incident: https://www.githubstatus.com/incidents/3q1yb5m7ltvb. Auto-merge is disabled for this repository; no checks were bypassed. Other work under githubnext/desktop-tools#11 remains paused.
iamnbutler commentedon Oct 5, 2026
Merged #123 as
e6e5c369991a56054af0fbbc20a4ba4882d12b8aat Nate's explicit request to skip the queued CI check. The exact reviewed head was4e8f89a; local checks and live permission-reuse validation had already passed. GitHub required a temporary bypass for the current user to merge this PR; the original CI ruleset was immediately restored and verified unchanged. Other githubnext/desktop-tools#11 feature work remains paused.[-]Run a lane's desktop build without reusing an installed Ace helper[/-][+]Finish development-run isolation: helper conflict diagnostics, loopback test hosts, and reload[/+]iamnbutler commentedon Oct 15, 2026
The overnight issue watcher is picking up two of the remaining items: helper-conflict errors that name the conflicting helper, and loopback-only test hosts. The dev-app reload and
openlaunch reporting need a GUI, so they're left for later.Name the Ace holding a port; add ace serve --loopback for test hosts (#…
iamnbutler commentedon Oct 15, 2026
#386 (merged) covers two of the Remaining items.
Port 4142 is used by Ace Canary 0.0.35 (/Applications/Ace Canary.app, PID 9041), which speaks a different host protocol than this Ace (10).For a command-line host it gives the working directory and command instead. Each caller (CLI,ace serve, desktop app,bun desktop dev) adds its own remedy, and only this app's own helper is offered a restart. Ace Helper also reports an optionalversionin /health. That field is outside the proof, so HOST_PROTOCOL stays 10.ace serve --loopbackbinds only 127.0.0.1. It doesn't bind the tailnet, discover peers, or publish to the directory. Settings shows it, andbun desktop devalways uses it.The desktop dialogs and the
bun desktop devmessages weren't exercised live, because they need a GUI. The reload action and theopenlaunch report remain open.[-]Finish development-run isolation: helper conflict diagnostics, loopback test hosts, and reload[/-][+]Dev app: reload action and reporting an open launch that exits early[/+]iamnbutler commentedon Oct 15, 2026
Rescoped: with #112, #118, #123 and #386 merged, only the dev app's reload action and reporting an
openlaunch that exits before showing a window remain. The title and Status now say so. From code on main (102fb15), the desktop menu inapps/desktop/src/index.tsstill has no Reload item.