Problem
Our current smoke tests only run --help and --version, which exercise none of the lazy-loaded code paths (SQLite, telemetry, auth DB, Ink sidecar). This allowed two critical bugs to ship:
_require("../telemetry.js") in the CJS bundle — --help never triggers the lazy DB init
with { type: "file" } crashing in tsx dev mode — --help never loads the Ink sidecar
Proposed Tests
Binary smoke test (CI build-binary job)
After building, run more than --help:
sentry-linux-x64 auth status — exercises SQLite init, DB schema, telemetry lazy import
sentry-linux-x64 init --yes --dry-run — exercises Ink sidecar loading (or graceful fallback)
npm bundle smoke test (CI build-npm job)
After building, run more than node dist/bin.cjs --help:
node dist/bin.cjs auth status — exercises CJS require resolution for all lazy imports
node dist/bin.cjs init --yes --dry-run — exercises sidecar path resolution in CJS context
E2E bundle test (test/e2e/bundle.test.ts)
Add a test that runs node dist/bin.cjs org list against a mock server to verify the full lazy-import chain works end-to-end.
Balance
These add ~2-3 seconds to each build job but catch entire categories of bundle/require resolution bugs that --help misses.
Problem
Our current smoke tests only run
--helpand--version, which exercise none of the lazy-loaded code paths (SQLite, telemetry, auth DB, Ink sidecar). This allowed two critical bugs to ship:_require("../telemetry.js")in the CJS bundle —--helpnever triggers the lazy DB initwith { type: "file" }crashing in tsx dev mode —--helpnever loads the Ink sidecarProposed Tests
Binary smoke test (CI build-binary job)
After building, run more than
--help:sentry-linux-x64 auth status— exercises SQLite init, DB schema, telemetry lazy importsentry-linux-x64 init --yes --dry-run— exercises Ink sidecar loading (or graceful fallback)npm bundle smoke test (CI build-npm job)
After building, run more than
node dist/bin.cjs --help:node dist/bin.cjs auth status— exercises CJS require resolution for all lazy importsnode dist/bin.cjs init --yes --dry-run— exercises sidecar path resolution in CJS contextE2E bundle test (
test/e2e/bundle.test.ts)Add a test that runs
node dist/bin.cjs org listagainst a mock server to verify the full lazy-import chain works end-to-end.Balance
These add ~2-3 seconds to each build job but catch entire categories of bundle/require resolution bugs that
--helpmisses.