Skip to content

Update Orca's skills with Orca's own installer instead of npx skills - #31688

Merged
Jinwoo-H merged 38 commits into
mainfrom
jinwoo/bundled-skill-install-switch
Oct 23, 2026
Merged

Jinwoo-H merged 38 commits into
mainfrom
jinwoo/bundled-skill-install-switch

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 35 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1953 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4706 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2753
Prod 81 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2394 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4487 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2093

Stacked on #31662 (the installer itself). Review that one first; this PR's diff is against its branch.

ELI5

Orca ships a few of its own skills (orca-cli, orchestration, ...). Until now, "Update skills" in the app and orca skills install|update in the terminal ran a third-party command, npx skills add. That needs Node, Git and the network, and fails in ways Orca can't see (translated Git output #28914, rate limits, offline machines). #31662 added Orca's own small installer. This PR switches the app and the CLI over to it and deletes the npx code.

What Changed

Before: the app scanned skill folders with its own freshness scanner, then spawned npx --yes [email protected] add … and re-scanned to guess what had worked. Copies it could not safely rewrite were "Skipped" with no way to fix them in the app. The CLI printed and ran the same npx command.

After (this computer only):

  • The badge, nudge, Settings status pills and the Update skills dialog all read one plan from the installer. Update only touches locations that already hold the skill; it never adds the skill for another agent (that is a separate Install action, setup surfaces in PR 4).
  • The dialog shows one row per skill that needs something: Will update / Will repair, and each copy left alone named by its agent (path on hover), e.g. Claude Code: You've changed this copy, with a Replace with Orca's copy (keeps a backup) checkbox (off by default). Skills with nothing to do collapse into one line ("orca-linear is up to date."). Show all locations lists every location per skill: agent or "Shared folder", ~ path, and what happens there ("Will update", "Link, no change", ...). Labels and ~ paths come from the summary, not the component.
  • Ticking Replace asks the installer for a new plan with that path forced; Orca first moves the copy to ~/.agents/.orca-skill-backups/. Without a shared copy, Replace puts Orca's copy in place rather than adding one.
  • Update sends the digest of the plan on screen. The installer plans again under its locks and writes only if that digest still matches, so the dialog can never run something other than what it showed.
  • After Update the dialog reads ✓ Updated N skills · M left alone, each changed skill says Updated, and the copies left alone keep their Replace choice; the button is Done. Results are kept per target (only local exists today) and a completion for a run that was replaced is dropped.
  • orca skills install|update [--skill …|--all] [--agent …] [--local] [--force] [--dry-run] [--json] runs the same planner in-process, in the packaged CLI too (new CLI main entry skills/bundled-skill-install/cli-entry). --dry-run prints the plan and its digest; a real run executes that digest. Exit code comes from the summary (1 only if something failed or changed mid-run; folders left alone are warnings). --force replaces every copy left alone, with a backup. The skills CLI's agent keys (claude-code, ...) still work for --agent.
  • WSL projects, SSH hosts and paired servers are still not planned by the app (same as before: no badge there). Their RPC path is the next PR.

Mechanism: new IPC skills:bundledPlan / skills:bundledExecute (local host only) call runtime methods that resolve the destination through the existing install authority (createSkillInstallAuthority) and Orca's Claude profile root, wait for cloud-install recovery, and build the installer input with one builder shared by the app and the CLI (localBundledSkillInput, which also owns the Electron-free agent detection). The update path asks the planner for installedOnly: every location that holds nothing is dropped (the shared slot stays only when an existing agent link points at it, so a broken link is repaired), and a skill with no copy of Orca's anywhere is dropped. The app and the CLI resolve the Claude skills folder with one rule inside localBundledSkillInput (the user's CLAUDE_CONFIG_DIR, ignoring one Orca injected into a managed-account terminal, else ~/.claude); a test asserts both produce the identical plan.

Deleted: both npx spawn sites (skill-update-run.ts, the CLI's runNpxSkills), the freshness inventory, eligibility, placement-observation, topology, plugin-cache scan, plugin-manifest roots, update-outcome and bundle-manifest loader modules, shared/skill-freshness.ts, skills-cli-agent-detection.ts, the renderer grouping/skip-reason/scan-issue/chip-copy/selection modules, skill-update-roundtrip.yml and verify-skill-update-roundtrip.mjs (not a required check; pr.yml untouched), and 62 i18n keys they used. The copy-paste install commands on setup surfaces still use the npx builders; replacing them is PR 4.

Why

The old flow had two deciders (the scanner and npx) that disagreed: the dialog could promise an update the CLI then skipped, or report "Updated" from a re-scan heuristic. Now there is one: the plan. The dialog, badge, CLI output and exit code only render the plan or the result summary, and the Replace choice re-plans rather than editing operations in the renderer. Executing by digest rather than re-sending operations means a stale or tampered client cannot make the installer do anything it would not plan itself.

Deviations from the design doc (design-rev4), all deliberate:

  • plan() gained installedOnly (update plans only locations that already hold the skill) and force: 'all' (the CLI's --force).
  • Someone else's same-named skill (leave/other) counts as current in the summary, so it is listed but never turns a pill amber.
  • No Stop button, run log or "Copy command" fallback: the installer is a few renames, and the design drops the npx fallback.
  • resources/skills/current-manifest.json has no runtime reader any more; removing it from the generator is left for a follow-up.

Linked Issue

Refs #28914. Supersedes #29196 / #29206.

Visual Proof

Real dev app, hidden window (ORCA_BACKGROUND_LAUNCH=1), isolated user-data and an isolated HOME holding a real npx [email protected] install of an older Orca release. The old dialog was the npx flow described above; these show the new flow before and after Update on that install.

Single-agent Claude layout (copies in ~/.claude/skills, computer-use edited by hand; Codex, Cursor, Gemini, Grok and others also detected on this Mac):

Nudge: nudge
Before Update: before
After Update: after
Replace ticked on the result, re-planned: replace
Show all locations (state under each path): single locations

Shared layout (~/.agents/skills with Claude links), with Show all locations, then after Update:
shared locations
shared after

After Update no folder was created for any other agent and no shared copy was written; the npx lock file was byte-identical. Replace on the edited copy replaced it in place and left a backup in ~/.agents/.orca-skill-backups/. On the shared layout the shared copy was updated in place and the Claude links kept.

Testing

  • Tests: location labels and ~ collapse (POSIX and Windows homes), dialog (compact rows, up-to-date line, Show all locations, Replace re-plans with force and executes that digest, Update disabled while the forced plan loads, result lines, stale completion dropped, install-only label), row, nudge (summary key, dismissal, link-only does not nudge), pill, status segment, plan store, display status, IPC (local only, input validation), summary, installedOnly/force: 'all' on real disk, the shared input builder, and a layout-table row for a Claude-only npx install with four other agents detected (exactly one op, nothing elsewhere), a broken existing link repaired, app and CLI planning identically, the CLI against a real temp HOME (dry-run writes nothing; executed ops equal the dry-run's ops and digest; update skips uninstalled skills; --force with backup; held lock exits 1; agent aliases; --local).

  • Built CLI (ELECTRON_RUN_AS_NODE + out/cli/index.js) on copies of both npx homes. On the Claude-only home with real agent detection, update --all --dry-run planned only the three ~/.claude/skills folders. orca skills update --all --dry-run printed the plan and digest, the real run printed orca-cli: Updated, orchestration: Updated; on the edited home it reported computer-use: Installed · 1 left alone: You've changed this copy with the --force hint, and --force replaced it with a backup.

  • Ran on macOS: pnpm tc, the tests above plus the touched settings/skills/runtime suites, check:code-quality:changed, oxlint (default, type-aware, anti-slop, dead classes), oxfmt --check ., import boundaries, sync-spawn ratchet, all ratchets, reliability gates, RPC catalog, bundled guides, skill manifest, localization catalogs/extraction/coverage, verify-skills-cli-runtime. orca-runtime.test.ts has 2 failures that also fail on the base branch on this Mac (/private/var realpath).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

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

  • Windows, Linux, WSL and SSH were not run here. The renderer gate (canUseLocalSkillFreshness) still keeps WSL and remote targets off the local plan.
  • Mixed versions: no RPC or wire changes; the new IPC is app-internal.

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)

One planner decides what installing Orca's bundled skills does to each
target folder; execute re-plans under per-path locks and runs only a plan
whose digest still matches; a shared summary derives badge, wording and
exit code. A copy counts as Orca's untouched one only when its SKILL.md
bytes match a version some build shipped (resources/skills/released-digests.json,
generated from git history and checked add-only).

Nothing calls this yet; the npx path is unchanged.
A leave is no longer a failure: the outcome line says what happened plus
"N left alone: <reason>", and the exit code is 1 only for a failed or
changed op. Backups for every scope go to <home>/.agents/.orca-skill-backups
on the executing host, so a project Replace never writes into the repo;
moving there falls back to copy, verify, then remove across filesystems.
The app's Update skills dialog, badge, nudge and status pills now read the
bundled-skill plan and summary, and Update executes the reviewed plan's
digest. `orca skills install|update` runs the same planner in-process with
--dry-run, --force, --json and per-summary exit codes. Removes both npx
spawn sites, the freshness inventory modules and the npx round-trip CI.
…p and CLI

installedOnly now drops every location that holds nothing (keeping the shared slot
only when an existing agent link points at it), so Update never adds a skill for
another agent. The app and CLI resolve the Claude skills folder through the same
rule in localBundledSkillInput; a test asserts both plan identically.
…gent

summarizeBundledSkillPlan now returns each skill's locations, labelled by
agent (or "Shared folder") with a ~-collapsed path; the dialog shows one row
per skill that needs something, collapses up-to-date skills into one line, and
lists every location behind "Show all locations". The result reads "Updated N
skills · M left alone". Under installedOnly a Replace with no shared copy
replaces in place instead of adding one.
…nder

Split the update dialog's rows, headline and footer into components, move the Update label
next to the other plan copy, and use z.strictObject for the request schemas.
The orcad bundle rejects a literal non-ASCII character in a regex.
Drop the deleted roundtrip workflow's group from the closed-PR cancellation fixture.
…s on Windows

Directory links in fixtures are junctions on Windows, which need no
Developer Mode; the one file-link fixture is skipped there.
@Jinwoo-H
Jinwoo-H changed the base branch from jinwoo/bundled-skill-install-core to main October 23, 2026 02:19
…install-switch

# Conflicts:
#	src/main/skills/bundled-skill-install/layouts.test.ts
#	src/main/skills/bundled-skill-install/plan.ts
#	src/main/skills/bundled-skill-install/service.ts
#	src/main/skills/bundled-skill-install/skill-home.test-support.ts
#	src/shared/bundled-skill-plan.ts
#	src/shared/bundled-skill-summary.test.ts
#	src/shared/bundled-skill-summary.ts
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The change replaces the prior skill-freshness inventory and external skills CLI update flow with bundled-skill planning and execution. The CLI and app now expose plan and execute operations. The renderer displays plans, locations, and outcomes, and supports reviewed replacement choices. The change also removes the previous inventory, plugin scanner, update runner, and related round-trip workflow.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 08c7e

The change is mergeable with minor follow-up. Planning should fail visibly on unexpected filesystem errors instead of treating them as "no pending cloud install". The status bar should also say a failed skill update failed, not that it was skipped.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 24.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 87 functions across 50 files. (29 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: replacing the npx skills workflow with Orca's own installer.
Description check Passed The description is comprehensive and covers the required sections, user-visible behavior, implementation details, rationale, linked issues, visual proof, testing, platform limitations, and checklist s…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is comprehensive and covers the required sections, user-visible behavior, implementation details, rationale, linked issues, visual proof, testing, platform limitations, and checklist status.

Full details: Docstring Coverage

Explanation

Docstring coverage is 24.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 87 functions across 50 files. (29 skipped: 10 unsupported, 19 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • 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.

@Jinwoo-H
Jinwoo-H merged commit d3dbd96 into main Oct 23, 2026
63 of 64 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3ef4c154-1c47-45c8-82cd-c7fcd65cb13c
📥 Commits

Reviewing files that changed from the base of the PR and between 6768988 and 08c7ea4.

📒 Files selected for processing: 116
  • .github/workflows/ci-closed-pr-caches.yml
  • .github/workflows/release-cut.yml
  • .github/workflows/skill-update-roundtrip.yml
  • config/build-plugins/plain-node-entry-guard.ts
  • config/electron-builder.config.cjs
  • config/process-host-direct-import-baseline.txt
  • config/scripts/build-orcad.mjs
  • config/scripts/ci-closed-pr-cancellation.test.mjs
  • config/scripts/ci-shard-timings.json
  • config/scripts/electron-vite-output-contract.test.ts
  • config/scripts/pr-package-test-paths.mjs
  • config/scripts/run-node-server-tests.mjs
  • config/scripts/verify-skill-update-roundtrip.mjs
  • config/scripts/verify-skill-update-roundtrip.test.mjs
  • config/scripts/windows-cmd-shim-spawn-boundary.test.mjs
  • config/tsconfig.node.json
  • docs/site/content/docs/cli/reference.mdx
  • docs/site/content/docs/cli/skills.mdx
  • src/cli/cli-version.test.ts
  • src/cli/cli-version.ts
  • src/cli/handlers/bundled-skill-install-command.ts
  • src/cli/handlers/skills.ts
  • src/cli/skills-cli-agent-aliases.test.ts
  • src/cli/skills-cli-agent-aliases.ts
  • src/cli/skills-install.test.ts
  • src/cli/skills.test.ts
  • src/cli/specs/skills.ts
  • src/main/ipc/skills.test.ts
  • src/main/ipc/skills.ts
  • src/main/preflight/agent-detection.ts
  • src/main/preflight/installed-agent-detection.ts
  • src/main/runtime/runtime-bundled-skill-install.test.ts
  • src/main/runtime/runtime-bundled-skill-install.ts
  • src/main/runtime/runtime-skill-command-contract.ts
  • src/main/runtime/runtime-skill-install-commands.ts
  • src/main/skills/bundled-skill-install/cli-entry.ts
  • src/main/skills/bundled-skill-install/cloud-state.ts
  • src/main/skills/bundled-skill-install/layouts.test.ts
  • src/main/skills/bundled-skill-install/local-host.test.ts
  • src/main/skills/bundled-skill-install/local-host.ts
  • src/main/skills/bundled-skill-install/plan-selection.test.ts
  • src/main/skills/bundled-skill-install/plan.ts
  • src/main/skills/bundled-skill-install/service.ts
  • src/main/skills/bundled-skill-install/skill-home.test-support.ts
  • src/main/skills/skill-bundle-artifacts.test.ts
  • src/main/skills/skill-bundle-artifacts.ts
  • src/main/skills/skill-freshness-eligibility.test.ts
  • src/main/skills/skill-freshness-eligibility.ts
  • src/main/skills/skill-freshness-inventory-limits.test.ts
  • src/main/skills/skill-freshness-inventory.test.ts
  • src/main/skills/skill-freshness-inventory.ts
  • src/main/skills/skill-freshness-placement-observation.ts
  • src/main/skills/skill-installation-topology.ts
  • src/main/skills/skill-package-identity.ts
  • src/main/skills/skill-plugin-cache-scan.test.ts
  • src/main/skills/skill-plugin-cache-scan.ts
  • src/main/skills/skill-plugin-manifest-roots.ts
  • src/main/skills/skill-update-outcome.test.ts
  • src/main/skills/skill-update-outcome.ts
  • src/main/skills/skill-update-run.test.ts
  • src/main/skills/skill-update-run.ts
  • src/preload/api/agent-skill-api.ts
  • src/preload/api/skills-bridge.ts
  • src/renderer/src/components/floating-terminal/FloatingTerminalOrchestrationDialog.freshness.test.tsx
  • src/renderer/src/components/settings/AgentSkillSetupPanel.freshness.test.tsx
  • src/renderer/src/components/settings/use-settings-navigation-model.ts
  • src/renderer/src/components/settings/use-settings-store-model.ts
  • src/renderer/src/components/skills/SkillFreshnessNudge.test.tsx
  • src/renderer/src/components/skills/SkillFreshnessNudge.tsx
  • src/renderer/src/components/skills/SkillFreshnessStatusPill.test.tsx
  • src/renderer/src/components/skills/SkillFreshnessStatusPill.tsx
  • src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsx
  • src/renderer/src/components/skills/SkillFreshnessUpdateDialog.tsx
  • src/renderer/src/components/skills/SkillUpdateRow.test.tsx
  • src/renderer/src/components/skills/SkillUpdateRow.tsx
  • src/renderer/src/components/skills/SkillUpdateRows.tsx
  • src/renderer/src/components/skills/bundled-skill-plan-fixtures.test-support.ts
  • src/renderer/src/components/skills/skill-freshness-grouping.test.ts
  • src/renderer/src/components/skills/skill-freshness-grouping.ts
  • src/renderer/src/components/skills/skill-freshness-scan-issues.tsx
  • src/renderer/src/components/skills/skill-freshness-skipped-reason.test.ts
  • src/renderer/src/components/skills/skill-freshness-skipped-reason.ts
  • src/renderer/src/components/skills/skill-freshness-summary-headline.tsx
  • src/renderer/src/components/skills/skill-location-chip-copy.ts
  • src/renderer/src/components/skills/skill-plan-op-copy.ts
  • src/renderer/src/components/skills/skill-update-run-store.ts
  • src/renderer/src/components/skills/use-reviewed-skill-plan.ts
  • src/renderer/src/components/skills/use-skill-update-selection.ts
  • src/renderer/src/components/status-bar/SkillUpdateStatusSegment.test.tsx
  • src/renderer/src/components/status-bar/SkillUpdateStatusSegment.tsx
  • src/renderer/src/hooks/useSkillFreshness.test.tsx
  • src/renderer/src/hooks/useSkillFreshness.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-skill-nav-install-status.test.ts
  • src/renderer/src/lib/agent-skill-nav-install-status.ts
  • src/renderer/src/lib/skill-freshness-display-status.test.ts
  • src/renderer/src/lib/skill-freshness-display-status.ts
  • src/renderer/src/web/preload-api/web-host-capability-api.ts
  • src/shared/agent-feature-install-commands.ts
  • src/shared/bundled-skill-locations.test.ts
  • src/shared/bundled-skill-locations.ts
  • src/shared/bundled-skill-plan.ts
  • src/shared/bundled-skill-summary.test.ts
  • src/shared/bundled-skill-summary.ts
  • src/shared/file-name-sort.ts
  • src/shared/skill-freshness.ts
  • src/shared/skills-cli-agent-detection.ts
  • src/shared/skills-cli-agent-keys.test.ts
  • src/shared/skills-cli-agent-keys.ts
💤 Files with no reviewable changes: 37
  • src/main/skills/skill-freshness-inventory-limits.test.ts
  • src/main/skills/skill-plugin-cache-scan.test.ts
  • src/renderer/src/components/skills/skill-freshness-skipped-reason.test.ts
  • src/main/skills/skill-update-run.test.ts
  • config/scripts/ci-closed-pr-cancellation.test.mjs
  • .github/workflows/ci-closed-pr-caches.yml
  • src/main/skills/skill-bundle-artifacts.test.ts
  • src/renderer/src/components/skills/skill-freshness-grouping.test.ts
  • config/scripts/windows-cmd-shim-spawn-boundary.test.mjs
  • src/shared/agent-feature-install-commands.ts
  • src/shared/skills-cli-agent-detection.ts
  • config/scripts/verify-skill-update-roundtrip.mjs
  • src/main/skills/skill-update-outcome.test.ts
  • src/renderer/src/components/skills/skill-location-chip-copy.ts
  • config/tsconfig.node.json
  • src/main/skills/skill-update-run.ts
  • .github/workflows/release-cut.yml
  • src/main/skills/skill-installation-topology.ts
  • src/main/skills/skill-plugin-cache-scan.ts
  • src/main/skills/skill-update-outcome.ts
  • src/renderer/src/components/skills/use-skill-update-selection.ts
  • config/scripts/verify-skill-update-roundtrip.test.mjs
  • src/renderer/src/components/skills/skill-freshness-scan-issues.tsx
  • src/renderer/src/components/skills/skill-freshness-skipped-reason.ts
  • src/main/skills/skill-freshness-inventory.test.ts
  • .github/workflows/skill-update-roundtrip.yml
  • src/main/skills/skill-freshness-eligibility.test.ts
  • config/process-host-direct-import-baseline.txt
  • src/shared/skills-cli-agent-keys.ts
  • src/main/skills/skill-bundle-artifacts.ts
  • src/renderer/src/components/skills/skill-freshness-grouping.ts
  • src/main/skills/skill-freshness-inventory.ts
  • src/main/skills/skill-freshness-eligibility.ts
  • src/main/skills/skill-plugin-manifest-roots.ts
  • src/main/skills/skill-freshness-placement-observation.ts
  • config/scripts/ci-shard-timings.json
  • src/shared/skill-freshness.ts

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

Comment on lines +10 to +20
async function anyFileExists(paths: readonly string[]): Promise<boolean> {
const found = await Promise.all(
paths.map((path) =>
lstat(path).then(
() => true,
() => false
)
)
)
return found.includes(true)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Rethrow unexpected lstat errors in anyFileExists.

Line 15 maps every lstat rejection to false. EACCES, EPERM, ELOOP, or an I/O error on a journal or receipt path then reads as "no pending transaction" or "no cloud receipt".

Two consequences follow:

  • hasPendingCloudTransaction can return false while a cloud install is still running. planTarget then does not mark the op busy, and the plan can write over a path that the cloud transaction holds.
  • hasCloudReceipt can return false for a cloud-installed copy. planTarget then classifies it as Orca's released or edited copy and updates or replaces it.

Treat only ENOENT and ENOTDIR as "absent". Rethrow every other error so planning fails visibly.

🛡️ Proposed fix
--- "a/src/main/skills/bundled-skill-install/cloud-state.ts"
+++ "b/src/main/skills/bundled-skill-install/cloud-state.ts"
@@ -7,17 +7,23 @@
 import { skillRemovalJournalPath } from '../skill-remove-recovery'
 
 // What cloud skill sharing left at a path: a pending transaction, or a receipt for its package.
 async function anyFileExists(paths: readonly string[]): Promise<boolean> {
   const found = await Promise.all(
     paths.map((path) =>
       lstat(path).then(
         () => true,
-        () => false
+        (error: unknown) => {
+          const code = (error as NodeJS.ErrnoException | null)?.code
+          if (code === 'ENOENT' || code === 'ENOTDIR') {
+            return false
+          }
+          throw error
+        }
       )
     )
   )
   return found.includes(true)
 }
 
 /** Cloud installs key state on the realpath'd destination, so check both spellings. */
 export function stateKeysFor(path: string, realPath: string): string[] {

Based on learnings: only ENOENT and ENOTDIR mean "does not exist" in a stat/access existence check. Other errors (ELOOP, EACCES, EPERM) must propagate.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async function anyFileExists(paths: readonly string[]): Promise<boolean> {
const found = await Promise.all(
paths.map((path) =>
lstat(path).then(
() => true,
() => false
)
)
)
return found.includes(true)
}
async function anyFileExists(paths: readonly string[]): Promise<boolean> {
const found = await Promise.all(
paths.map((path) =>
lstat(path).then(
() => true,
(error: unknown) => {
const code = (error as NodeJS.ErrnoException | null)?.code
if (code === 'ENOENT' || code === 'ENOTDIR') {
return false
}
throw error
}
)
)
)
return found.includes(true)
}

Source: Learnings

Comment on lines +71 to +72
'auto.components.status.bar.SkillUpdateStatusSegment.attentionTooltip',
'Some skill updates were skipped — click to see details'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not report a failed update as "skipped".

The fallback branch handles three cases:

  • A run with state: 'error', where the IPC request rejected.
  • A run with summary.ok === false, where an operation failed or the disk changed.
  • A run with summary.ok && needsAttention.

All three cases use the tooltip "Some skill updates were skipped" and the same aria-label. In the first two cases the update did not skip anything; it failed. The label already separates the third case. Use that same condition to choose the tooltip and the aria-label, so that a failure reads as a failure.

Proposed fix
--- "a/src/renderer/src/components/status-bar/SkillUpdateStatusSegment.tsx"
+++ "b/src/renderer/src/components/status-bar/SkillUpdateStatusSegment.tsx"
@@ -67,10 +67,16 @@
               'auto.components.status.bar.SkillUpdateStatusSegment.attentionLabel',
               'Skills need attention'
             ),
-      tooltip: translate(
-        'auto.components.status.bar.SkillUpdateStatusSegment.attentionTooltip',
-        'Some skill updates were skipped — click to see details'
-      ),
+      tooltip:
+        run.state === 'done' && run.summary.ok
+          ? translate(
+              'auto.components.status.bar.SkillUpdateStatusSegment.attentionTooltip',
+              'Some skill updates were skipped — click to see details'
+            )
+          : translate(
+              'auto.components.status.bar.SkillUpdateStatusSegment.failedTooltip',
+              'Some skill updates failed — click to see details'
+            ),
       ariaLabel: translate(
         'auto.components.status.bar.SkillUpdateStatusSegment.attentionAria',
         'Some skill updates were skipped. Click to open details.'

Apply the same split to ariaLabel. Use intent-named localization IDs and add the new keys to the locale catalogs. This follows the learning on new user-facing strings: "use intent-named localization IDs with named interpolation placeholders".

Also applies to: 75-76

Source: Learnings

smwbev added a commit to smwbev/orca that referenced this pull request Oct 24, 2026
187 commits landed on main between f045046 and 7cafdb0. All seven catalogs conflicted along with en-runtime-required.json, so they are taken from main and the prune is recomputed in one pass. It is the previous 1,624 keys plus 9: five lost their reader when stablyai#32284 unified the single and multiple PR hover details, two when stablyai#31688 moved skill updates to Orca's own installer, and two when stablyai#28709 reworked where chat agents are offered. None left the set. Since stablyai#32782 filled the missing entries in the other catalogs, all seven now shed the same 1,633 keys. en.json goes from 16,992 entries to 15,359; en-runtime-required.json keeps 615 of them.

native-chat-shared-copy-matches-catalog.test.ts merged cleanly this time and still differs from main by exactly the branch's edit.
shin902 added a commit to shin902/orca that referenced this pull request Nov 6, 2026
- preflight-critical-path benchmark: resolve the baseline from the first
  parent of the PR head (HEAD^2^1 on merge-commit checkouts) instead of
  HEAD^1, which is the base on pull_request checkouts and predates the
  sync's gated-module moves (win32-utils -> windows-directory-acl);
  fetch-depth 2 -> 3 so that commit is present.
- flaky-test-pattern ratchet: raise git maxBuffer to 64 MB (same as
  listTrackedFiles); the sync PR's --name-status diff is ~3.2 MB and
  overflowed Node's 1 MB default (spawnSync git ENOBUFS).
- flaky-test-pattern baseline: record 4 findings from two upstream-added
  watcher tests (stablyai#33407) that the fork's baseline never covered.
- delete the orphaned skill-update-roundtrip fixtures test: upstream
  removed .github/workflows/skill-update-roundtrip.yml in stablyai#31688, so the
  test reads a file that no longer exists.
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