chore(release): add release-smoke pre-release gate + fix stale CLI --version#175
Conversation
`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>
🤖 Gemini code reviewThis PR introduces a robust pre-release smoke testing script ( Findings: 🔴 0 · 🟠 0 · 🟡 0 · 🟢 1 Tokens spent · ⬆️ Input: 3,997 · ⬇️ Output: 274 · Σ Total: 9,820 |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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>
Why
We're prepping the next codeoid release and had no single command to answer "is
mainreleasable?" 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:codeoid --version==package.jsonXDG_CONFIG_HOME,--no-web --no-telegram)The integration layer is opt-in —
CODEOID_SMOKE_INTEGRATION=1 bun run smoke(needs an authed backend; costs tokens). Backends come fromCODEOID_SMOKE_BACKENDS(defaultclaude); 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=1runs every stage even after a failure.The boot probe uses a throwaway config dir, so it never touches your real
~/.codeoidstate or a daemon you already have running.Drive-by fixes the smoke surfaced
fix(cli): source --version from package.json—codeoid --versionwas hardcoded to"0.1.0"while the package is0.2.0. The shipped binary lied about its version. Now sourced frompackage.json(bun inlines the JSON at build) so it can't drift — and the smoke's version-coherence stage keeps it honest. (Run against unpatchedmain, the smoke FAILs this stage — which is the point.)test:integrationpointed at an emptysrc/integration/directory (ran zero tests). Repointed at the actualsrc/tests/*.integration.test.tssuites.Verification
bun run smokeon this branch — all deterministic stages green:🤖 Generated with Claude Code