Smoke test bundled CLI before publish#2656
Conversation
Add a bundled CLI smoke test that runs project add against temp directories. Wire it into CI after the desktop/server build and into the npm publish job before publishing the package.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e6ecfab. Configure here.
| import { dirname, join, resolve } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import * as Console from "effect/Console"; | ||
| import * as Effect from "effect/Effect"; |
There was a problem hiding this comment.
Unnecessary Effect imports for simple console.log
Low Severity
effect/Console and effect/Effect are imported solely for Effect.runSync(Console.log(...)), which is functionally identical to console.log(...). A smoke test that validates a bundled artifact ideally avoids pulling in the very framework being tested as a transitive dependency; a plain console.log keeps the script minimal and removes two unused-beyond-one-line imports.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e6ecfab. Configure here.
ApprovabilityVerdict: Approved This PR adds CI smoke tests to validate the bundled CLI before publishing. All changes are test infrastructure (CI workflow steps and a test script) with no production code modifications. The unresolved comment is a minor style suggestion. You can customize Macroscope's approvability policy. Learn more. |


Summary
dist/bin.mjs project addagainst temporary directoriesnpm publishWhy
Published
t3@0.0.23can fail after startup in a way source-level CLI tests do not catch. This adds a release-artifact check so packaged CLI regressions fail before publish.Verification
npx --yes bun@1.3.11 --filter=t3 run build:bundlenpx --yes bun@1.3.11 --filter=t3 run smoke:cli-bundlenpx --yes bun@1.3.11 run fmtnpx --yes bun@1.3.11 run --bun lint(passes with existing warnings)npx --yes bun@1.3.11 run --bun typechecknpx --yes bun@1.3.11 --filter=t3 run test -- src/bin.test.tsFull
npx --yes bun@1.3.11 run --bun testwas also attempted locally, but failed in unrelatedpackages/effect-codex-app-server/src/client.test.tswith a 5000ms timeout.Note
Medium Risk
Adds a new CI/release gate that executes the built
dist/bin.mjsCLI against temp directories; risk is mainly workflow brittleness/flakiness that could block builds or publishing if the smoke test is too strict or environment-sensitive.Overview
Adds a new
smoke:cli-bundlescript that runs the built CLI entrypoint (apps/server/dist/bin.mjs) withproject addagainst temporary directories and fails if expected output is missing, cleaning up temp state afterward.Wires this smoke test into GitHub Actions: it now runs in the main CI job after the desktop build, and in the release pipeline after building the CLI but before
npm publish, so bundled-artifact regressions fail before publishing.Reviewed by Cursor Bugbot for commit e6ecfab. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add bundled CLI smoke test before publish in CI and release workflows
dist/bin.mjsexists, runsproject addagainst a temporary workspace, and checks stdout for"Added project".smoke:cli-bundlenpm script, running before the publish step in releases.Macroscope summarized e6ecfab.