fix(cli,ci): correct relavium --version + release-smoke install path; mark 2.L Done - #50
Conversation
…nstall path Two defects in the 2.L packaging (ADR-0051), each of which would block or spoil the first publish; both surfaced after the tag-triggered Release CLI run. 1. `relavium --version` reported the hardcoded `0.0.0` sentinel, never the package version — it was never wired to package.json (the program.ts comment deferred it to "packaging (2.L)"). tsup now injects the manifest version at build time via a `__RELAVIUM_CLI_VERSION__` esbuild `define`; program.ts reads it behind a `typeof` guard and falls back to `0.0.0-dev` on a source run (tsx/vitest, no define). Bundled `relavium --version` → `0.1.0`; source → `0.0.0-dev`. 2. The cross-OS install-smoke failed on ubuntu/macOS/Windows: `npm install -g artifact/relavium-X.tgz` — a slash-bearing arg without `./` — is read by npm as a GitHub `owner/repo` shorthand and git-cloned (`Permission denied (publickey)`), never as the local tarball. Prefix with `./` so npm classifies it as a file spec (verified via npm-package-arg: bare → git, `./` → file). The publish job is gated on green smoke, so nothing was published. Also assert `relavium --version == package.json` in the smoke matrix so a version-wiring regression is caught before publish — the old smoke only ran `--help`, which is why #1 slipped. Refs: ADR-0051 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…xt pickup 2.S 2.L (CLI packaging, distribution & install verification) merged via PR #49, closing the last Phase-3 go/no-go exit criterion (#7) — so the Phase-2 spine is complete and all seven criteria now hold. Move 2.L from "next pickup" into the Landed/Done list and re-point the next pickup to 2.S (media host-wiring, the first additive lane — off the M3 critical path and the go/no-go). Audited every status surface; updated only the live trackers and left the static plan views (Mermaid DAGs, wave/dependency tables, exit-criteria definitions) unchanged per their own "the plan, not a live tracker" framing. - current.md: 2.L Done entry + next pickup 2.S; re-tense the NPM_TOKEN maintainer obligation ("once 2.L lands" → "now that 2.L has landed (PR #49)"). - phase-2-cli.md: §2.L heading ✅ Done badge; header status line; Remaining-build-order banner; drop the 2.L row from the pickup queue and renumber 2.S/2.R/chat/2.J to 1–4; re-tense the gate-closing-backbone, 2.K-closed, and 2.S-timing bullets. - CLAUDE.md, README.md: append the 2.L packaging deliverable to the landed Phase-2 list; next pickup 2.S; all seven Phase-3 exit criteria now hold. - runbooks/release-a-surface.md: Status "draft" → "partial — CLI (npm) flow complete (2.L)". ADR-0051's "(today a stub)" aside about the runbook is left unedited: ADRs are append-only (CLAUDE.md rule 9) and it is a harmless point-in-time authoring note. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @cemililik, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe CLI now stamps its package version at build time, falls back to a dev sentinel when run without the injected token, and the release smoke job compares the installed tarball version against ChangesCLI release flow and status docs
Sequence Diagram(s)sequenceDiagram
participant ".github/workflows/release.yml" as releaseWorkflow
participant "artifact/*.tgz" as tarball
participant "relavium" as cli
participant "apps/cli/package.json" as packageJson
releaseWorkflow->>tarball: install ./artifact/*.tgz
releaseWorkflow->>cli: run relavium --version
releaseWorkflow->>packageJson: read PKG version
releaseWorkflow->>releaseWorkflow: compare VER to PKG
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request implements CLI packaging, distribution, and install verification (workstream 2.L). It updates the build configuration in tsup.config.ts to read the package version from package.json and inject it into the bundle via __RELAVIUM_CLI_VERSION__ at build time, which is then consumed in program.ts. Various documentation files are also updated to reflect that workstream 2.L has landed, completing the Phase-2 spine and satisfying all Phase-3 exit criteria. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Handle G0 and #50 with a reversible SIGTSTP/SIGCONT lifecycle, register Home safety nets before onboarding, and pin the raw Ctrl-Z and terminal-state regressions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Release and reclaim Clack-owned terminal state around onboarding stops, replay a stop issued during Ink reclaim, and disarm reversible handoffs before permanent terminal restoration. Refs: G0, #50 Co-Authored-By: Claude <noreply@anthropic.com>
Retry incomplete Clack cursor reclamation before a later stop request and preserve terminal safety across partial control-sequence writes. Refs: G0, #50 Co-Authored-By: Claude <noreply@anthropic.com>
…(lane c, G0) Found by the lane-(c) audit. `wireJobControl` installs a SIGTSTP listener at construction, but `dispose` removed only the SIGCONT one — so every rebuild of the session left another suspend handler behind. A `/clear`, a `/model` reseat and the onboarding→Home handoff all rebuild, so one Ctrl-Z eventually ran several handlers and Node warned about a listener leak. The audit agent left this one-line fix uncommitted in the working tree. I did not take it on faith: I read the original `dispose`, confirmed `removeSuspendListener` was only reachable from the suspend flow, and pinned it with a test using the harness's existing `removeSuspend` spy — dispose must call it exactly once, and a Ctrl-Z after disposal must reach nothing. Break-verified: removing the line turns that test red. Refs: G0, #50 Co-Authored-By: Claude <noreply@anthropic.com>
…the run/gate path) The last open code item in Wave 1's lane (c). `driveRun` registered only SIGINT, ink hides the cursor while it renders, and `signal-exit`'s signal list contains no SIGTSTP — so a Ctrl-Z during `relavium run` or `relavium gate` returned the user to a shell with a permanently invisible cursor, for the rest of that terminal's life rather than just the run's. Deliberately NOT `wireJobControl`. That primitive serves the full-screen chat/Home surfaces: it releases and reclaims the alternate screen and mouse reporting and owns a suspend hatch. This path enters none of that (`RunApp` uses no `useInput`, so the terminal stays cooked and Ctrl-Z is a real signal), so reusing it would release state that was never entered. The security review's audit narrowed the harm to exactly this: no mouse-reporting leak, no retained alt screen — a hidden cursor, plus a clack gate prompt `fg` cannot revive. So the fix is the narrow pair: show the cursor before we stop, hide it again when foregrounded and ink resumes drawing. It re-raises rather than swallowing the signal — a Ctrl-Z that silently did nothing would be worse than the bug. `dispose` removes BOTH listeners, which is the leak shape `suspend.ts` itself had, and is idempotent because the caller's `finally` also runs on the throw path. A no-op where job control does not exist, rather than half-wired. Four tests, injectable lifecycle so no real signal is raised. Break-verified: dropping the show-cursor write turns two of them red. Refs: G0, #50 Co-Authored-By: Claude <noreply@anthropic.com>



Follow-up to PR #49 (2.L · ADR-0051): fixes the two defects that surfaced on the first tag-triggered
Release CLIrun, plus the 2.L-Done status bookkeeping. Nothing was published — the publish job is gated on the cross-OS smoke, which went red, sorelaviumis still absent from npm (E404).55aa3cc— fix(cli,ci): two release-blocking packaging defects1.
relavium --versionreported0.0.0. The version was a hardcoded sentinel, never wired topackage.json(theprogram.tscomment deferred it to "packaging (2.L)", but PR #49 didn't do it).tsupnow injects the manifest version at build time via a__RELAVIUM_CLI_VERSION__esbuilddefine;program.tsreads it behind atypeofguard and falls back to0.0.0-devon a source run (tsx/vitest, no define). Bundledrelavium --version→0.1.0; source →0.0.0-dev.2. The cross-OS install-smoke failed on all three runners.
npm install -g artifact/relavium-X.tgz— a slash-bearing arg without./— is read by npm as a GitHubowner/reposhorthand and git-cloned (Permission denied (publickey)), never as the local tarball. Prefixing with./forces the file spec (verified vianpm-package-arg: bare →git,./→file).Also adds a
relavium --version == package.jsonassertion to the smoke matrix so a version-wiring regression is caught before publish — the old smoke only ran--help, which is why #1 slipped through.424b363— docs(roadmap): mark 2.L Done (PR #49), next pickup 2.S2.L closed the last Phase-3 go/no-go exit criterion (#7) — the Phase-2 spine is complete and all seven criteria hold. A 4-surface discovery pass audited every status surface; only the live trackers were updated, the static plan views (Mermaid DAGs, wave/dependency tables, exit-criteria definitions) left unchanged per their own "the plan, not a live tracker" framing. ADR-0051's "(today a stub)" aside was left unedited — ADRs are append-only (CLAUDE.md rule 9).
current.md,phase-2-cli.md,CLAUDE.md,README.md: 2.L → Landed list; next pickup → 2.S (media host-wiring); NPM_TOKEN obligation re-tensed; pickup queue renumbered.runbooks/release-a-surface.md: Statusdraft→partial — CLI (npm) flow complete (2.L).Validation
turbo lint typecheck test build20/20 ·typecheck:tools· bundled--version0.1.0 + full smoke exit codes (run 0 / gate 3 / unknown 2) · bundle-closure 15 deps ·format:check·release.ymlvalid YAML · leakwatch 0 across touched files.After merge (maintainer)
Re-tag to re-run the release (v0.1.0 was never published, so it is reused):
🤖 Generated with Claude Code
Summary by CodeRabbit