Skip to content

Pearl th-b85641: th doctor detects external-volume workspace + FDA helper - #308

Merged
brentrager merged 1 commit into
mainfrom
th-b85641-doctor-fda
Jul 28, 2026
Merged

Pearl th-b85641: th doctor detects external-volume workspace + FDA helper#308
brentrager merged 1 commit into
mainfrom
th-b85641-doctor-fda

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Problem

Big Smooth on smoo-hub looked jailed in its own workspace — "no home dir", couldn't do basically anything. Root cause: its workspace is ~/dev, a symlink to /Volumes/smoo-ext/dev (external USB volume). macOS gates external volumes behind TCC (kTCCServiceSystemPolicyRemovableVolumes); the daemon (com.smooai.smooth-daemon) has no grant and th is explicitly denied, so every filesystem op there returns EPERM.

This is separate from the seatbelt sandbox (smooth-tools/sandbox.rs), which is allow-by-default now. And Full Disk Access can't be granted programmatically — the TCC DB is SIP-protected; tccutil only resets.

Solution

  • Detect (th doctor): a macOS check that flags when the resolved workspace lives on a non-boot /Volumes path, and whether access is already denied. Boot-volume workspaces report ✓ (no FDA needed).
  • Guide (th doctor --fix-fda): opens the Full Disk Access settings pane and reveals th + the daemon binary in Finder to drag in — the fastest a manual grant can be. Warns that an ad-hoc-signed th loses the grant on every pnpm install:th rebuild (stable signing, or keeping the workspace on the boot volume, is the durable fix).

New fda.rs module holds the pure, tested logic (external-volume predicate, access probe, grant targets, workspace resolution); presentation stays in cmd_doctor / cmd_doctor_fix_fda.

Verification

  • cargo test -p smooai-smooth-cli → 432 passed (5 new fda tests).
  • cargo fmt --check clean, cargo clippy 0 errors, no new warnings from the module.
  • th doctor on a boot-volume box reports ✓ (positive /Volumes case covered by unit tests — no external volume mounted locally).

🤖 Generated with Claude Code

https://claude.ai/code/session_01G2Gv86zBefzdtdFvxHJ2bh

…lume + guided FDA helper

Big Smooth's workspace on smoo-hub is ~/dev -> /Volumes/smoo-ext (external USB
volume). macOS gates external volumes behind TCC (RemovableVolumes); the daemon
and th lack the grant, so every fs op there returns EPERM and the agent looks
jailed in its own workspace. This is separate from the seatbelt sandbox
(allow-by-default). FDA can't be granted programmatically (SIP-protected
TCC.db), so th doctor now DETECTS the trap and th doctor --fix-fda GUIDES the
one-time manual grant (opens the FDA pane, reveals th + the daemon binary in
Finder), warning that an ad-hoc-signed th loses the grant on rebuild.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G2Gv86zBefzdtdFvxHJ2bh
@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 08d9a27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager
brentrager enabled auto-merge (squash) July 28, 2026 20:14
@brentrager
brentrager merged commit 06e2cb1 into main Jul 28, 2026
3 checks passed
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.

1 participant