Skip to content

ci(cli): run the CLI test suite in CI - #331

Open
V3RON wants to merge 3 commits into
mainfrom
chore/run-cli-tests-in-ci
Open

ci(cli): run the CLI test suite in CI#331
V3RON wants to merge 3 commits into
mainfrom
chore/run-cli-tests-in-ci

Conversation

@V3RON

@V3RON V3RON commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

packages/cli had no test script, so pnpm turbo run typecheck build lint test --affected in CI resolved its test task to nothing (rozenite#test -> <NONEXISTENT>) and its 10 test files never ran.

This adds the missing script and fixes the six stale expectations that had accumulated behind the gap:

  • 5 in config-wrapper.test.ts427c1515 (feat(cli): add 'enabled' when wrapping config (#108)) intentionally started emitting { enabled: process.env.WITH_ROZENITE === 'true' }, and touched only the implementation.
  • 1 in agent-command-output.test.ts7b00844e (fix: align agent websocket origin (#307)) changed DEFAULT_AGENT_HOST from localhost to 127.0.0.1, updating packages/middleware's tests but not this one.

In both cases the implementation is correct and the test was stale, so the expectations were updated rather than the code.

Related Issue

Closes #330

Context

The stale-test fixes come first, as separate commits, so the suite is green before it is switched on — otherwise this lands a red build.

turbo.json needs no change: its generic test task already declares dependsOn: ["^build", "build"], the same dependency shape typecheck needs to build workspace deps first.

Worth landing before #322, which adds a substantial number of CLI tests that would otherwise also not run.

Two notes for the reviewer:

  • No version plan. This is test and CI configuration only — no publishable package behavior changes.
  • packages/cli has no test script, so the CLI's test suite never runs in CI #330 lists four other task/package pairs that also silently resolve to nothing, including @rozenite/agent-bridge#test, which has a real test file CI has never executed. Those are left for a follow-up rather than widened into this PR.

Testing

  • npx turbo run typecheck lint test --force across the whole repo: 100 successful, 100 total, with rozenite#test now present and passing 73 tests across 10 files.
  • Confirmed npx turbo run test --filter=rozenite --dry=json reports rozenite#test -> vitest --run --passWithNoTests instead of <NONEXISTENT>.
  • Verified each stale-test root cause with git show --stat on the two originating commits, to confirm the implementation was intentional and the test was simply never updated.

V3RON added 3 commits July 30, 2026 16:22
Commit 427c151 (#108) added the `{ enabled: process.env.WITH_ROZENITE
=== 'true' }` option to wrapConfigFile's generated code but never
updated these tests, leaving 5 assertions stale and failing.
packages/cli had no test script, so `pnpm turbo run typecheck build
lint test --affected` silently skipped its suite in CI (turbo reports
rozenite#test -> <NONEXISTENT>). Add the same
`vitest --run --passWithNoTests` script used by sibling packages;
turbo.json's existing generic test task (dependsOn ^build, build)
already builds workspace deps first, so no turbo.json changes needed.
DEFAULT_AGENT_HOST changed from localhost to 127.0.0.1 in 7b00844
("fix: align agent websocket origin (#307)"). That commit updated the
middleware tests but not this one, because packages/cli has no test
script and so its suite never ran in CI.
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
rozenite Skipped Skipped Jul 30, 2026 11:31pm

Request Review

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.

packages/cli has no test script, so the CLI's test suite never runs in CI

1 participant