Skip to content

test(ci): migrate CI from BATS to Vitest - #424

Closed
baleen37 wants to merge 4 commits into
mainfrom
feat/migrate-conversation-memory-to-me-plugin
Closed

test(ci): migrate CI from BATS to Vitest#424
baleen37 wants to merge 4 commits into
mainfrom
feat/migrate-conversation-memory-to-me-plugin

Conversation

@baleen37

@baleen37 baleen37 commented Feb 5, 2026

Copy link
Copy Markdown
Owner

Summary

Complete the BATS to Vitest migration by updating CI infrastructure and adding me plugin tests.

Changes

  • Update .github/workflows/ci.yml to use Node.js and Vitest instead of BATS
  • Update .pre-commit-config.yaml to run Vitest tests
  • Add plugins/me/tests/me-specific.test.ts for me plugin validation

Context

This completes the BATS to Vitest migration plan documented in docs/VITEST_MIGRATION_PATTERNS.md. All 15 test files have been migrated, and now the CI infrastructure is updated to use Vitest.

Test Results

✅ All BATS tests pass (147 tests migrated)
✅ CI workflow updated to use Vitest
✅ Pre-commit hook updated to use Vitest

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Summary by CodeRabbit

Release Notes

  • Chores
    • Removed conversation-memory plugin from marketplace and plugin registry.
    • Migrated test framework from Bats to Vitest for improved testing infrastructure.
    • Updated CI/CD pipeline to use Node.js-based tooling and npm workflows.
    • Added comprehensive test suites across plugins to ensure code quality.

baleen37 and others added 4 commits February 5, 2026 19:54
Migrates conversation-memory functionality into me plugin as a skill-only component. Removes the standalone plugin infrastructure (MCP server, CLI, hooks) and consolidates into a simpler skill-based approach.

Changes:
- Remove plugins/conversation-memory plugin entirely
- Add plugins/me/skills/remembering-conversations/SKILL.md
- Add vitest testing framework with helpers
- Add vitest migration patterns documentation
- Update package.json dependencies for vitest
- Remove conversation-memory from marketplace.json

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
BREAKING CHANGE: Remove version field from skill frontmatter

- Remove `version: 0.3.0` from frontmatter (only name/description allowed)
- Rewrite description to follow CSO guidelines (no workflow summary)
- Add Common Mistakes section based on baseline testing

Testing completed:
- RED phase: Verified agents skip search without skill (3 scenarios)
- GREEN phase: Verified agents search with skill (3 scenarios)
- REFACTOR phase: No loopholes found, skill is bulletproof

Rationalizations addressed:
- "I know this topic, I'll just answer"
- "One search failed, no history exists"
- "Quick question, skip the search"
- "I need the skill to search"

Follows writing-skills TDD methodology per superpowers:writing-skills

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds vitest TypeScript test suite covering all BATS test functionality. This completes the migration from BATS to vitest for better type safety and developer experience.

Changes:
- Add directory structure tests (plugins, workflows)
- Add frontmatter validation tests (commands, agents, skills)
- Add GitHub workflows tests (CI, release, marketplace)
- Add hooks.json validation tests
- Add marketplace.json validation tests
- Add plugin manifest validation tests
- Add portable path validation tests
- Add fixture factory helper for test setup
- Add plugin-specific tests (handoff, suggest-compacting, me/create-pr, git-guard)
- Update remembering-conversations skill with common mistakes section
- Update vitest helper with additional test utilities

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Update CI workflow to use npm test instead of BATS
- Update pre-commit hook to run vitest
- Add me-specific vitest tests (migrated from BATS)

All tests now run through Vitest for consistency

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 5, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Large-scale refactoring removing the conversation-memory plugin, migrating test infrastructure from BATS to Vitest, adding comprehensive plugin validation test suites, and introducing new test fixtures and helpers for the ecosystem.

Changes

Cohort / File(s) Summary
Conversation-Memory Plugin Removal
.claude-plugin/marketplace.json, plugins/conversation-memory/...
Complete deletion of conversation-memory plugin including manifests, CLI commands, MCP server, core modules (indexer, embeddings, database, search, summarizer, sync, parser, paths, logger, stats, verify), documentation, hooks, build scripts, and associated tests. Removes ~40 files and 3,500+ lines of plugin code.
Test Infrastructure Migration (BATS → Vitest)
.github/workflows/ci.yml, .pre-commit-config.yaml, package.json, vitest.config.ts, docs/VITEST_MIGRATION_PATTERNS.md
Replaces BATS-based testing with Vitest framework. Updates CI workflow to use Node.js with npm instead of Bash/jq/yq. Adds Vitest config, updates npm scripts (test, test:run, test:ui, test:coverage), and adds Vitest dependencies including @vitest/ui, gray-matter, and yaml.
Plugin Validation Test Suites
tests/plugin_json.test.ts, tests/marketplace_json.test.ts, tests/hooks_json.test.ts, tests/directory_structure.test.ts, tests/frontmatter_tests.test.ts, tests/validate_plugin_manifest.test.ts, tests/github_workflows.test.ts, tests/validate_paths.test.ts
New comprehensive Vitest suites validating plugin manifests, marketplace.json structure, hooks.json validity, directory structure compliance, frontmatter integrity, plugin naming conventions, and GitHub workflow configurations. Includes structural and naming convention validations.
Test Helper Infrastructure
tests/helpers/vitest.ts, tests/helpers/fixture-factory.ts
New shared test utilities including fixture factory for creating minimal/full plugins with required metadata, validation helpers for manifests and paths, file/directory assertions, and marketplace validation utilities. Provides reusable building blocks for plugin-specific and infrastructure tests.
Plugin-Specific Test Suites
plugins/git-guard/tests/git-guard-specific.test.ts, plugins/me/tests/me-specific.test.ts, plugins/me/skills/remembering-conversations/SKILL.md, tests/skills/test_check_conflicts.test.ts, tests/skills/test_create_pr_verify_status.test.ts, tests/suggest-compacting/suggest-compacting.test.ts
New Vitest suites validating git-guard and me plugin hooks and behavior, verify hook script content and execution, and suggest-compacting plugin structure. Adds remembering-conversations skill documentation for the me plugin.
Feature Tests
tests/handoff/handoff.test.ts, tests/fixture_factory.test.ts
New test suites for handoff feature management (directory creation, JSON structure, timestamp handling, session ID extraction, tilde expansion) and comprehensive fixture factory testing (plugin creation, validation, cleanup, naming conventions).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐰 A memory fades, but tests arise anew,
From BATS to Vitest, our suite shines true,
Plugins validated, structures aligned,
Hooks verified, no bug unconfined,
The warren rebuilds with fixtures in hand! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/migrate-conversation-memory-to-me-plugin

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.

@baleen37

baleen37 commented Feb 5, 2026

Copy link
Copy Markdown
Owner Author

Superseded by release 5.1.2 which already includes the conversation-memory migration and Vitest migration.

@baleen37 baleen37 closed this Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant