-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Detect outdated Orca agent skills and prompt per-skill updates #8747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tebayoso
wants to merge
13
commits into
stablyai:main
Choose a base branch
from
tebayoso:feat/outdated-skills-update-prompts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7c524ac
Detect outdated Orca agent skills and prompt per-skill updates
tebayoso a620dcc
Harden outdated-skill detection based on review feedback
tebayoso 16332f8
Address CodeRabbit findings for outdated skill freshness
tebayoso 0cdfc3e
Polish outdated-skill freshness for production readiness
tebayoso f62931d
Fix remaining CodeRabbit findings for skill freshness
tebayoso 933c6fe
Address Claude Fable review: multi-home freshness and update-loop fix
tebayoso e5be55f
Refine freshness after Claude iteration-1 review
tebayoso b5df8d5
Address Claude iteration-2 findings for update-attempt coverage
tebayoso 954c4b0
Clear stale skill-freshness state when discovery target changes
tebayoso bf50f42
Align badges with update-attempt suppression and harden web freshness
tebayoso 1f6b375
Stop packaging skills; scope freshness to update-wired skills only
tebayoso e95186c
Restore provider-home skill discovery coverage from #8510
tebayoso 5d16419
Polish outdated-skill UX: exit-time attempt mark, stack, hook tests
tebayoso File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| import { mkdir, mkdtemp, writeFile } from 'node:fs/promises' | ||
| import { tmpdir } from 'node:os' | ||
| import { join } from 'node:path' | ||
| import { afterEach, describe, expect, it, vi } from 'vitest' | ||
|
|
||
| const { resolveBundledSkillsRoot } = await import('./bundled-skills-root') | ||
|
|
||
| vi.mock('electron', () => ({ | ||
| app: { | ||
| isPackaged: false, | ||
| getAppPath: () => tmpdir() | ||
| } | ||
| })) | ||
|
|
||
| describe('resolveBundledSkillsRoot', () => { | ||
| const created: string[] = [] | ||
|
|
||
| afterEach(async () => { | ||
| created.length = 0 | ||
| }) | ||
|
|
||
| it('returns packaged resources/orca-skills when present', async () => { | ||
| const resourcesPath = await mkdtemp(join(tmpdir(), 'orca-resources-')) | ||
| created.push(resourcesPath) | ||
| const skillsRoot = join(resourcesPath, 'orca-skills') | ||
| await mkdir(skillsRoot, { recursive: true }) | ||
| await writeFile(join(skillsRoot, 'README'), 'x', 'utf8') | ||
|
|
||
| expect( | ||
| resolveBundledSkillsRoot({ | ||
| isPackaged: true, | ||
| resourcesPath, | ||
| appPath: tmpdir() | ||
| }) | ||
| ).toBe(skillsRoot) | ||
| }) | ||
|
|
||
| it('returns null when packaged resources are missing', () => { | ||
| expect( | ||
| resolveBundledSkillsRoot({ | ||
| isPackaged: true, | ||
| resourcesPath: join(tmpdir(), 'missing-resources-dir'), | ||
| appPath: tmpdir() | ||
| }) | ||
| ).toBeNull() | ||
| }) | ||
|
|
||
| it('falls back to a skills directory next to appPath in dev', async () => { | ||
| const appPath = await mkdtemp(join(tmpdir(), 'orca-app-')) | ||
| created.push(appPath) | ||
| const skillsRoot = join(appPath, 'skills') | ||
| await mkdir(skillsRoot, { recursive: true }) | ||
|
|
||
| expect( | ||
| resolveBundledSkillsRoot({ | ||
| isPackaged: false, | ||
| resourcesPath: join(tmpdir(), 'unused'), | ||
| appPath | ||
| }) | ||
| ).toBe(skillsRoot) | ||
| }) | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { existsSync } from 'node:fs' | ||
| import { join } from 'node:path' | ||
| import { app } from 'electron' | ||
|
|
||
| /** | ||
| * Resolve the on-disk root of Orca-shipped skill references used for | ||
| * freshness checks. Packaged apps read `process.resourcesPath/orca-skills`; | ||
| * dev/unpackaged builds fall back to the repo `skills/` directory. | ||
| */ | ||
| export function resolveBundledSkillsRoot(options?: { | ||
| isPackaged?: boolean | ||
| resourcesPath?: string | ||
| appPath?: string | ||
| }): string | null { | ||
| const isPackaged = options?.isPackaged ?? app.isPackaged | ||
| const resourcesPath = options?.resourcesPath ?? process.resourcesPath | ||
| const appPath = options?.appPath ?? app.getAppPath() | ||
|
|
||
| if (isPackaged) { | ||
| const packagedRoot = join(resourcesPath, 'orca-skills') | ||
| return existsSync(packagedRoot) ? packagedRoot : null | ||
| } | ||
|
|
||
| // electron-vite may set getAppPath() to the project root or out/. | ||
| const candidates = [ | ||
| join(appPath, 'skills'), | ||
| join(appPath, '..', 'skills'), | ||
| join(process.cwd(), 'skills') | ||
| ] | ||
| for (const candidate of candidates) { | ||
| if (existsSync(candidate)) { | ||
| return candidate | ||
| } | ||
| } | ||
| return null | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.