• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 25160973150

30 Apr 2026 10:40AM UTC coverage: 64.315% (+0.001%) from 64.314%
25160973150

push

github

web-flow
Include nested files when resolving git skills (#5139)

* Walk nested subtrees in git skill resolver

The git resolver was iterating tree.Entries and skipping directory
entries, so the resolved skill bundle was always flat. WriteFiles
(MkdirAll on the parent, path-traversal guard) and the OCI packager
(filepath.WalkDir, independent maxSkillFiles/maxSkillTotalSize caps)
already support nested paths, so the only missing piece was actually
walking the subtree.

Switch collectFiles to go-git's recursive *FileIter via tree.Files().
The iterator walks subtrees, skips submodules and tree entries, and
yields forward-slash relative paths fit for both WriteContainedFile
and the packager. Companion files under references/, scripts/,
infrastructure/, etc. now reach the resolved skill bundle. The
existing in-memory clone is still bounded by LimitedFs in pkg/git,
so no new limits are required here.

* Test nested file resolution for git skills

Build a small in-memory repo with a layout that includes references/,
scripts/, and a deep/nested/dir/ entry, then assert that Resolve
returns nested files with forward-slash paths, that files outside
the requested skill subtree are not picked up, and that the
no-basePath case walks the entire tree. Locks in the recursive walk
introduced in the previous commit; would have failed against the old
flat collectFiles.

* Test nested paths through skill WriteFiles

Cover WriteFiles with FileEntry.Path values containing
subdirectories (references/foo.md, scripts/nested/run.sh,
deep/nested/dir/note.txt). WriteContainedFile already does MkdirAll
on the parent and caps modes at 0644; this test guards against
future regressions and verifies that intermediate directories are
created on disk.

6 of 8 new or added lines in 1 file covered. (75.0%)

9 existing lines in 4 files now uncovered.

61178 of 95123 relevant lines covered (64.31%)

59.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.38
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc