fix(skill): recover malformed skill names#21295
Open
thesobercoder wants to merge 1 commit intoanomalyco:devfrom
Open
fix(skill): recover malformed skill names#21295thesobercoder wants to merge 1 commit intoanomalyco:devfrom
thesobercoder wants to merge 1 commit intoanomalyco:devfrom
Conversation
Author
|
The failing unit (linux) check looks unrelated to this PR. The only failing test is memory: abort controller leak > webfetch does not leak memory over many invocations, which is outside the skill tool area touched here. This PR only changes:
I reran the memory test locally with: It passed locally with memory growth at 2.88 MB, below the test threshold. This looks more like a flaky Linux memory check than a regression from this change. |
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.
Issue for this PR
Closes #21279
Type of change
What does this PR do?
The
skilltool previously required an exact skill name match, so malformed model output like"}rpa-vision "failed even whenrpa-visionexisted.This retries lookup with a trimmed and cleaned name when the exact lookup misses, then uses the resolved canonical skill name for permission checks. It keeps the change local to the skill tool and adds a regression test for the reported case.
How did you verify your code works?
cd packages/opencode && bun test test/tool/skill.test.tscd packages/opencode && bun typecheckcd packages/opencode && bun testScreenshots / recordings
N/A
Checklist