fix: handle HTTPS URLs with credentials in source extraction, rewrite GC to support multi-level namespace#2368
Open
chcodex wants to merge 2 commits into
Open
Conversation
… GC to support multi-level namespace - GitSkillRepository.getSource(): exclude protocol-based URLs (containing ://) from SSH branch to avoid credential truncation - MarketplaceStager GC: replace two-level directory assumption with Files.walk(SKILL.md) scanning; support multi-level namespace paths; delete orphans deepest-first; prune empty ancestor dirs; normalize retained paths for correct matching - Add unit tests for source extraction (SSH/HTTPS/creds/multi-level/file URL) and comprehensive GC test suite (flat/multi-level/mixed namespaces)
chcodex
force-pushed
the
fix/git-repo-marketplace-stager
branch
from
July 23, 2026 09:48
602e683 to
12ec109
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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
Fix two issues in the skills caching system:
GitSkillRepository.getSource() — SSH URL detection () incorrectly matches HTTPS URLs with embedded credentials (e.g.
https://user:pass@host/repo.git), truncating the source identifier to the password fragment. Fixed by excluding protocol-based URLs containing://.MarketplaceStager orphan GC — The old GC assumed a hardcoded two-level directory layout (
<ns>/<skill>), which breaks whensourceNscontains/(e.g.git-owner/repofrom Git URLs). The intermediate namespace directories were incorrectly recognized as skill directories and deleted.Changes
GitSkillRepository.java: Add!normalized.contains("://")guard in SSH branchGitSkillRepositoryTest.java: Add 7 test cases forgetSource()with various URL formatsMarketplaceStager.java: RewritedeleteOrphanSkillDirs()to useFiles.walk(SKILL.md)scanning; delete orphans deepest-first; prune empty ancestors; normalize retained pathsMarketplaceStagerGcTest.java: New comprehensive test suite (9 cases) for flat/multi-level/mixed namespacesTesting