fix: ignore hidden agent skills during review #295
MergedUgesh-Praavin(GitHub profile, opens in a new tab)merged 9 commits into
main fromrefs/pull/295/headmerged by LadyBluenotes(GitHub profile, opens in a new tab) - @@ -3,4 +3,4 @@33 import { basename, dirname, relative } from 'node:path'44 import { resolveProjectContext } from '../core/project-context.js'55 import { resolveWorkspacePackages } from '../setup/workspace-patterns.js'6-import { parseFrontmatter } from '../shared/utils.js'6+import { parseFrontmatter, isDefaultSkillPath } from '../shared/utils.js'
LadyBluenotes(GitHub profile, opens in a new tab) requested changes
- packages/intent/tests/review.test.ts lines 201 to 202Outdated@@ -150 +182,21 @@182+ '_artifacts/skill_tree.yaml',183+ `library: { name: library }\nskills: [{path: ${skillPath}}]\n`,184+ )185+186+ git('add', '.')187+ git('commit', '-qm', 'record hidden skill')150188189+ const initial = createReview(root)190+191+ expect(initial.items.map((item) => item.id)).toContain(192+ `skill:${skillPath}`,193+ )194+195+ expect(196+ initial.items.find((item) => item.id === `skill:${skillPath}`)?.problems,197+ ).toEqual([])198+199+ accept(initial)200+201+ // Remove the explicit declaration. The skill should still be recognized202+ // because its previous review is retained in review state.@@ -150,0 +195,21 @@195+ expect(196+ initial.items.find((item) => item.id === `skill:${skillPath}`)?.problems,197+ ).toEqual([])198+199+ accept(initial)200+201+ // Remove the explicit declaration. The skill should still be recognized202+ // because its previous review is retained in review state.203+ write(204+ '_artifacts/skill_tree.yaml',205+ 'library: { name: library }\nskills: []\n',206+ )207+208+ const retained = createReview(root)209+210+ // The unchanged hidden skill is retained in review state and therefore211+ // remains eligible for review discovery. Since it has already been212+ // reviewed and has no changes, it does not need to appear as a new item.213+ expect(retained.items.map((item) => item.id)).not.toContain(214+ `source:${skillPath}`,215+ )
LadyBluenotes(GitHub profile, opens in a new tab) approved these changes
Sign in to join this conversation.
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
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_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID:
f2e97579-9817-411b-9e4b-8557b767569d📥 Commits
Reviewing files that changed from the base of the PR and between bda7aa873f2f0ca6d1152bd7e312ec31a129e101 and bd860b9e27e9f970277feb98a103036ca6101e9c.
📒 Files selected for processing (1)
packages/intent/tests/review.test.tsIncluded review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
📝 Walkthrough
Walkthrough#
Maintainer setup and default review discovery use a shared predicate to filter skill paths. Review discovery excludes hidden paths unless a custom root, declared skill, or review state provides another match. Tests cover hidden agent directories and explicitly declared skills. A Changeset declares a patch release for
@tanstack/intent.Changes#
Skill discovery
packages/intent/src/shared/utils.ts,packages/intent/src/maintainer/existing.ts,packages/intent/src/review/review.ts,packages/intent/tests/review.test.ts,.changeset/icy-loops-act.mdisDefaultSkillPathpredicate excludes paths with hidden components or anode_modulescomponent. Maintainer setup and default review discovery use the predicate. Custom-root, declared-skill, and previously recorded-skill matches remain. Tests cover hidden agent directories, explicit declaration, and review state. The Changeset declares a patch release.Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Merge Risk: ⚪ Minimal · up to
bd860Default discovery excludes hidden and dependency-directory skills while preserving explicitly declared and previously recorded review paths; no concrete merge risk remains.
Architecture Summary#
Architecture risk: 🔵 Low · up to
bd860The change affects 1 system.
Changed systems:
packages/intentArchitecture concerns No architecture-level concerns identified.
Review details
Systems and components
Before / after behavior
isDefaultSkillPathpredicate. It excludes paths containing a component that starts with.or is exactlynode_modules; all other paths pass.isDefaultSkillPathimport alongsideparseFrontmatter.SKILL.mdpaths are now selected byisDefaultSkillPath; the previous exclusion of paths containing dot-prefixed components ornode_modulesis removed.isDefaultSkillPath.🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
#294requires default review discovery to match setup. The sharedisDefaultSkillPathpredicate excludes hidden path segments andnode_modules.createReviewuses it only for default `skills…#294. The formatting changes do not add unrelated behavior. No unrelated change is demonstrat…✨ Finishing Touches
🧪 Generate unit tests (beta)
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