Repository navigation
Conversation
…traction SessionSkillContextProvider.execute_tool handles read calls for SKILL.md itself and passed the raw URI straight to viking_fs.read_file. The read tool it advertises documents the viking://~/... form, and volcengine#7417 made MemoryReadTool resolve that alias, but this override never went through MemoryReadTool, so viking://~/skills/<name>/SKILL.md was rejected by the filesystem and the existing skill could not be read during extraction. Resolve the URI with validate_request_viking_uri before reading, so the read and the read_file_contents cache use the canonical user URI, as MemoryReadTool does.
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.
Description
Follow-up to #7417 for the skill-extraction path.
SessionSkillContextProvider.execute_toolhandlesreadcalls forSKILL.mditself and passes the raw URI straight toviking_fs.read_file. Thereadtool it exposes documents theviking://~/...form, and #7417 madeMemoryReadToolresolve that alias. This override never goes throughMemoryReadTool, though, so the alias is never expanded on this path.Example, for user
aliceduring session skill extraction:read(uri="viking://~/skills/code-review/SKILL.md")reaches the filesystem unresolved and is rejected, so the existing skill can't be read and the extractor works without it.viking://user/alice/skills/code-review/SKILL.md, then read and authorized as before.Human Involvement
Related Issue
Follow-up to #7417 (same alias resolution, for the
SKILL.mdread override).Type of Change
Changes Made
SessionSkillContextProvider.execute_toolruns the URI through the existingvalidate_request_viking_uribefore readingSKILL.md. The read and theread_file_contentscache key use the canonical URI, matchingMemoryReadTool. Filesystem authorization is unchanged.except Exceptionbranch, as other read failures already do.test_session_skill_context_provider_read_resolves_home_alias: an alias read is served from the canonical user path and cached under it.Testing
The new test fails without the fix:
read_fileis awaited withviking://~/skills/...instead of the user path.tests/session/memory+tests/session/test_commit_skill_inference.py:main: 1146 passed, the same 9 failed.The extra pass is the new test. The 9 failures are not touched by this change (e.g. the compile-cancel
cancelling/cancelledassertion also noted in #7417, andtest_skill_operation_updater_sanitizes_existing_skill_updatesexpecting nopreserve_fields).ruff checkpasses on the changed files.Checklist