Repository navigation
refactor(shared): extract skills from each config's own ref - #1580
Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Conversation
extractSkillsToWorkspace() took a refs array alongside skillConfigs and paired them by index. SkillConfig already carries its ref, so the parallel array was redundant and a mismatch would extract the wrong archive under a skill's name. Iterate skillConfigs directly and drop the refs option. Refs microsoft#566 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
requested review from
Cedric Vidal (cedricvidal) and
Wassim Chegham (manekinekko)
as code owners
October 27, 2026 05:10
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Addresses item 2 of #566.
extractSkillsToWorkspace()took two arrays:refsandskillConfigs. It paired them by index, sorefs[i]picked the archive andskillConfigs[i].namepicked the install directory.SkillConfigalready has areffield, which makes the second array redundant. It also creates a fragile contract: if the two arrays ever get out of step, a skill's archive is extracted under another skill's name, and nothing errors.This PR removes the
refsoption and iteratesskillConfigsdirectly, reading each config's ownref:packages/shared/src/skills/skill-extractor.ts: droprefsfromExtractSkillsOptions; loop overskillConfigs.packages/shared/src/queue/queue-processor.ts: stop passingrequestDoc.skillRevisionsseparately.skillConfigscomes fromSkillClient.resolveSkills(), which keeps the refs' order and throws on any missing ref, so what gets extracted doesn't change.The other items in #566
apps/workers/coder-vscode-electron-driver-ext, which isn't in this repository, so there's nothing to change here.skill-prompt.test.ts):prependSkillsToMessagealready has behavioral tests inpackages/shared/src/skills/skill-prompt.test.ts: unchanged message when there are no skills or the list is empty orundefined, the discovery block placed before the message without the full skill content, and the double-newline separator. I found nothing untested, so this PR leaves it alone.With that, nothing else in #566 seems to apply to this repo. I left the issue open (this PR says "Refs", not "Fixes") so a maintainer can decide whether to close it.
Tests
skill-extractor.test.tscases updated to droprefs:.npx vitest run packages/shared/src/skills packages/shared/src/queue: 13 files, 154 tests pass.tsc --noEmitforpackages/sharedis clean.Docs
docs/architecture/skills.md(Delivery) now says the extractor takes onlySkillConfig[], and that a failed skill is logged and skipped.🤖 Generated with Claude Code