Skip to content

fix: dereference symlinks when copying git skill subpaths#1649

Merged
EItanya merged 6 commits into
kagent-dev:mainfrom
samskelton1:fix/skills-subpath-symlink-copy
Apr 21, 2026
Merged

fix: dereference symlinks when copying git skill subpaths#1649
EItanya merged 6 commits into
kagent-dev:mainfrom
samskelton1:fix/skills-subpath-symlink-copy

Conversation

@samskelton1
Copy link
Copy Markdown
Contributor

@samskelton1 samskelton1 commented Apr 10, 2026

Summary

When a git skill uses a path, the init script copies the selected subdirectory and then removes the original clone root. With cp -a, symlinks inside that subdirectory are preserved as symlinks, so repo-internal links can break once the clone root is deleted.

This switches that copy step to cp -rL so symlink targets are materialized before the source repo is removed.

Verification

  • GOCACHE=/tmp/go-build GOMODCACHE=/tmp/go-mod-cache go test ./core/internal/controller/translator/agent/...

Copilot AI review requested due to automatic review settings April 10, 2026 20:26
@samskelton1 samskelton1 force-pushed the fix/skills-subpath-symlink-copy branch from f796457 to 740c126 Compare April 13, 2026 20:26
Signed-off-by: Sam Skelton <samuellskelton@gmail.com>
@samskelton1 samskelton1 force-pushed the fix/skills-subpath-symlink-copy branch from 740c126 to 75490f7 Compare April 13, 2026 20:27
@jholt96
Copy link
Copy Markdown
Contributor

jholt96 commented Apr 15, 2026

@EItanya bumping this PR as it would help us tremendously with our current skills setup. follow symlinks allow us to maintain single kb folder for skills that are for different agents e.g claude code vs agents in kagent

EItanya
EItanya previously approved these changes Apr 17, 2026
EItanya added 2 commits April 20, 2026 22:07
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
…mlink-copy-signoff

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>

# Conflicts:
#	go/core/internal/controller/translator/agent/testdata/outputs/agent_with_git_skills.json
@EItanya EItanya force-pushed the fix/skills-subpath-symlink-copy branch from f977de2 to 2088700 Compare April 20, 2026 22:08
@EItanya EItanya merged commit 50a8f19 into kagent-dev:main Apr 21, 2026
23 checks passed
Huimintai pushed a commit to Huimintai/kagent that referenced this pull request Apr 21, 2026
…#1649)

When a git skill uses a path, the init script copies the selected
subdirectory and then removes the original clone root. With cp -a,
symlinks inside that subdirectory are preserved as symlinks, so
repo-internal links can break once the clone root is deleted.

This switches that copy step to cp -rL so symlink targets are
materialized before the source repo is removed.

- GOCACHE=/tmp/go-build GOMODCACHE=/tmp/go-mod-cache go test
./core/internal/controller/translator/agent/...

---------

Signed-off-by: Sam Skelton <samuellskelton@gmail.com>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>

fix: apply ruff formatting to SAP AI Core Python files

Signed-off-by: Huimin Tai <huimin.tai@sap.com>

fix: modernize concurrent test to use range-over-int and WaitGroup.Go

Signed-off-by: Huimin Tai <huimin.tai@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants