Skip to content

chore(release): add release-smoke pre-release gate + fix stale CLI --version#175

Merged
saucam merged 3 commits into
mainfrom
chore/release-smoke
Jul 14, 2026
Merged

chore(release): add release-smoke pre-release gate + fix stale CLI --version#175
saucam merged 3 commits into
mainfrom
chore/release-smoke

Conversation

@saucam

@saucam saucam commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Why

We're prepping the next codeoid release and had no single command to answer "is main releasable?" CI runs lint/typecheck/test/build, but silently skips the real-backend integration suites and never boots the shipped bundle — so a binary that builds but doesn't start, or reports the wrong version, would sail through.

What

bun run smoke (scripts/release-smoke.sh) — a pre-release gate that:

Stage What it proves New vs CI?
daemon lint / typecheck / test / build code + bundle are sound mirrors CI
version coherence built codeoid --version == package.json new
daemon boot probe the built bundle actually starts + binds its port (isolated XDG_CONFIG_HOME, --no-web --no-telegram) new
web lint / typecheck / test / build web app is sound mirrors CI
integration: backends (opt-in) create → turn → reply, and cross-backend fork → recall, against a live backend new

The integration layer is opt-in — CODEOID_SMOKE_INTEGRATION=1 bun run smoke (needs an authed backend; costs tokens). Backends come from CODEOID_SMOKE_BACKENDS (default claude); two authed backends also exercise the cross-backend fork-resume journey. Without opt-in it prints a clear SKIP (never a silent pass). CODEOID_SMOKE_KEEP_GOING=1 runs every stage even after a failure.

The boot probe uses a throwaway config dir, so it never touches your real ~/.codeoid state or a daemon you already have running.

Drive-by fixes the smoke surfaced

  • fix(cli): source --version from package.jsoncodeoid --version was hardcoded to "0.1.0" while the package is 0.2.0. The shipped binary lied about its version. Now sourced from package.json (bun inlines the JSON at build) so it can't drift — and the smoke's version-coherence stage keeps it honest. (Run against unpatched main, the smoke FAILs this stage — which is the point.)
  • test:integration pointed at an empty src/integration/ directory (ran zero tests). Repointed at the actual src/tests/*.integration.test.ts suites.

Verification

bun run smoke on this branch — all deterministic stages green:

PASS  daemon: lint / typecheck / test / build
PASS  daemon: version coherence      (0.2.0 == 0.2.0)
PASS  daemon: boot probe             (built bundle boots + accepts a connection)
PASS  web: lint / typecheck / test / build
SKIP  integration: backends          (opt-in)
release-smoke: OK

🤖 Generated with Claude Code

saucam and others added 2 commits July 14, 2026 09:58
`codeoid --version` was hardcoded to "0.1.0" while the package is 0.2.0,
so the shipped binary reported a stale version. Read it from package.json
(bun inlines the JSON at build) so it can never drift again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`bun run smoke` validates main before a release: it mirrors CI
(lint/typecheck/test/build for daemon + web) and adds the layers CI
can't — version coherence (built --version == package.json), a real
daemon boot probe against the built bundle (isolated XDG_CONFIG_HOME,
--no-web --no-telegram), and an opt-in real-backend journey suite
(create → turn → reply, cross-backend fork → recall) behind
CODEOID_SMOKE_INTEGRATION=1.

Also repoint the dead `test:integration` script (it pointed at an empty
src/integration/) at the actual src/tests/*.integration.test.ts suites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread scripts/release-smoke.sh
@github-actions

Copy link
Copy Markdown

🤖 Gemini code review

This PR introduces a robust pre-release smoke testing script (scripts/release-smoke.sh) that runs linting, type-checking, unit tests, version coherence checks, and a live daemon boot probe. It also fixes a bug where the CLI was hardcoded to version 0.1.0 instead of dynamically sourcing it from package.json, and corrects the integration test path.

Findings: 🔴 0 · 🟠 0 · 🟡 0 · 🟢 1


Tokens spent · ⬆️ Input: 3,997 · ⬇️ Output: 274 · Σ Total: 9,820
Total may be higher due to thinking token counts.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.90%. Comparing base (f4139b7) to head (cf15e36).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #175   +/-   ##
=======================================
  Coverage   84.90%   84.90%           
=======================================
  Files         106      106           
  Lines       18678    18678           
=======================================
  Hits        15858    15858           
  Misses       2820     2820           
Flag Coverage Δ
daemon 84.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Per Gemini review: fd 3 is opened inside a `(exec 3<>...)` subshell, which
closes it on exit — the parent-side `exec 3<&- 3>&-` was a no-op. Removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@saucam saucam merged commit 8dfcece into main Jul 14, 2026
5 of 6 checks passed
@saucam saucam mentioned this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant