Skip to content

Smoke test bundled CLI before publish#2656

Open
delusionofgrandeur wants to merge 1 commit into
pingdotgg:mainfrom
delusionofgrandeur:fix/project-cli-bundled-effect
Open

Smoke test bundled CLI before publish#2656
delusionofgrandeur wants to merge 1 commit into
pingdotgg:mainfrom
delusionofgrandeur:fix/project-cli-bundled-effect

Conversation

@delusionofgrandeur
Copy link
Copy Markdown

@delusionofgrandeur delusionofgrandeur commented May 12, 2026

Summary

  • add a bundled CLI smoke script that runs dist/bin.mjs project add against temporary directories
  • run the bundled CLI smoke in CI after the desktop/server build
  • run the same smoke in the npm publish job before npm publish

Why

Published t3@0.0.23 can 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:bundle
  • npx --yes bun@1.3.11 --filter=t3 run smoke:cli-bundle
  • npx --yes bun@1.3.11 run fmt
  • npx --yes bun@1.3.11 run --bun lint (passes with existing warnings)
  • npx --yes bun@1.3.11 run --bun typecheck
  • npx --yes bun@1.3.11 --filter=t3 run test -- src/bin.test.ts

Full npx --yes bun@1.3.11 run --bun test was also attempted locally, but failed in unrelated packages/effect-codex-app-server/src/client.test.ts with a 5000ms timeout.


Note

Medium Risk
Adds a new CI/release gate that executes the built dist/bin.mjs CLI 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-bundle script that runs the built CLI entrypoint (apps/server/dist/bin.mjs) with project add against 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

  • Adds smoke-cli-bundle.ts which verifies the built dist/bin.mjs exists, runs project add against a temporary workspace, and checks stdout for "Added project".
  • Wires the test into both the CI quality job and the release pipeline via a new smoke:cli-bundle npm script, running before the publish step in releases.

Macroscope summarized e6ecfab.

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.
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 12, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 76dc88ef-117e-48b6-a0da-a3c2011b1821

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e6ecfab. Configure here.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 12, 2026

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant