Skip to content

Add CI smoke test for CLI launch #199

@Alan-Jowett

Description

@Alan-Jowett

Problem

v0.6.0 shipped with a broken CLI launch — px @alan-jowett/promptkit failed with:

error: too many arguments. Expected 0 arguments but got 3.

The root cause was shell: true in spawn() splitting the bootstrap prompt string into multiple arguments. This was fixed in v0.6.1 (PR #197), but no CI test caught it before release.

Proposal

Add a CI smoke test that verifies the CLI can launch without errors. This should run on every PR that touches cli/ files.

Minimum viable test

// Verify spawn args are constructed correctly (no shell splitting)
const { launchInteractive } = require('../lib/launch');
// Mock spawn to capture the actual args passed
// Assert: args array contains the full bootstrap prompt as a single element
// Assert: spawn options do NOT include shell: true

Stretch goals

  1. Dry-run mode: Add a --dry-run flag to the CLI that prints the spawn command + args without actually launching the LLM CLI. CI can verify the output.
  2. Integration test: On a runner with copilot available, actually launch with --help or a no-op command to verify the spawn works end-to-end.
  3. npm pack test: Run pm pack and verify the tarball contains all expected files (content/, lib/, bin/) before publishing.

Context

  • v0.6.0 also had a broken pm install -g npm@latest step in the publish workflow (PR Fix npm publish: remove broken self-upgrade step #196) and an npm OIDC trusted publishing issue that required manual publish.
  • The existing test suite ( ode --test tests/*.test.js) covers list, search, and show commands but not the launch path.

Files involved

  • cli/lib/launch.js — spawn logic
  • cli/bin/cli.js — CLI entry point
  • .github/workflows/validate-manifest.yml — CI workflow (add test step here)

Metadata

Metadata

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