Repository navigation
fix(skill): resolve duplicate skill names deterministically - #15973
markjoin123 wants to merge 2 commits into
Conversation
| import { TestInstance } from "../fixture/fixture" | ||
| import { testEffect } from "../lib/effect" | ||
|
|
||
| const it = testEffect(Layer.mergeAll(AppNodeBuilder.build(Skill.node), AppNodeBuilder.build(CrossSpawnSpawner.node))) |
There was a problem hiding this comment.
[SUGGESTION]: Pin RuntimeFlags for this test
Sibling skill tests (worktree-project-skills.test.ts:19-22, non-git-global-skills.test.ts:18-22) explicitly override RuntimeFlags with disableExternalSkills: false, disableClaudeCodeSkills: false. This test relies on the env-based defaults, so a machine/CI that sets KILO_DISABLE_CLAUDE_CODE, KILO_DISABLE_CLAUDE_CODE_SKILLS, or KILO_DISABLE_EXTERNAL_SKILLS would stop .claude/.agents skills from being scanned and fail the test. Consider building Skill.node with those overrides for parity.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The incremental change pins Files Reviewed (3 files)
Previous Review Summary (commit eea779d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit eea779d)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Reviewed by deepseek-flash-latest · Input: 29.7K · Output: 2.1K · Cached: 228.6K Review guidance: REVIEW.md from base branch |
Issue
Fixes #15952
Context
Duplicate skill names inside one scan root followed glob order, so the absolute path written into the system prompt could change between runs. Sorting paths within each root makes that winner stable. Later roots are still applied afterward, so root precedence stays the same. A claim comment is already on the issue.
Implementation
Each skill scan sorts that root's paths before recording them. The last path in that sorted order wins for a duplicate name in the same root. A later root still overrides an earlier one because scans run in the existing root order.
Screenshots / Video
N/A. No visual change.
How to Test
Manual/local verification
Agent-executed on
eea779dcc6e914e8bfeacd7c8de388310c6bc770from an isolated checkout of the publichttps://github.com/Kilo-Org/kilocode.gitremote, with git config that does not rewrite GitHub URLs:bun run testinpackages/opencode: 318 files passed, 0 failed, 0 flaky (814.4s). This includesfast-tier-kilocode-tools,test/kilocode/sandbox/shell-network.test.ts, andtest/kilocode/sandbox/config-network.test.ts.test/kilocode/skill-duplicate-order.test.ts.main(b6a49d01c1).Previous run: package and repository typechecks passed, and lint reported 0 errors. Changeset:
.changeset/skill-duplicate-order.md(@kilocode/clipatch).Reviewer test steps
<available_skills>..agents/skillsafter.claude/skills, and confirm the later root still wins.Blocked checks and substitute verification
None. The earlier sandbox and cloud-remote failures were environment limits. Bubblewrap is installed, and cloud remote parsing was run from a public checkout without URL rewriting. Sandbox checks were not weakened.
Checklist
This pull request was prepared with AI assistance. The personal-review item is unchecked because a person did not review the diff.
Get in Touch