Skip to content

fix(core): skip unreadable skills instead of failing the machine scan - #469

Merged
siracusa5 merged 3 commits into
mainfrom
fix/scan-skip-unreadable-skills
Nov 17, 2026
Merged

siracusa5 merged 3 commits into
mainfrom
fix/scan-skip-unreadable-skills

Conversation

@siracusa5

Copy link
Copy Markdown
Collaborator

Problem

The desktop first-run scan failed with:

forbidden path: ~/.claude/skills/capture-session/SKILL.md, maybe it is not allowed on the scope for 'allow-read-text-file' permission in your capability file

That SKILL.md is a symlink into a directory outside the Tauri fs scope. readAdapterSkills (packages/core/src/import/read-skills.ts) read each SKILL.md and its capsule with no catch, so one refused file rejected importMachine and the onboarding scan showed "The machine scan did not finish".

Fix

Catch per skill. A skill whose SKILL.md or capsule can't be read is recorded in the fragment's existing skipped list (it reaches findings.adapters[].skipped) and the scan continues. This also covers an oversized capsule, which threw the same way.

The fs scope is unchanged. Widening it to follow symlinks out of ~/.claude is a security call left for a separate decision.

Verification

  • New test packages/core/__tests__/import-unreadable-skill.test.ts: a reader that throws "forbidden path" for one SKILL.md; the other skills survive and the blocked one is reported as skipped, both in readAdapterSkills and through importMachine. Fails on main, passes here.
  • core: 992 tests pass, tsc clean. desktop: 1184 tests pass, tsc clean.
  • Ran importMachine against a real home directory with a provider that emulates the Tauri read scope (realpath outside the capability roots throws, symlinks listed as Tauri lists them). On main it throws the exact error above; on this branch it completes, with the symlinked skill and one oversized .codex skill capsule listed as skipped.

Not checked: clicking through onboarding in the running Tauri app.

🤖 Generated with Claude Code

readAdapterSkills read each SKILL.md and its capsule with no catch, so one
refused file aborted importMachine. The desktop onboarding scan hit this on a
SKILL.md symlinked outside the Tauri fs scope ("forbidden path"), and an
oversized skill capsule throws the same way. Each such skill is now reported
in the fragment's skipped list (surfaced in findings) and the scan continues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@siracusa5
siracusa5 enabled auto-merge (squash) November 17, 2026 00:52
siracusa5 and others added 2 commits November 16, 2026 19:55
The AC-21 test read the palette's Preview option synchronously after the
directory check rendered; under a loaded run the command registers a tick
later and the query failed. vi.clearAllMocks also leaves queued
mockResolvedValueOnce values in place, so that one failure fed stale compile
results to the next four tests. Await the option and reset the compile and
detectPlatforms mocks in beforeEach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@siracusa5
siracusa5 merged commit 05dc54d into main Nov 17, 2026
22 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