Summary
Convoy is a core Serendepify product — a deterministic deploy agent with real stage runners (GitHub PR creation, Fly.io deploy, local rehearsal). Despite its production-grade features, the repo has no test infrastructure or test files.
What to do
- Add a test runner (e.g., vitest — used by other repos in the org) to the root
package.json
- Write unit tests for the core modules:
src/core/ — orchestrator, state store, event bus, medic
src/planner/ — scanner, picker, author (especially the template logic)
src/adapters/fly/runner.ts — shell wrappers (mock flyctl)
- Add integration tests for the rehearsal runner (
src/core/rehearsal-runner.ts) with a mock target
- Configure the existing
ci.yml workflow to run npm test (or npm run typecheck && npm test)
- Consider
npx vitest --coverage for coverage reporting
Why it matters
- Regression protection: Real stage runners execute shell commands and modify state. Without tests, a refactor or new adapter silently breaks existing flows.
- CI gates: Tests block bad merges. The CI workflow exists but only does typechecking — adding tests gives us a proper safety net.
- Onboarding: New contributors (human or AI) rely on
npm test to validate their changes. Missing tests means every change is a blind push.
Acceptance criteria
Summary
Convoy is a core Serendepify product — a deterministic deploy agent with real stage runners (GitHub PR creation, Fly.io deploy, local rehearsal). Despite its production-grade features, the repo has no test infrastructure or test files.
What to do
package.jsonsrc/core/— orchestrator, state store, event bus, medicsrc/planner/— scanner, picker, author (especially the template logic)src/adapters/fly/runner.ts— shell wrappers (mockflyctl)src/core/rehearsal-runner.ts) with a mock targetci.ymlworkflow to runnpm test(ornpm run typecheck && npm test)npx vitest --coveragefor coverage reportingWhy it matters
npm testto validate their changes. Missing tests means every change is a blind push.Acceptance criteria
npm test(ornpm run test) passes with at least one test filenpm testtests/directory exists at repo root with at least 3 test files covering real logic