Skip to content

Add safe skill freshness detection and update rail - #8637

Merged
brennanb2025 merged 28 commits into
mainfrom
brennanb2025/skill-freshness-detection
Jul 16, 2026
Merged

brennanb2025 merged 28 commits into
mainfrom
brennanb2025/skill-freshness-detection

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is PR 2 of the staged skill-freshness rollout. It is intentionally stacked on #8624 and does not change any distributed skill package.

It adds a read-only inventory that compares installed Orca skill packages with generated identities for current and historically released official snapshots. The Skills page reports each observed placement as current, outdated, newer-known, unrecognized, or inaccessible, while keeping unsupported placements visible and non-actionable.

When a skill name is provably safe across every observed placement, Orca can open an editable terminal draft containing only:

npx skills update <eligible-names...> --global

Orca never submits that command, never writes to skill directories, and re-checks observed bytes after the terminal exits or the app regains focus.

Safety model

Eligibility is name-scoped, not row-scoped:

  • at least one placement of the name must be an exact older official snapshot;
  • every placement must be an exact current or older official snapshot;
  • every placement must use a topology the validated update rail actually converges;
  • a newer-known, unrecognized, inaccessible, read-only, external-link, repository, plugin-cache, or remote-host placement poisons the offer for that entire name;
  • a standalone independent copy no longer poisons the name — the canonical copy still updates and the duplicate placement is flagged as one the command may not reach (remove it, or update it separately).

The detector uses LF-normalized identity for non-executable UTF-8 text and exact bytes for binary or executable files. Package observation, plugin-cache traversal, candidate count, file count, depth, per-file bytes, and total retained bytes are bounded. Runtime/SSH repos are excluded from the local-host inventory.

The update command is explicit, sorted, name-scoped, global-only, shell-name constrained, pre-filled visibly, and never auto-run. Dismissed toast tuples are only (physical identity, skill name, bundled revision) presentation state; they grant no ownership or write authority.

There is no ownership ledger, adoption flow, background updater, transactional writer, rollback engine, or automatic mutation. #8496 remains an archive/reference for that retired design and is not part of this implementation.

Generated identity artifacts and packaging

resources/skills/ contains generated build-matched metadata:

  • current manifest;
  • immutable released-snapshot registry;
  • release-to-revision mapping.

The generator derives history from release tags plus current skills/ bytes. PR CI fetches full tag history and rejects stale generated output. Packaged apps ship only these identity artifacts as resources; the fat skill packages remain repository content and are not duplicated into the app for freshness detection.

Real update-rail contract

A separate required workflow exercises historical fat installs through the real ecosystem update command on macOS, Linux, and Windows with LF/CRLF and provider symlink/copy shapes.

Empirical results define the eligibility boundary:

  • [email protected] failed provider-alias convergence;
  • [email protected] reliably updates the canonical global copy and provider aliases;
  • [email protected] independent-copy behavior is environment-dependent: equivalent local runs left the provider copy historical while hosted macOS/Linux runs converged it.

Accordingly, 1.5.17 is the pinned minimum validated version. Because an independent copy's convergence is not deterministic it no longer blocks the whole name — the canonical copy still updates and the duplicate row is flagged as one the command may not reach, so the user can remove or update it separately. Provider aliases are a required positive assertion. Copy jobs accept only two honest byte outcomes—unchanged historical or exact current—and fail on any partial/unrecognized mutation. The workflow also verifies that a non-targeted Orca skill remains untouched. A latest-version probe is informational so upstream drift is visible without silently broadening the safe topology.

Full rollout plan

This is five implementation stages, not seven simultaneous PRs:

  1. PR 1 — guide-serving CLI: Add version-matched skill guides to the CLI #8624 adds authoritative guide sources and version-matched orca skills list/get serving while distributed skills remain fat. It must merge and release first.
  2. PR 2 — this PR: land read-only detection, name-scoped eligibility, the visible targeted update draft, Skills-page status UI/nudge, generated identities, and migration-rail CI. Skills still remain fat.
  3. Validation gate — no PR: after PR 1's binary is publicly released, run Claude Code and Codex pointer-compliance tests across packaged orca, Linux/WSL orca-ide, managed-terminal/SSH orca, and orca-dev, including old-binary fallback, task success, and token cost.
  4. PR 3 — one orca-cli migration PR: convert only orca-cli to a hybrid bootstrap-plus-pointer stub. Cut an RC and perform the final thinning in this same PR before stable only if the measured gates pass; otherwise keep the hybrid form.
  5. Later PRs: migrate the remaining skills gradually only after the first stub has survived a release cycle. Users who ignore the freshness nudge keep their existing full skills.

No stub PR should merge before a public guide-serving binary exists because the ecosystem installer reads repository content independently of the desktop release train.

Verification

  • pnpm lint
  • pnpm run typecheck
  • 74 focused tests passed, with one platform-specific skip
  • pnpm run verify:skill-bundle-manifest
  • pnpm run verify:bundled-skill-guides
  • localization catalog and coverage verification
  • pinned [email protected] symlink convergence probe
  • pinned [email protected] CRLF independent-copy behavior probe
  • git diff --check

Post-rebase review and hardening (2026-07-14)

After #8624 merged, this branch was rebased onto main (dropping the three superseded stacked guide commits), the snapshot artifacts were regenerated against the merged guide bytes (additive-only registry delta, preserving all released snapshots), and a three-lane AI review (design-semantics, perf/regression, mechanical) plus live Electron QA ran against the result. Fixes landed from that review:

  • Canonical snapshot file order (008a20d0d): historical snapshots kept git ls-tree byte-order while the working-tree walk and runtime observation use the sorted depth-first order. Index-based snapshot matching would have misclassified every older install of a future multi-file skill as unrecognized and churned spurious registry revisions. All producers now share one canonical order (zero digest changes for today's single-file packages), with an ordering-parity regression test.
  • Executable-file guard (008a20d0d): Windows observation cannot see execute bits, so the first executable file shipped in a skill would have silently misclassified every pristine Windows install. The generator now rejects executable files in shipped packages.
  • Released-history invariant (008a20d0d): the design's append-only registry contract is now an explicit check — regeneration fails loudly if a generation-logic change would rewrite any released snapshot, while the one unreleased working-tree append per skill stays legitimately mutable.
  • Focus-rescan throttling (29fd88ad1): every window focus re-read and re-hashed all installed packages, and the nudge and panel each forced their own trailing rescan per event. A 15s cooldown plus a shared invalidation latch keep it to one bounded scan per event; install-change events remain immediate. Bundle artifacts (~68KB JSON) now load once per run.
  • Self-blocked placement copy (29fd88ad1): a read-only (or otherwise unsupported) outdated placement reused the "another placement of this name prevents a safe global update" string, blaming a phantom sibling. It now explains that this placement itself cannot be updated safely in place, in all five locales, and the supported-topology set moved to shared/ so eligibility and copy cannot drift.

Known accepted limitations (flagged, intentionally not changed): newer-known is structurally unreachable with shipped artifacts (current is always the registry tail, so genuinely newer copies classify unrecognized — still safely poisoned and informational); Windows NTFS-ACL write-denial is not detected as read-only (access(W_OK) only sees the read-only file attribute — a blocked update re-surfaces outdated honestly via the byte re-check); the roundtrip workflow's pinned jobs depend on npm/GitHub availability (it is not a required check today; keep that in mind before requiring it).

Live Electron QA — skill install topology matrix

An automated QA agent drove the real dev app (CDP attach) under scratch HOMEs containing fixture installs built from genuine registry byte generations, and verified every row in the rendered Skills page UI. All scenarios passed; no crashes, no freshness console errors, focus rescans visually instantaneous.

# Setup Expected Observed (UI-verified)
A1 canonical copy, older released bytes (rev 31) outdated, eligible ✅ "Update available", eligible
A2 canonical copy, current bytes + extra line unrecognized, poisons ✅ "May be edited or from another source"
A3 canonical copy, current bytes exact current, not offered ✅ "Current"
A4 canonical copy, older released bytes converted LF→CRLF outdated via normalized identity ✅ classified against the exact older snapshot digest
A5 canonical outdated + provider-alias symlink (~/.grok/skills) dedup to one canonical row, eligible ✅ single row, eligible
A6 canonical outdated + independent provider copy (~/.gemini/skills) canonical eligible; duplicate row flagged, not blocking ✅ "Update available", .gemini row flagged Duplicate
A7 symlink to external directory (official bytes) external-link, informational ✅ "Current" + "External link", not eligible
A8 dangling symlink inaccessible/broken link ✅ "Inaccessible" + "Broken link"
A9 eligible set + update rail exactly npx skills update orca-cli orca-emulator orca-linear --global, pre-filled, never auto-run ✅ verbatim command shown un-executed
A10 chmod 555 on an eligible canonical dir, refocus becomes read-only, drops from eligible set ✅ "Read only", eligible count 3→2; recovers on chmod 755
B1-B2 single outdated skill, fresh state one-time nudge + pre-filled single-name command ✅ toast + npx skills update orca-cli --global un-executed
B3 dismiss, blur/refocus nudge must not reappear ✅ suppressed
B4 overwrite install with current bytes on disk, refocus row flips to current, eligible empties (bytes decide) ✅ flips with no update run
B5 reset to outdated bytes, quit + relaunch same (identity, skill, revision) stays dismissed; panel still offers ✅ dismissal persisted, nudge silent, panel affordance intact

Venue update (2026-07-14): lingering toast, update modal, freshness-aware setup rails

The freshness UI originally mounted on the Skills page — which turned out to be orphaned UI: its only entry point (the sidebar toolbox menu) was removed by #4535 on 2026-06-02, leaving the page unreachable. Product decision: surface freshness where users actually are. Landed in dc91b70ef + f098a496d:

  • Lingering toast — no auto-close; persists until acted on. Only the explicit X records dismissal keys (verified against sonner source: the action click does not), so engaging with the review dialog never silently suppresses future prompts. Ignoring it means it may prompt again next launch.
  • Update modal (toast action) — the pre-filled editable npx skills update … --global terminal (never auto-run), an honest summary (updatable / all-current / blocked), and the per-placement diagnostic rows in a collapsed Details section that auto-expands when something is blocked. Closing it or the terminal exiting re-inventories; bytes decide.
  • Freshness-aware setup rails — the existing Settings rails (CLI, Orchestration, Computer Use, Per-Workspace Environments) now carry the signal instead of a separate button: the Installed pill reads Update available (amber) when that skill has a safe update and Up to date (green) when every copy is current — falling back to plain Installed for blocked/unrecognized copies and for WSL runtimes the local-only scan cannot vouch for. Re-check refreshes installation detection and freshness; the existing Update button (already runtime-aware) is the per-skill update path.
  • The design doc §D records the venue decision.

Live Electron QA round 2 caught one P1 before it shipped — the modal initially mounted outside LinkRoutingPreferenceDialogProvider, crashing the renderer exactly when an update existed (its terminal pane needs that context; unit tests mock the terminal). Fixed and re-verified: all scenarios pass, zero crash reports, zero console errors.

Update (2026-07-16): a duplicate no longer blocks the whole skill

Refinement to the eligibility model: a clean standalone independent copy of a skill no longer poisons the whole name. The canonical copy still updates via the pre-filled command, and the duplicate placement is flagged ("Duplicate") with a tooltip noting the command may not reach it — remove it, or update it separately. A skill that exists only as a standalone copy stays unoffered (no reliably-convergent target for the global command). Data-loss topologies (unrecognized, read-only, etc.) still poison as before. Copy also updated: the modal footer reads Re-check (was "Check now"), a blocked group reads "…so it was omitted from the update command," and the Settings sidebar-nav pills now go amber Update available when a skill is updatable (matching the existing setup-card pills). Screenshots below reflect this behavior.

Screenshots (current UI, at 190a6745d)

1. The lingering toast — names the out-of-date skill(s) and offers "Update skill"; persists with no auto-close until dismissed or the modal is opened

Lingering toast naming the out-of-date skill with an Update skill action

2. The Update skills modal — grouped by skill. orca-cli is "Update available": its main copy updates and the standalone .gemini duplicate is flagged (a duplicate no longer blocks the whole skill). orchestration is "Can't update" because a locally-modified copy is unrecognized. Only eligible names go in the pre-filled npx skills update orca-cli --global; each location's chip has a plain-language tooltip.

Update skills modal grouped by skill, showing an updatable skill and a blocked skill with nested locations

3. Settings → Orca CLI rail — the pill reads "Update available" (amber) (setup-rail pills unchanged in this pass)

Settings Orca CLI rail with an Update available pill

4. After overwriting the install with current bytes and clicking Re-check — the pill flips to "Up to date"

Settings rail pill flipped to Up to date after re-check

5. The rail's own Update button — opens its inline terminal with the runtime-aware per-skill command, not executed

Rail Update button opening an inline terminal with the per-skill command

6. Up-to-date state — once every installed skill matches the current version, the modal shows "All installed Orca skills are up to date" with no terminal

Update skills modal showing all installed Orca skills are up to date

Copy refined since these screenshots (behavior unchanged)

The wording for a skipped skill was tightened after the shots above, so screenshot #2 shows the older text. What changed:

  • Badge: "Can't update" → "Skipped" — reads as a deliberate choice, not a failure.
  • Explanation sentence is now reason-specific instead of one generic line, and it explains that Orca left the skill out of the update (rather than implying it can't). For the edited/unrecognized case in Fix Ctrl+Backspace not deleting word in terminal #2 (orchestration): "The copy here doesn't match the official version — it may be modified, or a different skill with the same name. Orca left it out of the update so it won't overwrite it. Remove it if you want Orca to update this skill." Read-only, in-a-repo, plugin, and link cases each get their own accurate line.
  • Chips now describe only the location's state (e.g. "Unrecognized" → "This copy doesn't match any official version — it may be modified, or a different skill with the same name"); the effect on the update command lives only in the sentence, so it's not said twice.
  • Blocked-only summary line: "Some installed Orca skills cannot be updated automatically." → "Some installed Orca skills were left out of the update."

…tent

The rebase onto main picked up the reviewed guide fixes (#8624), so the
current manifest hashes and a new appended snapshot generation must
match those bytes; the registry keeps all prior snapshots so existing
installs classify as outdated rather than unrecognized.
@brennanb2025
brennanb2025 force-pushed the brennanb2025/skill-freshness-detection branch from dfa77d3 to 6c8726a Compare July 14, 2026 09:26
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/skill-freshness-guides to main July 14, 2026 09:26
@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds deterministic skill bundle manifests and release mappings, packages them as runtime resources, and validates skill updates through CI round-trip checks. Introduces local freshness inventory scanning, package identity and topology classification, IPC/preload access, cached renderer state, update status pills, nudges, dialogs, localization, and related tests.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.42% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly summarizes the main change: safe skill freshness detection and the update rail.
Description check ✅ Passed The description covers summary, screenshots, testing, review notes, and platform checks, matching the template’s core content.

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.

@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: 7

🧹 Nitpick comments (2)
src/renderer/src/hooks/useSkillFreshness.test.tsx (1)

37-74: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding coverage for the error and custom-event paths.

This file covers the invalidation race well, but the hook also has an error path (freshnessInventory() rejecting), the INSTALLED_SKILLS_CHANGED_EVENT listener, and unmount-during-fetch safety (mountedRef guard) — none of which are exercised here. The existing deferred()/Probe scaffolding makes these cheap to add.

src/renderer/src/hooks/useSkillFreshness.ts (1)

20-36: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Wrap freshnessInventory() with a timeout. A stalled main-process scan leaves every consumer of the shared request stuck in loading; reuse the existing withTimeout helper already used in src/renderer/src/components/sidebar/useCreateProjectDefaults.ts.

Source: Learnings


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bfda838e-5c83-42b5-89fc-485c8dc84d22

📥 Commits

Reviewing files that changed from the base of the PR and between 31f643c and 6c8726a.

📒 Files selected for processing (47)
  • .github/workflows/pr.yml
  • .github/workflows/skill-update-roundtrip.yml
  • config/electron-builder.config.cjs
  • config/scripts/electron-builder-config.test.mjs
  • config/scripts/generate-skill-bundle-manifest.mjs
  • config/scripts/generate-skill-bundle-manifest.test.mjs
  • config/scripts/verify-skill-update-roundtrip.mjs
  • notes/skill-freshness-design.md
  • package.json
  • resources/skills/current-manifest.json
  • resources/skills/release-mapping.json
  • resources/skills/snapshot-registry.json
  • src/main/ipc/skills.test.ts
  • src/main/ipc/skills.ts
  • src/main/skills/discovery.test.ts
  • src/main/skills/discovery.ts
  • src/main/skills/skill-bundle-artifacts.ts
  • src/main/skills/skill-candidate-concurrency.ts
  • src/main/skills/skill-discovery-sources.ts
  • src/main/skills/skill-freshness-eligibility.test.ts
  • src/main/skills/skill-freshness-eligibility.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.test.ts
  • src/main/skills/skill-package-identity.ts
  • src/main/skills/skill-plugin-cache-scan.ts
  • src/preload/api-types.ts
  • src/preload/index.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/components/skills/SkillFreshnessNudge.test.tsx
  • src/renderer/src/components/skills/SkillFreshnessNudge.tsx
  • src/renderer/src/components/skills/SkillFreshnessPanel.test.tsx
  • src/renderer/src/components/skills/SkillFreshnessPanel.tsx
  • src/renderer/src/components/skills/SkillsPage.tsx
  • src/renderer/src/components/skills/skill-freshness-update-terminal.ts
  • src/renderer/src/hooks/useSkillFreshness.test.tsx
  • src/renderer/src/hooks/useSkillFreshness.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/skill-freshness.ts
  • src/shared/types.ts
👮 Files not reviewed due to content moderation or server errors (7)
  • src/renderer/src/components/skills/SkillFreshnessNudge.tsx
  • src/renderer/src/components/skills/SkillFreshnessNudge.test.tsx
  • src/renderer/src/components/skills/skill-freshness-update-terminal.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json

Historical snapshots kept git ls-tree byte-order while the working-tree
walk and runtime observation use the sorted depth-first order, so any
future multi-file skill would misclassify older installs as unrecognized
and churn spurious registry revisions; all producers now share one
canonical order (no digest changes for today's single-file packages).
Also rejects executable files from shipped skills (Windows observation
cannot see execute bits, which would misclassify pristine Windows
installs) and adds an explicit append-only invariant for released
snapshots so a generation-logic change cannot rewrite them silently.
…t copy

Every window focus re-read and re-hashed all installed packages, and the
nudge and panel each forced their own trailing rescan for one event; a
15s cooldown plus a shared invalidation latch keep one bounded scan per
event while install-change events stay immediate. Bundle artifacts are
now loaded once per run instead of re-parsed on every scan. A read-only
or otherwise unsupported outdated placement now explains that it blocks
itself instead of blaming a phantom sibling placement; the supported
topology set moved to shared so eligibility and copy cannot drift.

@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

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: de3831c6-f358-4423-873f-285098e2e699

📥 Commits

Reviewing files that changed from the base of the PR and between 6c8726a and 29fd88a.

📒 Files selected for processing (14)
  • config/scripts/generate-skill-bundle-manifest.mjs
  • config/scripts/generate-skill-bundle-manifest.test.mjs
  • src/main/skills/skill-bundle-artifacts.ts
  • src/main/skills/skill-freshness-eligibility.ts
  • src/renderer/src/components/skills/SkillFreshnessPanel.test.tsx
  • src/renderer/src/components/skills/SkillFreshnessPanel.tsx
  • src/renderer/src/hooks/useSkillFreshness.test.tsx
  • src/renderer/src/hooks/useSkillFreshness.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/skill-freshness.ts
🚧 Files skipped from review as they are similar to previous changes (11)
  • src/main/skills/skill-freshness-eligibility.ts
  • src/shared/skill-freshness.ts
  • src/renderer/src/components/skills/SkillFreshnessPanel.test.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/main/skills/skill-bundle-artifacts.ts
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/hooks/useSkillFreshness.ts
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/components/skills/SkillFreshnessPanel.tsx

…e modal

The Skills page has been unreachable since its toolbox menu entry was
removed (#4535), so surfacing freshness there buried the feature behind
its own nudge. The nudge now lingers until acted on (ignoring it records
nothing; only the explicit close persists dismissal keys) and opens an
update modal hosting the pre-filled editable terminal, an honest
current/blocked summary, and the per-placement rows in a collapsed
Details section. A compact 'Check for skill updates' row in CLI settings
is the manual re-entry point. Skills page restored to main; design-doc
surfacing section records the venue decision.
… fold freshness into the setup rails

The dialog hosts a live terminal pane that requires the link-routing
preference context; mounted outside the provider it crashed the renderer
the moment an eligible update existed (caught by live QA — unit tests
mock the terminal). It now mounts inside the provider behind its own
recoverable boundary.

The separate 'Check for skill updates' settings button is gone: the
setup rails' own pill now carries freshness (Update available / Up to
date, falling back to Installed for blocked or unrecognized copies and
for non-local runtimes the local-only scan cannot vouch for), and
Re-check refreshes both installation detection and the freshness
inventory. Wired for the CLI, Orchestration, Computer Use, and
Per-Workspace Environments rails.

@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: 1

🧹 Nitpick comments (2)
src/renderer/src/components/skills/SkillFreshnessNudge.tsx (1)

61-108: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Lingering toast never retracts after the flagged skill(s) are resolved.

toast.info here uses duration: Number.POSITIVE_INFINITY and nothing calls toast.dismiss() when a later inventory refresh shows the same candidates are no longer outdated (e.g., after the user updates via the dialog's terminal draft, notifyInstalledAgentSkillsChanged() fires and unseen becomes empty on the next effect run — but the earlier toast, if already shown, stays on screen indefinitely).

Consider capturing the returned toast id from toast.info(...) in a ref and dismissing it if a later effect run finds the previously-shown candidate set fully resolved.

src/renderer/src/components/skills/SkillFreshnessStatusPill.tsx (1)

11-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use hash-based locale keys.

Based on learnings for localizing user-facing strings inside components, consider using a 10-char hash for the locale keys (e.g., auto.components.skills.SkillFreshnessStatusPill.<hash>) instead of descriptive suffixes like updateAvailable. This ensures maximum consistency with the pre-generated keys in the en.json locale catalog.

Source: Learnings


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fc2c5f10-9c75-4dec-ac7d-064885b744e5

📥 Commits

Reviewing files that changed from the base of the PR and between 29fd88a and f098a49.

📒 Files selected for processing (20)
  • notes/skill-freshness-design.md
  • src/renderer/src/App.tsx
  • src/renderer/src/components/settings/AgentSkillSetupPanel.tsx
  • src/renderer/src/components/settings/CliSection.tsx
  • src/renderer/src/components/settings/ComputerUseSkillSetupPanel.tsx
  • src/renderer/src/components/settings/EphemeralVmsPane.tsx
  • src/renderer/src/components/settings/OrchestrationSetupCard.tsx
  • 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/skill-freshness-row.tsx
  • src/renderer/src/components/skills/skill-freshness-update-dialog.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/en.json
  • notes/skill-freshness-design.md
👮 Files not reviewed due to content moderation or server errors (2)
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json

The Update skills modal now lists only skills that will update or that can't
(with why), grouped by skill with their install locations nested underneath —
no more one row per placement.

- Statuses collapse to "Update available" / "Can't update" at the skill level.
- A location's problem is a chip (Duplicate, Unrecognized, Inaccessible, Read
  only, In a repo, External/Broken link, Plugin cache) with a hover tooltip
  that explains what it means for the user and what to do.
- Up-to-date, unrecognized-only, and unreadable-only skills are hidden; a
  current/unrecognized/etc. location only appears when it explains a shown skill.
- Copy is de-jargoned (drops "copy"/"placement"/"snapshot"/"official copy") and
  names the mechanism as the npx skills update command, not "Orca's update".
- Rename the section to "Update details"; drop the unreachable newer-known state.

Renderer-only: derivation is a pure module (groupSkillFreshness) with unit tests;
no IPC or main-process change. Locales updated for all five languages.
… copy

- Eligibility: a clean standalone duplicate no longer poisons the whole
  name — the canonical copy still updates and the duplicate is flagged;
  a duplicate-only skill stays unoffered.
- Update modal: "Can't update" -> "Skipped" with a reason-specific
  sentence (edited/read-only/in-a-repo/plugin/link); chips describe only
  the location state; footer "Check now" -> "Re-check".
- Settings sidebar nav pills go amber "Update available" when a skill is
  updatable, matching the setup cards.
- Localized new strings across en/es/ja/ko/zh.
@brennanb2025
brennanb2025 merged commit 68fca0b into main Jul 16, 2026
22 checks passed
brennanb2025 added a commit that referenced this pull request Jul 24, 2026
* fix(skills): source released history from the committed ledger, not a tag walk

verify:skill-bundle-manifest rebuilt the entire released-skill history by
walking every local refs/tags/v* on each run and demanded byte-equality with
the committed artifacts. Output was therefore a function of (skill bytes x
local tag set x release timing), so any clone holding stray, deleted, or fork
tags the committed artifacts predate rebuilt a divergent registry and failed
lint. This was the 4th instance of one failure class (#8637 -> #9119 version
bumps -> #9778 new tags -> local tag drift), each patched with a new tolerance
rather than removing the tag coupling.

Fix: the committed snapshot-registry + release-mapping ARE the released history;
trust them instead of re-deriving from tags.

- releasedHistoryFromCommitted() seeds generation from the committed ledger,
  dropping the floating unreleased tail (entries beyond what the mapping names).
  verify and --write are now pure functions of working-tree bytes with zero tag
  access. The tag walk survives only behind --rebuild-from-tags (disaster
  recovery), off the everyday path.
- --release <version> + appendReleaseRow() perform the O(1) append of one
  mapping row at release cut (dedupes vs the last row, strips the v-prefix) --
  the single authoritative point where working-tree bytes become an immutable
  released revision.
- release-cut.yml runs generate --release "$VERSION" before the release commit
  (Node built-ins only, no install needed); pr.yml drops fetch-depth: 0 from the
  lint job since verify no longer needs tag history.

Recognition is unaffected: the runtime uses knownSnapshots = registry.skills
(all entries, incl. the tail committed at PR-merge time), so a missing mapping
row only loses a version label, never recognition or the update nudge.

Trade-off: lint no longer cross-checks committed historical snapshots against
tags. A hand-edit to an old released entry is still caught by the runtime
manifest<->registry consistency check when the current manifest points at it,
and can be audited anytime with --rebuild-from-tags.

Verified: verify passes committed-sourced; --write is zero-diff (byte parity);
a planted stray v-tag no longer changes output; edit-stub -> --write -> --release
appends the correct single row; double --release is idempotent;
--rebuild-from-tags reproduces the committed artifacts. Generator tests 14 pass/
1 skip; runtime skill-bundle-artifacts + freshness-inventory 14 pass; bundled
skill guides verify passes.

* fix(skills): keep one release-mapping row per version on a re-cut

A cut that pushed the version bump to main but died before pushing the
tag is re-cut at the same version. If skills changed in between, the
second --release appended a duplicate row, and the stale one named
revisions that tag never ships — which verify-skill-update-roundtrip
then pairs with the tag's real bytes.

Overwrite the trailing row instead (the tag is absent, so that version
was never published). Refuse only when an earlier row claims the
version, which the cut workflow already rejects upstream, so this
cannot wedge a recovering cut.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Add safe skill freshness detection

* Accept observed copy-mode rail outcomes

* chore(skills): regenerate snapshot artifacts for the merged guide content

The rebase onto main picked up the reviewed guide fixes (stablyai#8624), so the
current manifest hashes and a new appended snapshot generation must
match those bytes; the registry keeps all prior snapshots so existing
installs classify as outdated rather than unrecognized.

* fix(skills): canonicalize snapshot file order and guard released history

Historical snapshots kept git ls-tree byte-order while the working-tree
walk and runtime observation use the sorted depth-first order, so any
future multi-file skill would misclassify older installs as unrecognized
and churn spurious registry revisions; all producers now share one
canonical order (no digest changes for today's single-file packages).
Also rejects executable files from shipped skills (Windows observation
cannot see execute bits, which would misclassify pristine Windows
installs) and adds an explicit append-only invariant for released
snapshots so a generation-logic change cannot rewrite them silently.

* fix(skills): throttle focus rescans and correct self-blocked placement copy

Every window focus re-read and re-hashed all installed packages, and the
nudge and panel each forced their own trailing rescan for one event; a
15s cooldown plus a shared invalidation latch keep one bounded scan per
event while install-change events stay immediate. Bundle artifacts are
now loaded once per run instead of re-parsed on every scan. A read-only
or otherwise unsupported outdated placement now explains that it blocks
itself instead of blaming a phantom sibling placement; the supported
topology set moved to shared so eligibility and copy cannot drift.

* feat(skills): move freshness surfacing to a lingering toast and update modal

The Skills page has been unreachable since its toolbox menu entry was
removed (stablyai#4535), so surfacing freshness there buried the feature behind
its own nudge. The nudge now lingers until acted on (ignoring it records
nothing; only the explicit close persists dismissal keys) and opens an
update modal hosting the pre-filled editable terminal, an honest
current/blocked summary, and the per-placement rows in a collapsed
Details section. A compact 'Check for skill updates' row in CLI settings
is the manual re-entry point. Skills page restored to main; design-doc
surfacing section records the venue decision.

* fix(skills): mount update dialog inside the link-routing provider and fold freshness into the setup rails

The dialog hosts a live terminal pane that requires the link-routing
preference context; mounted outside the provider it crashed the renderer
the moment an eligible update existed (caught by live QA — unit tests
mock the terminal). It now mounts inside the provider behind its own
recoverable boundary.

The separate 'Check for skill updates' settings button is gone: the
setup rails' own pill now carries freshness (Update available / Up to
date, falling back to Installed for blocked or unrecognized copies and
for non-local runtimes the local-only scan cannot vouch for), and
Re-check refreshes both installation detection and the freshness
inventory. Wired for the CLI, Orchestration, Computer Use, and
Per-Workspace Environments rails.

* fix(skills): use the sleek scrollbar style in the update dialog

* chore(skills): regenerate manifest for merged main (v1.4.142-rc.1)

Main advanced to 1.4.142-rc.1 with a v1.4.141 release, so the embedded
appVersion and release mapping were stale on the PR's merged tree. Only
appVersion and the new release entry change; no snapshot digests move
(released history preserved).

* fix(skills): bound and batch freshness work

* fix(skills): harden freshness integrity checks

* fix(skills): accept observed copy topology outcomes

* chore(skills): regenerate manifest for current main

* fix(skills): preserve update terminal lifecycle

* chore(skills): regenerate manifest for current main

* fix(skills): fail closed on stale freshness scans

* chore(skills): regenerate manifest for current main

* fix(skills): preserve freshness safety under focus churn

* feat(skills): group the update modal by skill with plain-language status

The Update skills modal now lists only skills that will update or that can't
(with why), grouped by skill with their install locations nested underneath —
no more one row per placement.

- Statuses collapse to "Update available" / "Can't update" at the skill level.
- A location's problem is a chip (Duplicate, Unrecognized, Inaccessible, Read
  only, In a repo, External/Broken link, Plugin cache) with a hover tooltip
  that explains what it means for the user and what to do.
- Up-to-date, unrecognized-only, and unreadable-only skills are hidden; a
  current/unrecognized/etc. location only appears when it explains a shown skill.
- Copy is de-jargoned (drops "copy"/"placement"/"snapshot"/"official copy") and
  names the mechanism as the npx skills update command, not "Orca's update".
- Rename the section to "Update details"; drop the unreachable newer-known state.

Renderer-only: derivation is a pure module (groupSkillFreshness) with unit tests;
no IPC or main-process change. Locales updated for all five languages.

* chore(skills): regenerate manifest for current main (v1.4.143-rc.0)

* feat(skills): don't let a duplicate block the update; clearer skipped copy

- Eligibility: a clean standalone duplicate no longer poisons the whole
  name — the canonical copy still updates and the duplicate is flagged;
  a duplicate-only skill stays unoffered.
- Update modal: "Can't update" -> "Skipped" with a reason-specific
  sentence (edited/read-only/in-a-repo/plugin/link); chips describe only
  the location state; footer "Check now" -> "Re-check".
- Settings sidebar nav pills go amber "Update available" when a skill is
  updatable, matching the setup cards.
- Localized new strings across en/es/ja/ko/zh.

* chore(skills): regenerate manifest for merged main (v1.4.144-rc.1)
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…lyai#10340)

* fix(skills): source released history from the committed ledger, not a tag walk

verify:skill-bundle-manifest rebuilt the entire released-skill history by
walking every local refs/tags/v* on each run and demanded byte-equality with
the committed artifacts. Output was therefore a function of (skill bytes x
local tag set x release timing), so any clone holding stray, deleted, or fork
tags the committed artifacts predate rebuilt a divergent registry and failed
lint. This was the 4th instance of one failure class (stablyai#8637 -> stablyai#9119 version
bumps -> stablyai#9778 new tags -> local tag drift), each patched with a new tolerance
rather than removing the tag coupling.

Fix: the committed snapshot-registry + release-mapping ARE the released history;
trust them instead of re-deriving from tags.

- releasedHistoryFromCommitted() seeds generation from the committed ledger,
  dropping the floating unreleased tail (entries beyond what the mapping names).
  verify and --write are now pure functions of working-tree bytes with zero tag
  access. The tag walk survives only behind --rebuild-from-tags (disaster
  recovery), off the everyday path.
- --release <version> + appendReleaseRow() perform the O(1) append of one
  mapping row at release cut (dedupes vs the last row, strips the v-prefix) --
  the single authoritative point where working-tree bytes become an immutable
  released revision.
- release-cut.yml runs generate --release "$VERSION" before the release commit
  (Node built-ins only, no install needed); pr.yml drops fetch-depth: 0 from the
  lint job since verify no longer needs tag history.

Recognition is unaffected: the runtime uses knownSnapshots = registry.skills
(all entries, incl. the tail committed at PR-merge time), so a missing mapping
row only loses a version label, never recognition or the update nudge.

Trade-off: lint no longer cross-checks committed historical snapshots against
tags. A hand-edit to an old released entry is still caught by the runtime
manifest<->registry consistency check when the current manifest points at it,
and can be audited anytime with --rebuild-from-tags.

Verified: verify passes committed-sourced; --write is zero-diff (byte parity);
a planted stray v-tag no longer changes output; edit-stub -> --write -> --release
appends the correct single row; double --release is idempotent;
--rebuild-from-tags reproduces the committed artifacts. Generator tests 14 pass/
1 skip; runtime skill-bundle-artifacts + freshness-inventory 14 pass; bundled
skill guides verify passes.

* fix(skills): keep one release-mapping row per version on a re-cut

A cut that pushed the version bump to main but died before pushing the
tag is re-cut at the same version. If skills changed in between, the
second --release appended a duplicate row, and the stale one named
revisions that tag never ships — which verify-skill-update-roundtrip
then pairs with the tag's real bytes.

Overwrite the trailing row instead (the tag is absent, so that version
was never published). Refuse only when an earlier row claims the
version, which the cut workflow already rejects upstream, so this
cannot wedge a recovering cut.
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