Skip to content

[Spec 0041] E2E Test Suite for @cluesmith/codev#78

Merged
waleedkadous merged 3 commits intomainfrom
builder/0041-e2e-test-suite
Dec 8, 2025
Merged

[Spec 0041] E2E Test Suite for @cluesmith/codev#78
waleedkadous merged 3 commits intomainfrom
builder/0041-e2e-test-suite

Conversation

@waleedkadous
Copy link
Contributor

Summary

  • Add 70 BATS-based E2E tests that verify the npm package works after installation
  • Tests cover all CLI commands: codev init, codev adopt, codev doctor, af, consult
  • XDG sandboxing prevents pollution of dev environment during testing
  • CI workflows for PR testing and post-release verification

Test Coverage

Test File Tests Coverage
install.bats 12 Package installation, binary availability
init.bats 14 Project initialization, structure creation
adopt.bats 11 Adding codev to existing projects
doctor.bats 8 Dependency checking
af.bats 11 Agent-farm CLI commands
consult.bats 14 Consultation CLI commands
Total 70

Test Execution

cd packages/codev
npm run build && npm pack
E2E_TARBALL=$(pwd)/cluesmith-codev-*.tgz bats ../../tests/e2e/

CI Workflows

  • .github/workflows/e2e.yml - Runs on PRs (macOS + Linux matrix)
  • .github/workflows/post-release-e2e.yml - Runs after npm publish

Test plan

  • All 70 tests pass locally on macOS
  • CI passes on both macOS and Linux
  • Post-release workflow validated (manual trigger with version input)

- Add tests/e2e/ directory with BATS-based end-to-end tests
- Tests cover: install, init, adopt, doctor, af, consult commands
- 70 tests total covering happy paths and error cases
- XDG sandboxing for test isolation (no pollution of dev environment)
- Add CI workflows for PR testing and post-release verification
- Tests run against npm tarball to verify package works after installation
@waleedkadous
Copy link
Contributor Author

Architect Integration Review (3-Way Consultation)

Overall Verdict: APPROVE with minor feedback

Spec Update Required

The target duration in the spec should be updated from <2 minutes to <3 minutes. The ~2:45 actual time is acceptable given proper isolation (separate npm install per test).

Feedback to Address

  1. Document the E2E_TARBALL pattern: Add a note in the test README or helpers explaining how to run tests locally with a custom tarball for debugging.

  2. Version mismatch: The review noted CLI reports 1.0.0 but package.json has 1.1.0. While this is outside the e2e test scope, please add a TODO comment in the test noting this should be investigated separately.

  3. Consider test parallelization for future: Not required now, but document in the review that parallel test execution could bring time under 2 minutes if needed later.

What Looked Good

  • XDG sandboxing implementation is solid
  • All 6 test categories (TC-001 through TC-006) covered
  • Both CI workflows (PR and post-release) properly configured
  • Error cases covered alongside happy paths

🏗️ Architect integration review

- Document E2E_TARBALL usage pattern in helpers.bash
- Add TODO for version mismatch investigation
- Document parallelization option in review
- Update target duration from <2 min to <3 min (realistic with isolation)
@waleedkadous
Copy link
Contributor Author

Addressed all integration review feedback:

  1. E2E_TARBALL pattern documented - Added usage examples in tests/e2e/helpers.bash header
  2. Version mismatch TODO - Added comment in install.bats noting this should be investigated separately
  3. Parallelization documented - Updated review with bats --jobs 4 recommendation
  4. Target duration updated - Changed spec from <2 min to <3 min

Ready for final review.

@waleedkadous waleedkadous merged commit bcf882e into main Dec 8, 2025
2 checks passed
@waleedkadous waleedkadous deleted the builder/0041-e2e-test-suite branch January 8, 2026 19:05
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