Skip to content

fix(skills): say an SSH repo was not scanned instead of dropping it silently - #27261

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/d4-d4-v5b
Oct 10, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/d4-d4-v5b

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​45 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​35

ELI5

When a project lives on an SSH machine, Orca's Skills page quietly ignored it. Now the page lists that project and says it was not scanned, so the missing skills have an explanation.

What Changed

  • Before: skill discovery skipped every SSH-backed repo without leaving any record. The Skills page's folder list and skill counts covered only local folders, with nothing to show that a repo had been left out.
  • After: each skipped SSH repo shows up in the folder list as "Remote repo — not scanned". Local results are unchanged.
  • Mechanism: discoverSkills now adds one source per SSH-backed repo, with exists: false and skippedReason: 'remote-repo'. The 'remote-repo' reason was already part of the type and the renderer already displayed it, but nothing ever produced it. The new skill-remote-repo-sources.ts builds these sources. They have no scan roots, so nothing is read from disk and the remote path is never treated as a local folder. A scan filtered to non-repo sources (for example sourceKinds: ['home']) leaves them out. Repos owned by a paired Orca server are also left out, because that server scans its own repos when it is the focused host.

Why

This turns a silent gap into a visible one with the smallest change, because the type and the UI were already in place. Actually reading skill folders on the SSH host is a separate piece of work: it needs a discovery target and a transport that run on that host, and the issue asks for it to be scoped separately. The design planned to also send workspace identity with skills.* calls. I left that out: today no caller can name an SSH workspace that its host can scan, so sending it would change nothing until SSH discovery exists.

Linked Issue

Fixes #11466. The new test fails on main (no remote-repo source is produced) and passes here. Discovering skills on the SSH host itself is left for follow-up work, as the issue suggests.

Visual Proof

N/A. The folder list already renders the "Remote repo — not scanned" label. This change only supplies the data that label was waiting for, and is covered by a unit test.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated: discovery.test.ts checks that an SSH repo produces exactly one remote-repo source, that none of its subfolders are scanned locally, that a paired-server repo produces none, and that a home-only scan produces none. Related discovery, install-verification and source-inventory tests pass. pnpm tc:node, oxlint and check:code-quality:changed pass.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • SSH: this is the case the change is about. No remote path is read or stat'ed.
  • Windows and WSL: WSL discovery is unchanged. basename handles POSIX remote paths on Windows.
  • Folder workspaces: they are treated the same as git repos, and the host check does not depend on git.
  • Backwards compatibility: older clients already know the 'remote-repo' value from the shared type.
  • Install verification: only 'unavailable' sources affect it, so these new sources cannot change an install verdict.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…ilently

Discovery skipped every SSH-backed repo without a trace, so the Skills page
counted only local folders and never said a repo was left out. Each skipped
SSH repo now appears as a source with skippedReason 'remote-repo', which the
Skills folder list already renders as 'Remote repo - not scanned'.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f8248394-aeab-4a8d-a945-a173f06cf766

📥 Commits

Reviewing files that changed from the base of the PR and between 291549e and 11895ff.


📒 Files selected for processing (3)
  • src/main/skills/discovery.test.ts
  • src/main/skills/discovery.ts
  • src/main/skills/skill-remote-repo-sources.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.



📝 Walkthrough

Walkthrough

When the source-kind filter is absent or includes repo, discoverSkills adds sources for SSH-hosted repositories. Each source is marked as nonexistent with the remote-repo skipped reason. Tests verify its fields, exclude nested sources, and confirm that home-only filtering omits it.


Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 11895

SSH-backed repos now appear in the skills folder list as not scanned, instead of being silently omitted. Local scanning is unchanged and no merge-blocking risk was found.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: showing SSH repositories as unscanned instead of omitting them.
Description check Passed The description is complete and explains the user impact, implementation, rationale, scope boundaries, linked issue, testing, compatibility considerations, and checklist status. It also documents that…
Linked Issues check Passed Issue #11466 requires visible reporting for SSH-backed repositories. buildRemoteRepoSkillSources emits one SkillDiscoverySource per SSH repository with exists: false and `skippedReason: 'remote-…
Out of Scope Changes check Passed The diff adds only the remote-repository source builder, its integration into skill discovery, and focused automated coverage. The changes support issue #11466 by making skipped SSH repositories visib…

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit af80ba3 into main Oct 10, 2026
30 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.

Skills on an SSH-connected repo host are silently undiscoverable — 'remote-repo' skippedReason is declared but never emitted

1 participant