promote: test → main (skill installation)#528
Conversation
Closes the second-largest gap identified in the cutover analysis: every session sandbox now installs the platform default skills (recoup-api, artist-workspace) plus any user-configured globalSkillRefs from the session row, so agents come up with their tools loaded. Best-effort: wraps installSessionGlobalSkills in try/catch inside createSandboxHandler. A skill-install failure does NOT fail the sandbox creation request — sandbox + DB stay consistent, agent runs without skills (or whichever subset got through), and the user can recover with a follow-up request once the underlying issue is fixed. Mirrors open-agents' error handling exactly. New files: - lib/sandbox/shellEscape.ts — POSIX single-quote escaper - lib/sandbox/resolveSandboxHomeDirectory.ts — probes $HOME, falls back to /root - lib/skills/globalSkillRef.ts — Zod schema + dedup transform + normalizeGlobalSkillRefs (best-effort parse) - lib/skills/defaultGlobalSkillRefs.ts — recoup-api + artist-workspace - lib/skills/installGlobalSkills.ts — runs `npx skills add ...` per ref via sandbox.exec, throws on first failure - lib/sandbox/installSessionGlobalSkills.ts — combines defaults + user refs, no-op on empty Wired into lib/sandbox/createSandboxHandler.ts after the session-row update so the DB write happens first. TDD red -> green throughout. +22 new unit tests across 6 helper files covering: shell-escape edge cases (apostrophes, empty, metacharacters), home-directory probe success/failure/empty fallback, ref schema validation (owner/repo regex, skillName whitespace), case-insensitive dedup, normalize on invalid input, default refs constant, install per ref + dedup + failure throw, session-level wrapper merging defaults + user refs (rejects whole user array on any invalid item — matches open-agents). Plus 3 new tests on createSandboxHandler asserting installSessionGlobalSkills is invoked, that a thrown skill-install still 200s the response, and that no-sessionId paths skip the install. Suite: 2534 -> 2559 (+25 net new tests). pnpm lint:check clean. TS clean for new files (verified via tsc --noEmit; pre-existing TS errors in lib/tasks and lib/trigger remain on main, unrelated). What's still missing from the open-agents cutover gap analysis: - Org base-snapshot warm boot - Lifecycle workflow kicks (sandbox-created, status-check-overdue) - Failure-state self-healing in /status - Transient/unavailable error distinction in /reconnect Each of these blocks on workflow infra in api or is its own follow-up. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (7)
📒 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 |
Promotes the skill-installation port from
testtomain.What lands on main
feat(sandbox): port skill installation from open-agents(feat(sandbox): port skill installation from open-agents #527, squash-merged into test asaf57348d)Verification
🤖 Generated with Claude Code
Summary by cubic
Promotes skill installation to
mainso new session sandboxes auto-install platform defaults plus any user-configured global skills on creation. Installation is best-effort and never blocks sandbox creation.createSandboxHandlerto runinstallSessionGlobalSkillsafter the session update.recoup-apiandartist-workspacefromrecoupable/skills.global_skill_refs.npx skills add ...in-sandbox with safe quoting and$HOMEdetection (shellEscape,resolveSandboxHomeDirectory).Written for commit af57348. Summary will update on new commits.