Skip to content

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

Description

@V3RON

Summary

.github/workflows/ci.yml runs the whole gate as:

pnpm turbo run typecheck build lint test --affected

packages/cli/package.json defines only build, typecheck, and lint — there is no test script. So turbo resolves the task to nothing:

$ npx turbo run test --filter=rozenite --dry=json
rozenite#test -> <NONEXISTENT>

The package has 10 test files that only run if someone invokes vitest inside the directory by hand.

Evidence: three stale tests accumulated unnoticed

Because nothing ran them, behavior changes updated only the tests CI actually executed:

  1. 5 failures in src/__tests__/config-wrapper.test.ts427c1515 (feat(cli): add 'enabled' when wrapping config (#108)) intentionally started emitting { enabled: process.env.WITH_ROZENITE === 'true' }. git show 427c1515 --stat confirms it touched only config-wrapper.ts, never the test.

  2. 1 failure in src/__tests__/agent-command-output.test.ts7b00844e (fix: align agent websocket origin (#307)) changed DEFAULT_AGENT_HOST from localhost to 127.0.0.1. That commit updated packages/middleware's tests but not this one.

In both cases the implementation is correct and the test expectation is stale.

Scope of the gap

The same forced full-repo run shows other tasks silently resolving to nothing:

  • rozenite#test
  • @rozenite/agent-bridge#test — this one has a real test file (useRozeniteAgentTool.test.tsx)
  • @rozenite/agent-bridge#lint
  • @rozenite/agent-shared#lint
  • @rozenite/tanstack-query-plugin#test

agent-bridge is the notable one: it ships tests that CI has never executed.

Proposed fix

Add the missing test script to packages/cli (matching packages/middleware and packages/agent-sdk), and fix the stale expectations so the suite lands green. turbo.json needs no change — its generic test task already declares dependsOn: ["^build", "build"].

The other packages listed above are worth a follow-up audit; a repo-wide check that every package with test files also declares a test script would prevent this recurring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions