Repository navigation
feat(skills): backport tree-first import (#5753), reconciled with directory picker + batch - #13
Conversation
…5136) (#5753) Rework skills.sh and github.com skill imports around a single recursive git-tree fetch to stop the 504 on large mono-repos (e.g. api-gateway-skill): - One tree call replaces the per-directory contents crawl. - Import caps checked arithmetically from tree metadata before any download (fail fast with 413 instead of timing out). - Most-specific skill-dir resolution; repo root only as a last resort, which fixes the root SKILL.md name collision. - Concurrent downloads (errgroup, limit 8). - Overall 45s fetch deadline; cancellation is fatal on every supporting-file path (tree downloader, crawl listing/recursion/download, ClawHub) so a mid-download abort never persists a half-populated bundle. - A skills.sh tree-fetch failure returns a retryable 503 instead of an unsafe root-directory fallback. - Lenient conventional-path acceptance restored for both complete and truncated trees. - maxImportFileCount 128 -> 256 (aligned daemon cap); 8 MiB bundle cap remains the real guard. (cherry picked from commit 4233e82)
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Backports upstream #5753 (
fix(skills): tree-first skill import to stop 504 on large repos, MUL-5136) and reconciles it with the fork's directory-of-skills picker (#9) + batch endpoint (#10).What #5753 does
Rewrites the GitHub skill importer to be tree-first: one recursive
git/treesrequest resolves the skill dir and enumerates supporting files, which are then downloaded with bounded concurrency — instead of an N-request per-directory contents crawl that 504'd on large repos. It also threadsctxthrough every GitHub helper (fetchFromGitHub,fetchFromClawHub,fetchFromSkillsSh,doGitHubAPIGet,resolveGitHubRefAndPath,fetchGitHubDefaultBranch,fetchRawFile, …) and bounds the whole import underimportFetchTimeout(45s) so a slow source surfaces a readable error, not a proxy 504.Reconciliation with the fork's skill work
discoverGitHubDirectorySkills): now takesctxand reuses #5753'sfetchGitHubTree(the same one-request tree fetch) instead of its own hand-rolled tree call. TheImportSkillGitHub branch keeps the "container dir → return candidates for the user to pick" fallback, now ctx-threaded.skill_import_batch.go):fetchImportedSkillWithRetrythreadsctxinto the fetchers.skill_sync.go):importSkillFromSourcethreadsctxinto the fetchers.Verification
go build/vetclean; full handler skill/import/sync/batch test suite passes.lark-basefetches cleanly (25 files) — i.e. the picker + batch still work end-to-end on top of the new engine.🤖 Generated with Claude Code