Skip to content

fix(desktop): macOS bundled node inherits parent TCC grants#1614

Merged
esengine merged 1 commit into
mainfrom
fix/macos-tcc-inherit-1611
May 23, 2026
Merged

fix(desktop): macOS bundled node inherits parent TCC grants#1614
esengine merged 1 commit into
mainfrom
fix/macos-tcc-inherit-1611

Conversation

@esengine

@esengine esengine commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Root cause of repeated TCC prompts (Documents / Desktop / Downloads) on every task execution (桌面bug #1611): the child Reasonix.app/Contents/Resources/node lacks the com.apple.security.inherit entitlement, so macOS treats it as an independent helper with no relation to the parent .app and re-asks each time it spawns.
  • Add entitlements/main.plist (includes inherit) and wire it into Tauri's codesign via bundle.macOS.entitlements. The --deep pass propagates that entitlement to Contents/Resources/node, so signed releases let the child inherit the parent .app's TCC grants.
  • Add entitlements/node-helper.plist plus an ad-hoc codesign --sign - at the end of bundle-node.mjs to cover the unsigned-release path (when HAS_APPLE_CERT is not set in CI). That keeps the inherit entitlement attached on builds that never go through Tauri's --deep step.

Verification

Signed release (CI with HAS_APPLE_CERT==true):

codesign -d --entitlements - Reasonix.app/Contents/Resources/node
# expected to contain: <key>com.apple.security.inherit</key><true/>

Unsigned local build:

cd desktop && npm run bundle:node
codesign -d --entitlements - src-tauri/binaries/node
# expected to contain the same inherit entitlement

Test plan

  • Signed macOS release: install, grant Documents once, restart the app, run a task and confirm no further prompts
  • Unsigned macOS build: same check, validating the ad-hoc path
  • Confirm notarytool accepts inherit on the top-level binary (Apple treats it as a no-op there; if the first signed CI build is rejected we can move the entitlement into a node-only re-sign step instead)

Closes #1611

Place `node` next to a `com.apple.security.inherit` entitlement so the
child Node process inherits the .app's Documents / Desktop / Downloads
TCC grants instead of re-prompting on every spawn.

- entitlements/main.plist applied via bundle.macOS.entitlements; Tauri's
  --deep codesign propagates inherit to Contents/Resources/node when
  Developer ID is configured
- bundle-node.mjs adds an ad-hoc codesign with the helper plist so the
  inherit entitlement still attaches on unsigned local / CI builds where
  --deep never runs

Closes #1611
@esengine esengine merged commit 9e54165 into main May 23, 2026
4 checks passed
@esengine esengine deleted the fix/macos-tcc-inherit-1611 branch May 23, 2026 11:57
esengine pushed a commit that referenced this pull request May 24, 2026
…moved, persisted usage stats, plan dispatch gate

Headline themes:
- Desktop: bundle the CLI-hosted React dashboard, retire Tauri+Preact duplicate (#1418)
- Config: drop preset abstraction; flash/pro are direct model selections (#1657, #1630)
- Stats: persist cumulative usage to session meta + auto-restore on startup (#1667, #1680, #1643, #1628)
- Plans: editMode="plan" enforced at the ToolRegistry dispatch gate (#1681); step advance fix (#1629)
- Context: fold once at turn start, drop pre-flight + byte-ceiling (#1642, #1646); collapsible compacted card (#1649)
- Subagents: per-skill flash/pro override + Settings UI (#1632)
- Desktop polish: sidebar drag-resize (#1688), responsive collapse (#1585), copy/edit overlay + msg-history nav (#1645), Esc closes modal not turn (#1685), QQ tab isolation (#1672), DiffCard for edits (#1662), theme-aware highlighting (#1655), system events toggle (#1654/#1650), macOS TCC inheritance (#1614), dashboard.enabled (#1612)
- Dashboard polish: persistent session URL (#1586, #1589, #1599), theme-aware highlighting (#1664), IME confirm-enter guard (#1689), code-fence lang fix (#1677), vendor chunk split (#1587), markdown table h-scroll (#1562)
- TUI: Alt+S input stash/recall; static history isolated from input rerenders (#1635); legacy mouse drop (#1637, #1648); multi-edit gated in review (#1647)
- Diff: SplitDiff column border holds under CJK (#1686)
- MCP: workspace roots passed to servers (#1625); codeCommand honors mcpServers (#1603)
- Config plumbing: (baseUrl, apiKey) resolved as a tuple (#1658); stale model id self-heal (#1663)

See CHANGELOG for the full list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

桌面bug

1 participant