fix(ci): stamp app.json expo.version in the container build #292

Merged
james merged 2 commits from 291-web-version-stamp into main 2026-06-26 22:24:28 +00:00
Owner

Follow-up to #290. The v0.0.1-rc.16 build still showed Carol 0.0.0 in the web/PWA settings footer even though it included #290.

Cause

release.yml's stamp step wrote the tag version into apps/api/package.json + root package.json, but not apps/client/app.json. The image builds the web client bundle with pnpm -F @carol/client export:web (Dockerfile ~line 79), which bakes app.json's expo.version into the bundle; the footer reads it at runtime via expo-constants. Unstamped → web bundle ships expo.version: 0.0.0.

The server /api/health (stamped via apps/api/package.json) and the Android APK (stamped via release-android.yml before prebuild) were already correct — only the web client surface was missed, and on web the footer shows just the client version.

Fix

Extend the "Stamp build version" step to also set apps/client/app.json expo.version before docker build (string only — versionCode is Android-only and handled by release-android.yml).

Verification

  • actionlint .forgejo/workflows/release.yml — clean
  • jq '.expo.version = "0.0.1-rc.16"' apps/client/app.json0.0.1-rc.16

Closes #291

🤖 Generated with Claude Code

Follow-up to #290. The `v0.0.1-rc.16` build still showed `Carol 0.0.0` in the web/PWA settings footer even though it included #290. ## Cause `release.yml`'s stamp step wrote the tag version into `apps/api/package.json` + root `package.json`, but not `apps/client/app.json`. The image builds the web client bundle with `pnpm -F @carol/client export:web` (Dockerfile ~line 79), which bakes `app.json`'s `expo.version` into the bundle; the footer reads it at runtime via `expo-constants`. Unstamped → web bundle ships `expo.version: 0.0.0`. The server `/api/health` (stamped via `apps/api/package.json`) and the Android APK (stamped via `release-android.yml` before prebuild) were already correct — only the **web client** surface was missed, and on web the footer shows just the client version. ## Fix Extend the "Stamp build version" step to also set `apps/client/app.json` `expo.version` before `docker build` (string only — `versionCode` is Android-only and handled by `release-android.yml`). ## Verification - `actionlint .forgejo/workflows/release.yml` — clean - `jq '.expo.version = "0.0.1-rc.16"' apps/client/app.json` → `0.0.1-rc.16` ✓ Closes #291 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ci): stamp app.json expo.version in the container build
Some checks failed
Commits / Conventional Commits (pull_request) Successful in 20s
PR / Static analysis (pull_request) Successful in 2m31s
PR / OSV-Scanner (pull_request) Successful in 18s
PR / Trivy (image) (pull_request) Successful in 22s
PR / OpenAPI (pull_request) Successful in 3m37s
PR / Package age policy (soft) (pull_request) Successful in 38s
PR / Client (web export smoke) (pull_request) Successful in 3m46s
PR / Lint (pull_request) Successful in 3m56s
PR / Typecheck (pull_request) Successful in 4m6s
Secrets / gitleaks (pull_request) Successful in 32s
PR / pnpm audit (pull_request) Successful in 3m58s
PR / Coverage (soft) (pull_request) Has been cancelled
PR / Test (sqlite) (pull_request) Has been cancelled
PR / Test (postgres) (pull_request) Has been cancelled
PR / Build (pull_request) Has been cancelled
2c1b484bf0
The web client bundle is built inside the image via
`pnpm -F @carol/client export:web`, which bakes app.json's expo.version
into the bundle; the settings footer reads it at runtime via
expo-constants. release.yml's stamp step only wrote package.json and
apps/api/package.json, so the web bundle kept expo.version 0.0.0 and the
web/PWA footer showed `Carol 0.0.0` even on a real release (e.g.
v0.0.1-rc.16). Stamp apps/client/app.json's expo.version too (string
only; versionCode is Android-only and handled by release-android.yml).

Closes #291

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(api): log app name and version at server startup
Some checks failed
Commits / Conventional Commits (pull_request) Successful in 8s
PR / OpenAPI (pull_request) Successful in 2m38s
PR / Static analysis (pull_request) Successful in 2m9s
PR / Lint (pull_request) Successful in 3m58s
PR / Client (web export smoke) (pull_request) Successful in 2m26s
PR / Typecheck (pull_request) Successful in 4m2s
PR / Build (pull_request) Successful in 2m44s
PR / Test (postgres) (pull_request) Failing after 2m44s
PR / Package age policy (soft) (pull_request) Successful in 20s
PR / OSV-Scanner (pull_request) Successful in 1m38s
PR / pnpm audit (pull_request) Successful in 2m40s
Secrets / gitleaks (pull_request) Successful in 26s
PR / Test (sqlite) (pull_request) Successful in 3m14s
PR / Trivy (image) (pull_request) Successful in 2m38s
PR / Coverage (soft) (pull_request) Successful in 1m40s
ec097742ed
Print `[startup] Carol <version>` once when the server boots, in the
existing Next.js instrumentation register() hook (Node runtime only,
before migrations). Reads the version from the build-stamped
package.json, the same source /api/health uses. Pairs with the version
stamping in this PR so operators see the running release in the log.

Part of #291

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

📊 Test coverage

Patch coverage: no testable lines changed.

Overall (app/, lib/, db/, excluding UI per ADR-0019):

Metric Value Soft target
Lines 81.6% ≥ 50%
Branches 72.8% ⚠️ ≥ 75%
Functions 91.1% informational

Soft thresholds per ADR-0019. Coverage is informational and does not block merge.

<!-- coverage-comment --> ## 📊 Test coverage **Patch coverage:** no testable lines changed. **Overall** (`app/`, `lib/`, `db/`, excluding UI per ADR-0019): | Metric | Value | Soft target | |---|---|---| | Lines | 81.6% ✅ | ≥ 50% | | Branches | 72.8% ⚠️ | ≥ 75% | | Functions | 91.1% | informational | Soft thresholds per [ADR-0019](docs/adr/0019-coverage-soft-targets.md). Coverage is informational and does not block merge.
james merged commit 1bebb8c5cb into main 2026-06-26 22:24:28 +00:00
james deleted branch 291-web-version-stamp 2026-06-26 22:24:28 +00:00
Sign in to join this conversation.
No description provided.