Skip to content

test: add E2E smoke tests for skill CLI#363

Merged
anandgupta42 merged 1 commit intomainfrom
fix/add-smoke-tests
Mar 22, 2026
Merged

test: add E2E smoke tests for skill CLI#363
anandgupta42 merged 1 commit intomainfrom
fix/add-smoke-tests

Conversation

@anandgupta42
Copy link
Contributor

@anandgupta42 anandgupta42 commented Mar 22, 2026

What does this PR do?

Adds committed E2E smoke tests that were previously only run as ad-hoc bash commands. These cover critical safety and lifecycle paths.

New tests (5):

  • skill create → test → remove lifecycle — full lifecycle in isolated tmpdir
  • cannot remove git-tracked skill — verifies git protection (the dbt-develop bug)
  • symlinks are skipped during install copy — security regression test
  • GitHub URL normalization — extracts owner/repo from web URLs
  • .git suffix stripping — prevents double-append

Total: 26 tests, 91 assertions (was 21/75).

Type of change

  • New feature (non-breaking change which adds functionality)

Issue for this PR

Closes #362

How did you verify your code works?

bun test test/cli/skill.test.ts — 26 pass, 0 fail

Checklist

  • My code follows the style guidelines of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Tests
    • Added comprehensive end-to-end smoke test suites for skill lifecycle operations, verifying tool detection and executability, proper handling of tracked and untracked skills during removal, symlink safety during installation copy procedures, and GitHub URL normalization including edge case handling for various URL formats.

…L parsing

New tests:
- `skill create → test → remove lifecycle` — full lifecycle in tmpdir
- `cannot remove git-tracked skill` — verifies git protection works
- `symlinks are skipped during install copy` — security regression test
- `GitHub URL normalization` — extracts owner/repo, strips .git suffix

Total: 26 tests, 91 assertions (was 21/75).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 46281a21-ad35-43b1-ac45-089b237e9da4

📥 Commits

Reviewing files that changed from the base of the PR and between 46aada2 and 88e6de0.

📒 Files selected for processing (1)
  • packages/opencode/test/cli/skill.test.ts

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

Added comprehensive end-to-end smoke tests for the skill CLI covering skill lifecycle management, git-tracked file protection, symlink safety during file copying, and GitHub URL normalization helper functions.

Changes

Cohort / File(s) Summary
Skill CLI E2E Tests
packages/opencode/test/cli/skill.test.ts
New test suites covering skill lifecycle (creation, tool detection, removal), git-tracked file protection, symlink safety during install/copy operations, and GitHub URL parsing with regex-based normalization and .git suffix stripping.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

contributor

Poem

🐰 A bundled skill takes shape today,
With tests to guide it on its way,
Git-tracked treasures stay secure,
Symlinks leashed—our tools endure.
URLs parsed with regex cheer,
The skill CLI shines bright and clear! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/add-smoke-tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@anandgupta42 anandgupta42 merged commit c3d29eb into main Mar 22, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add E2E smoke tests for skill CLI

1 participant