Repository navigation
Add managed updates for bundled agent skills - #8496
brennanb2025 wants to merge 10 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThis change adds bundled skill manifests and release mappings, packages skill resources, and validates them in CI and release workflows. It introduces skill inventory, adoption, replacement, update, persistence, transaction recovery, filesystem identity, and mutation-authorization logic. IPC, preload, shared types, WSL host handling, renderer hooks, setup panels, settings management UI, adoption prompts, auto-update behavior, terminal exit handling, localization, and end-to-end coverage are added or updated. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 16
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/skills/discovery.ts (1)
74-100: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAlso exclude symlink aliases to
.orca-skill-transactions. The rawentry.namecheck blocks only the direct directory entry; a differently named symlink that resolves to the reserved transaction root still gets traversed because symlinked directories are followed later invisit(). Check the resolved basename before descending.
🧹 Nitpick comments (5)
src/shared/execution-host.ts (1)
86-121: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider extracting the shared prefix-decode logic.
The
ssh:,runtime:, and nowwsl:branches inparseExecutionHostIdrepeat the same "slice prefix → check empty →decodeURIComponentin try/catch → check empty-after-decode" pattern. A small helper would remove the triplication and make future host kinds cheaper to add.♻️ Proposed refactor
+function decodePrefixedHostPart(normalized: string, prefix: string): string | null { + const encoded = normalized.slice(prefix.length) + if (!encoded) { + return null + } + try { + const decoded = decodeURIComponent(encoded) + return decoded ? decoded : null + } catch { + return null + } +} + export function parseExecutionHostId(value: string | null | undefined): ParsedExecutionHost | null { const normalized = normalizeHostPart(value) if (!normalized) { return null } if (normalized === LOCAL_EXECUTION_HOST_ID) { return { kind: 'local', id: LOCAL_EXECUTION_HOST_ID } } if (normalized.startsWith('ssh:')) { - const encoded = normalized.slice('ssh:'.length) - if (!encoded) { - return null - } - try { - const targetId = decodeURIComponent(encoded) - return targetId ? { kind: 'ssh', id: `ssh:${encoded}`, targetId } : null - } catch { - return null - } + const targetId = decodePrefixedHostPart(normalized, 'ssh:') + return targetId ? { kind: 'ssh', id: `ssh:${normalized.slice('ssh:'.length)}`, targetId } : null } if (normalized.startsWith('runtime:')) { - const encoded = normalized.slice('runtime:'.length) - if (!encoded) { - return null - } - try { - const environmentId = decodeURIComponent(encoded) - return environmentId ? { kind: 'runtime', id: `runtime:${encoded}`, environmentId } : null - } catch { - return null - } + const environmentId = decodePrefixedHostPart(normalized, 'runtime:') + return environmentId + ? { kind: 'runtime', id: `runtime:${normalized.slice('runtime:'.length)}`, environmentId } + : null } if (normalized.startsWith('wsl:')) { - const encoded = normalized.slice('wsl:'.length) - if (!encoded) { - return null - } - try { - const distro = decodeURIComponent(encoded) - return distro ? { kind: 'wsl', id: `wsl:${encoded}`, distro } : null - } catch { - return null - } + const distro = decodePrefixedHostPart(normalized, 'wsl:') + return distro ? { kind: 'wsl', id: `wsl:${normalized.slice('wsl:'.length)}`, distro } : null } return null }src/main/skills/skill-package-publication.ts (1)
161-169: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate sharing-violation detection logic.
isSharingViolationhere duplicates theretryablecheck already implemented inretrySkillRename(src/main/skills/skill-transaction-rename.ts). Both independently testerror.code === 'EPERM' || error.code === 'EBUSY'. Extracting a single shared predicate (e.g. exported fromskill-transaction-rename.ts) would avoid the two implementations silently drifting if error-code handling ever needs to change (e.g. addingEACCES).♻️ Proposed refactor
-function isSharingViolation(error: unknown, enabled: boolean): boolean { - return Boolean( - enabled && - error && - typeof error === 'object' && - 'code' in error && - (error.code === 'EPERM' || error.code === 'EBUSY') - ) -} +import { isSkillRenameSharingViolationCode } from './skill-transaction-rename' + +function isSharingViolation(error: unknown, enabled: boolean): boolean { + return Boolean(enabled && isSkillRenameSharingViolationCode(error)) +}(Extract the equivalent
retryablecheck inskill-transaction-rename.tsinto an exportedisSkillRenameSharingViolationCodehelper and reuse it inretrySkillRename.)src/main/skills/skill-owned-temp-publication.ts (1)
42-56: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueClose the handle if
handle.stat()fails before the try block.
open(...)succeeds at Line 42, butawait handle.stat()on Line 47 runs while buildingcreatingoutside thetry/finally. Ifstat()rejects, the freshly created tempFileHandleis never closed, leaking a file descriptor (and leaving the exclusively-created temp inode). It's a low-probability path, but easily hardened by acquiring the stat inside the guarded region while keepingcreating/readyin the outer scope.♻️ One way to guard the stat
const handle = await open(temporaryPath, 'wx', mode) - const creating = { - ...applying, - temporary: { - path: temporaryRelativePath, - physicalIdentity: skillPhysicalIdentity(temporaryPath, await handle.stat()), - expectedFile: args.expectedFile, - state: 'creating' - } - } as const + let creating: { + kind: 'in-place' + direction: 'forward' | 'rollback' + physicalIdentity: string + temporary: { + path: string + physicalIdentity: string + expectedFile: SkillBundleFileIdentity + state: 'creating' + } + operationIndex: number + operationState: 'applying' + } try { + creating = { + ...applying, + temporary: { + path: temporaryRelativePath, + physicalIdentity: skillPhysicalIdentity(temporaryPath, await handle.stat()), + expectedFile: args.expectedFile, + state: 'creating' + } + } // Why: partial bytes are recoverable only after the exclusively created // inode is durably recorded as transaction-owned. await args.callbacks.journal(creating)(The
readyblock on Lines 93-96 then readscreatingfrom the outer scope as before.)config/reliability-gates.jsonc (1)
3604-3604: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPlaceholder
motivatingLinkson both new gates.Both new gates link only to the bare repo root (
https://github.com/stablyai/orca) instead of a specific PR/issue, unlike every other gate in this file. This weakens traceability for future maintainers auditing gate history.✏️ Suggested fix
- "motivatingLinks": ["https://github.com/stablyai/orca"], + "motivatingLinks": ["https://github.com/stablyai/orca/pull/8496"],(repeat for both entries, or reference whatever issue/PR actually motivated each gate)
Also applies to: 3685-3685
src/main/skills/skill-transaction-package-build.ts (1)
274-276: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winGuard
handle.close()so it can't mask the original failure.If
close()throws insidefinally, it replaces whatever error was propagating from thetryblock (e.g., an injected write/chmod/sync failure), which would break callers relying on the original error message for recovery/journaling decisions.🛡️ Proposed fix to avoid masking the original error
} finally { - await handle.close() + await handle.close().catch(() => undefined) }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c69ef47a-fd96-4e62-809a-a9da7a3c03d6
📒 Files selected for processing (125)
.github/workflows/pr.yml.github/workflows/release-cut.yml.github/workflows/skill-cli-roundtrip.yml.github/workflows/skill-manifest-merge-gate.ymlconfig/electron-builder.config.cjsconfig/reliability-gates.jsoncconfig/scripts/electron-builder-config.test.mjsconfig/scripts/generate-skill-bundle-manifest.mjsconfig/scripts/generate-skill-bundle-manifest.test.mjsconfig/scripts/verify-skill-cli-roundtrip.mjspackage.jsonresources/skills/current-manifest.jsonresources/skills/release-mapping.jsonresources/skills/snapshot-registry.jsonsrc/main/ipc/skills.test.tssrc/main/ipc/skills.tssrc/main/persistence.test.tssrc/main/persistence.tssrc/main/skills/discovery.test.tssrc/main/skills/discovery.tssrc/main/skills/skill-adoption-dismissal.tssrc/main/skills/skill-adoption.test.tssrc/main/skills/skill-adoption.tssrc/main/skills/skill-bundle-artifacts.tssrc/main/skills/skill-discovery-sources.tssrc/main/skills/skill-explicit-replacement.test.tssrc/main/skills/skill-explicit-replacement.tssrc/main/skills/skill-installation-topology.tssrc/main/skills/skill-managed-update.tssrc/main/skills/skill-management-inaccessible-candidate.tssrc/main/skills/skill-management-inventory.test.tssrc/main/skills/skill-management-inventory.tssrc/main/skills/skill-management-ledger.test.tssrc/main/skills/skill-management-ledger.tssrc/main/skills/skill-mutation-authority.test.tssrc/main/skills/skill-mutation-authority.tssrc/main/skills/skill-orphan-transaction-sweep.tssrc/main/skills/skill-owned-temp-publication.tssrc/main/skills/skill-package-identity.tssrc/main/skills/skill-package-observation-limits.test.tssrc/main/skills/skill-package-publication.test.tssrc/main/skills/skill-package-publication.tssrc/main/skills/skill-package-publish.test.tssrc/main/skills/skill-package-publish.tssrc/main/skills/skill-package-rollback.tssrc/main/skills/skill-package-swap-authority.test.tssrc/main/skills/skill-package-transaction-context.tssrc/main/skills/skill-published-destination-authority.tssrc/main/skills/skill-transaction-marker.test.tssrc/main/skills/skill-transaction-marker.tssrc/main/skills/skill-transaction-owned-state.tssrc/main/skills/skill-transaction-package-build.test.tssrc/main/skills/skill-transaction-package-build.tssrc/main/skills/skill-transaction-paths.tssrc/main/skills/skill-transaction-publication-state.test.tssrc/main/skills/skill-transaction-publication-state.tssrc/main/skills/skill-transaction-recovery.test.tssrc/main/skills/skill-transaction-recovery.tssrc/main/skills/skill-transaction-rename.tssrc/main/skills/skill-transaction-restore.tssrc/main/skills/skill-transaction-snapshot-validation.tssrc/main/skills/skill-transaction-workspace.test.tssrc/main/skills/skill-transaction-workspace.tssrc/main/skills/skills-cli-lock-provenance.test.tssrc/main/skills/skills-cli-lock-provenance.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/App.tsxsrc/renderer/src/components/emulator-pane/MobileEmulatorAgentSetupGuideSteps.tsxsrc/renderer/src/components/feature-tips/CliSkillSetupTerminal.tsxsrc/renderer/src/components/feature-wall/BrowserUseSkillSetupCard.tsxsrc/renderer/src/components/floating-terminal/FloatingTerminalOrchestrationDialog.tsxsrc/renderer/src/components/managed-skills/ManagedSkillAdoptionNudge.test.tsxsrc/renderer/src/components/managed-skills/ManagedSkillAdoptionNudge.tsxsrc/renderer/src/components/onboarding/FeatureSetupInlineTerminal.tsxsrc/renderer/src/components/onboarding/OnboardingInlineCommandTerminal.tsxsrc/renderer/src/components/onboarding/onboarding-feature-setup.tssrc/renderer/src/components/right-sidebar/file-explorer-operation-owner.tssrc/renderer/src/components/settings/AgentSkillSetupPanel.test.tsxsrc/renderer/src/components/settings/AgentSkillSetupPanel.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/BrowserUsePane.tsxsrc/renderer/src/components/settings/BrowserUseSkillStep.tsxsrc/renderer/src/components/settings/CliSection.tsxsrc/renderer/src/components/settings/ComputerUseSkillSetupPanel.tsxsrc/renderer/src/components/settings/EphemeralVmsPane.tsxsrc/renderer/src/components/settings/ManagedOrcaSkillsSection.tsxsrc/renderer/src/components/settings/MobileEmulatorAgentControlRow.tsxsrc/renderer/src/components/settings/OrchestrationPane.tsxsrc/renderer/src/components/settings/OrchestrationSetupCard.tsxsrc/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsxsrc/renderer/src/components/settings/linear-agent-skill-install-cta.tsxsrc/renderer/src/components/settings/managed-skill-status-copy.tssrc/renderer/src/components/settings/skill-install-terminal-exit.test.tssrc/renderer/src/components/settings/skill-install-terminal-exit.tssrc/renderer/src/components/settings/use-agent-skill-management-actions.tssrc/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsxsrc/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsxsrc/renderer/src/components/sidebar/host-header-menu-items.tssrc/renderer/src/components/sidebar/sidebar-host-options.tssrc/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/pty-connection-types.tssrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/components/terminal-pane/pty-transport-types.tssrc/renderer/src/components/terminal-pane/pty-transport.test.tssrc/renderer/src/components/terminal-pane/pty-transport.tssrc/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.tssrc/renderer/src/components/terminal-pane/remote-runtime-pty-transport.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/hooks/useManagedAgentSkills.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/ai-vault-resume-target.tssrc/renderer/src/web/web-preload-api.tssrc/shared/constants.tssrc/shared/execution-host.test.tssrc/shared/execution-host.tssrc/shared/skill-management.tssrc/shared/skills.tssrc/shared/types.tstests/e2e/settings-skill-detection.spec.tstests/e2e/settings-skill-management-production.spec.ts
…to-update-research # Conflicts: # config/reliability-gates.jsonc
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (3)
src/renderer/src/components/settings/managed-skill-status-copy.ts (1)
30-31: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win"Unknown copy" fallback text still unresolved.
Every other case returns a clean label (
'Modified','Inaccessible','Update failed');'Unknown copy'reads like leftover phrasing rather than a status badge label.✏️ Proposed fix
- return translate('auto.components.settings.ManagedOrcaSkills.unknown', 'Unknown copy') + return translate('auto.components.settings.ManagedOrcaSkills.unknown', 'Unknown')src/renderer/src/components/settings/ManagedOrcaSkillsSection.tsx (2)
44-59: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winVisibility copy still omits
agent-skills.Only
codex/claudeare checked here; managed installations can also surface viaagent-skills, so the "not visible in …" message can be inaccurate/incomplete for that provider.
91-96: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
file.changestill isn't localized.
{file.change}renders the raw literal ('added'/'removed'/'modified') rather than going throughtranslate()like every other user-facing string in this component.
🧹 Nitpick comments (2)
src/renderer/src/components/settings/managed-skill-status-copy.test.ts (1)
1-24: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd a regression test for revision
0.The implementation correctly uses
=== null(not a truthy check) so a verified revision0won't be misreported as "unverified" — a bug previously flagged on an earlier truthy-check version of this logic. Pinning this with an explicit test would guard against regressing back to a truthy check.✅ Suggested additional test
it('shows release provenance only for a mapped snapshot', () => { expect( managedSkillDiagnosticCopy({ installedReleaseRevision: 7, installedAppVersion: '1.2.3', installedPackageDigest: 'abcdef0123456789' }) ).toBe('r7 · Orca 1.2.3 · abcdef01') }) + + it('does not misreport a verified revision 0 as unverified', () => { + expect( + managedSkillDiagnosticCopy({ + installedReleaseRevision: 0, + installedAppVersion: '1.0.0', + installedPackageDigest: 'abcdef0123456789' + }) + ).toBe('r0 · Orca 1.0.0 · abcdef01') + }) })src/main/skills/skill-management-inventory.ts (1)
148-158: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider extracting the nested ternary for readability.
The
statuscomputation nests three conditional branches inline. A small helper (e.g.,resolveInstallationStatus(match, managed, managedRecord, ...)) would make the branches easier to scan, though the current logic is correct.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c4317fbe-ed42-4540-a314-c85c5216a48e
📒 Files selected for processing (41)
.github/workflows/release-cut.ymlconfig/reliability-gates.jsoncconfig/scripts/generate-skill-bundle-manifest.mjsconfig/scripts/generate-skill-bundle-manifest.test.mjspackage.jsonresources/skills/current-manifest.jsonresources/skills/release-mapping.jsonresources/skills/snapshot-registry.jsonsrc/main/ipc/filesystem-watcher-wsl.test.tssrc/main/persistence.test.tssrc/main/persistence.tssrc/main/skills/skill-candidate-concurrency.tssrc/main/skills/skill-management-inventory.test.tssrc/main/skills/skill-management-inventory.tssrc/main/skills/skill-management-status.tssrc/main/skills/skill-orphan-transaction-sweep.tssrc/main/skills/skill-package-publish.tssrc/main/skills/skill-package-transaction-context.tssrc/main/skills/skill-transaction-marker-write.tssrc/main/skills/skill-transaction-marker.tssrc/main/skills/skill-transaction-recovery.test.tssrc/main/skills/skill-transaction-recovery.tssrc/main/skills/skill-transaction-restore.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/settings/ManagedOrcaSkillsSection.tsxsrc/renderer/src/components/settings/managed-skill-status-copy.test.tssrc/renderer/src/components/settings/managed-skill-status-copy.tssrc/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsxsrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/components/terminal-pane/pty-transport-types.tssrc/renderer/src/components/terminal-pane/pty-transport.test.tssrc/renderer/src/components/terminal-pane/pty-transport.tssrc/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.tssrc/renderer/src/components/terminal-pane/remote-runtime-pty-transport.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (28)
- src/renderer/src/components/terminal-pane/pty-transport.ts
- src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsx
- src/renderer/src/components/terminal-pane/pty-transport-types.ts
- src/renderer/src/components/terminal-pane/pty-connection.ts
- src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
- resources/skills/release-mapping.json
- src/preload/index.ts
- src/preload/api-types.ts
- src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.ts
- src/main/skills/skill-orphan-transaction-sweep.ts
- resources/skills/current-manifest.json
- src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
- src/main/skills/skill-package-publish.ts
- src/renderer/src/i18n/locales/es.json
- .github/workflows/release-cut.yml
- package.json
- src/main/skills/skill-transaction-recovery.ts
- src/main/skills/skill-management-inventory.test.ts
- src/renderer/src/i18n/locales/en.json
- src/main/persistence.test.ts
- src/renderer/src/i18n/locales/zh.json
- config/scripts/generate-skill-bundle-manifest.mjs
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/ko.json
- src/main/skills/skill-transaction-restore.ts
- src/main/persistence.ts
- src/main/skills/skill-package-transaction-context.ts
- src/main/skills/skill-transaction-recovery.test.ts
Address automated review findings: workflow checkout credential persistence and base-ref template expansion, Git subtree tree-sha ordering, fail-closed frozen persistence writes, per-transaction orphan sweep isolation, reserved-transaction symlink exclusion in discovery, temp-handle close error masking, and busy/dismiss guards in the managed skills UI. Rewrite settings and nudge copy to describe user decisions instead of release diagnostics, and split the replacement dialog into ManagedSkillReplacementDialog with labeled before/after columns.
Add managedSkillAutoUpdateEnabled (default on) and a background batch that updates only already-managed, unmodified destinations on the local host. The main-process handler gates on the persisted setting and build authority, declines silently, coalesces duplicate triggers, and records failures durably; a failed destination surfaces as update-failed and is never retried automatically. An always-mounted renderer runner reuses the shared inventory cache, requests one batch per bundled release, and shows one aggregated success toast. Settings gains an "Update automatically" switch, and copy across the section, setup panels, and adoption nudge now describes automatic updates. Skill IPC host-context and write-authorization plumbing moves into named modules, and the skill-detection E2E pins the management inventory instead of reading the developer's real skill homes.
…2025/skill-auto-update-research
The web client has no local skill filesystem, so the background batch resolves to the same empty declined result the desktop returns when auto-update is unavailable.
…pr-8496-conflicts # Conflicts: # config/reliability-gates.jsonc # src/main/skills/discovery.test.ts
…pr-8496-conflicts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/ipc/skills.ts (1)
207-240: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winOne failed adoption aborts attribution for the rest of the batch.
The per-skillName loop has no isolation: if
stat/adoptExactSkillSnapshotthrows for one skill, the whole handler rejects and the remaining, otherwise-successful skill names in the same terminal-exit install never get attributed/adopted.autoUpdateManagedSkillsisolates failures per-candidate; this loop should do the same.♻️ Proposed fix
for (const skillName of new Set(args.skillNames)) { const installation = inventory.installations.find(...) if (!installation) { continue } - const modifiedAt = await stat(join(installation.unresolvedPath, 'SKILL.md')) - .then((file) => file.mtimeMs) - .catch(() => 0) - if (modifiedAt + 2_000 < args.startedAt || modifiedAt > completedAt + 2_000) { - continue - } - await adoptExactSkillSnapshot({...}) - inventory = await inventoryManagedSkills({...}) + try { + const modifiedAt = await stat(join(installation.unresolvedPath, 'SKILL.md')) + .then((file) => file.mtimeMs) + .catch(() => 0) + if (modifiedAt + 2_000 < args.startedAt || modifiedAt > completedAt + 2_000) { + continue + } + await adoptExactSkillSnapshot({...}) + inventory = await inventoryManagedSkills({...}) + } catch (error) { + console.error(`[skills] Failed to attribute Orca install for ${skillName}:`, error) + } }
🧹 Nitpick comments (1)
src/renderer/src/App.tsx (1)
62-63: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winConsider gating the new overlays behind startup readiness, matching sibling overlays.
ManagedSkillAdoptionNudge/ManagedSkillAutoUpdatemount unconditionally at App root, unlike most other overlays here (shouldMountSetupGuideTelemetryObserver,shouldMountDictationController,shouldMountUpdateCard, etc., all gated onpersistedUIReady/workspaceSessionReady). Both rely onuseManagedAgentSkills(), whose effect fires an inventory IPC call as soon as it mounts — this file's own extensive startup comments (e.g. aroundfetch-settings,ui-get,session-get) go out of their way to avoid extra IPC calls competing with the critical startup chain. Gating these two behind an existing readiness flag would keep that pattern consistent and avoid an extra unconditional IPC round-trip on every launch.Also applies to: 2832-2833
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 873afd93-9d3a-452e-b8f7-9dc59cd06bb0
📒 Files selected for processing (39)
.github/workflows/pr.yml.github/workflows/skill-cli-roundtrip.yml.github/workflows/skill-manifest-merge-gate.ymlconfig/reliability-gates.jsoncconfig/scripts/generate-skill-bundle-manifest.mjsconfig/scripts/generate-skill-bundle-manifest.test.mjsconfig/scripts/verify-skill-cli-roundtrip.mjspackage.jsonresources/skills/current-manifest.jsonsrc/main/ipc/skill-management-host-context.tssrc/main/ipc/skill-write-authorization.tssrc/main/ipc/skills.test.tssrc/main/ipc/skills.tssrc/main/persistence.test.tssrc/main/persistence.tssrc/main/skills/discovery.test.tssrc/main/skills/discovery.tssrc/main/skills/skill-auto-update.test.tssrc/main/skills/skill-auto-update.tssrc/main/skills/skill-bundle-artifacts.tssrc/main/skills/skill-discovery-sources.tssrc/main/skills/skill-orphan-transaction-sweep.tssrc/main/skills/skill-owned-temp-publication.tssrc/main/skills/skill-package-publication.test.tssrc/main/skills/skill-transaction-package-build.tssrc/main/skills/skill-transaction-recovery.test.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/App.tsxsrc/renderer/src/components/managed-skills/ManagedSkillAdoptionNudge.test.tsxsrc/renderer/src/components/managed-skills/ManagedSkillAdoptionNudge.tsxsrc/renderer/src/components/managed-skills/ManagedSkillAutoUpdate.test.tsxsrc/renderer/src/components/managed-skills/ManagedSkillAutoUpdate.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/ManagedOrcaSkillsSection.tsxsrc/renderer/src/components/settings/ManagedSkillReplacementDialog.tsxsrc/renderer/src/components/settings/managed-skill-status-copy.test.tssrc/renderer/src/components/settings/managed-skill-status-copy.tssrc/renderer/src/components/settings/use-agent-skill-management-actions.ts
🚧 Files skipped from review as they are similar to previous changes (19)
- src/main/skills/skill-discovery-sources.ts
- .github/workflows/skill-cli-roundtrip.yml
- src/main/skills/discovery.test.ts
- .github/workflows/skill-manifest-merge-gate.yml
- src/preload/api-types.ts
- resources/skills/current-manifest.json
- .github/workflows/pr.yml
- src/preload/index.ts
- src/main/skills/discovery.ts
- src/main/skills/skill-bundle-artifacts.ts
- src/renderer/src/components/managed-skills/ManagedSkillAdoptionNudge.tsx
- config/scripts/generate-skill-bundle-manifest.test.mjs
- config/scripts/generate-skill-bundle-manifest.mjs
- src/main/skills/skill-transaction-package-build.ts
- src/renderer/src/components/settings/use-agent-skill-management-actions.ts
- src/main/skills/skill-owned-temp-publication.ts
- config/scripts/verify-skill-cli-roundtrip.mjs
- package.json
- src/main/skills/skill-package-publication.test.ts
|
Closing without merge because this implementation has been superseded by the staged skill-freshness rollout: #8624 provides the version-matched guide-serving CLI, and #8637 provides read-only freshness detection plus the targeted ecosystem update rail. The ownership ledger, adoption flow, background updater, transactional writer, and automatic mutation implemented here are intentionally not part of the replacement design. |
Status
Open and intentionally unmerged pending final review. CI is green on the pushed head (1df4feb). The consolidated review, manual Electron validation, and the stabilization pass are complete and pushed (5ebd83a). Automatic background updates for managed skills shipped behind a default-on setting (6506f42). All CodeRabbit review threads have been addressed and resolved.
Summary
managedSkillAutoUpdateEnabled). The batch runs only on the local host, only for destinations the user already manages, and only when the installed content still exactly matches the recorded snapshot. Locally modified, unknown, externally managed, and unmanaged copies are never written. Failures surface as retryableupdate-failedrows and are never retried automatically, so a broken package cannot loop. One aggregated toast reports each successful batch.Adoption stays explicit: auto-update never claims a newly discovered path. WSL reconciliation remains a later phase, and SSH management remains a separate later phase.
Screenshots
Current UI on the pushed head (isolated Electron run with a staged multi-skill inventory).
Testing
settings-skill-detectionElectron E2E (3/3 locally): setup-panel labels, adoption/update/conflict/retry/nudge states, and the new background auto-update flow (batch trigger → aggregated toast → settled managed-current state). The spec now pins the management inventory so assertions no longer depend on the developer's real skill homes.AI Review Report
One consolidated correctness, safety, cross-platform, performance, and maintainability review was completed and its findings corrected in 5ebd83a. All CodeRabbit threads are replied to and resolved: durability (frozen persistence writes fail closed), recovery isolation (per-transaction orphan sweep), workflow hardening (
persist-credentials: false, env-passed base ref), Git tree-sha subtree ordering, localization/pluralization, and UI busy-state guards. The no-follow/handle-relative traversal finding is documented as deferred (see Security Audit).Security Audit
Notes