Skip to content

fix: v0.3.0 post-release — upgrade crash, install banner, upgrade detection#161

Merged
anandgupta42 merged 6 commits intomainfrom
fix/v030-post-release-issues
Mar 15, 2026
Merged

fix: v0.3.0 post-release — upgrade crash, install banner, upgrade detection#161
anandgupta42 merged 6 commits intomainfrom
fix/v030-post-release-issues

Conversation

@anandgupta42
Copy link
Contributor

What does this PR do?

Fixes critical post-release issues discovered during v0.3.0 user testing:

  1. DB migration crash on upgrade — Existing users upgrading from v0.2.x crash with CREATE TABLE project error. Root cause: Drizzle ORM beta.16 matches applied migrations by name field, but old DBs have NULL names, causing all 9 migrations to re-run against existing tables. Fix: backfillMigrationNames() runs before migrate(), matching old entries by timestamp and filling in correct names.

  2. Install banner invisible — npm v7+ silences postinstall stdout. Fix: use process.stderr.write().

  3. Changelog dump on startup — Full 30-line changelog displayed on every first CLI run. Fix: removed from showWelcomeBannerIfNeeded() since postinstall handles the notification.

  4. altimate upgrade completely brokenmethod() checked for opencode-ai in npm list (returns "unknown"), latest() fetched upstream OpenCode v1.2.26 instead of altimate-code, brew detection used wrong formula name. Fix: all references updated to @altimateai/altimate-code / altimate-code.

  5. Homebrew tap stuck at 0.1.4HOMEBREW_TAP_TOKEN secret expired. Fix: manually pushed formula update to v0.3.0 with correct SHA256 hashes.

  6. Upstream merge protection — Added altimate_change markers to all modified upstream-shared files (db.ts, installation/index.ts). Added db.ts to required marker files list. Added 5 branding guard tests to catch future regressions.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Issue for this PR

Closes #160

How did you verify your code works?

  • Verified backfill against real v0.2.x opencode.db — 6 entries backfilled, 3 new migrations applied successfully
  • Full test suite: 2391 pass, 0 fail
  • New tests: 18 tests across 3 files (8 E2E install, 5 migration backfill, 5 branding guard)
  • Tested fresh npm install (clean DB) — works
  • Tested upgrade path (existing DB with NULL names) — works after fix, crashes without fix (documented in test)
  • Verified Homebrew tap updated to v0.3.0 on remote

Checklist

  • My code follows the code style of this project
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes
  • I have added altimate_change markers for upstream-shared files

🤖 Generated with Claude Code

…ection

- Backfill NULL migration names in `__drizzle_migrations` before Drizzle
  `migrate()` runs. Drizzle beta.16 matches by `name` field; old DBs from
  v0.2.x have NULL names causing all migrations to re-run and crash on
  `CREATE TABLE project` (table already exists).

- Move postinstall `printWelcome()` from `console.log` to
  `process.stderr.write` so the banner is visible under npm v7+ (which
  silences postinstall stdout).

- Remove changelog dump from `showWelcomeBannerIfNeeded()` — the
  postinstall banner now handles the install notification.

- Fix `method()` package detection: `opencode-ai` → `@altimateai/altimate-code`,
  brew formula `opencode` → `altimate-code`.

- Fix `latest()` npm registry URL and brew formulae URL to use
  `@altimateai/altimate-code` and `altimate-code.json`.

- Fix `getBrewFormula()` to reference `AltimateAI/tap/altimate-code`.

- Add `altimate_change` markers to all modified upstream-shared files.

- Add `db.ts` to required marker files in upstream-merge-guard test.

- Add 5 branding guard tests for installation detection, brew formula,
  npm registry URL, and `getBrewFormula()`.

- Add 8 E2E install tests covering new user (clean DB) and existing user
  (v0.2.x upgrade) scenarios, including backfill correctness,
  idempotency, and edge cases.

- Add 5 unit tests for migration name backfill logic.

Closes #160
Address code review finding: `includes("altimate")` could match
unrelated packages. Narrowed to `includes("altimate-code")`.
The previous commit removed the entire banner display, leaving
`showWelcomeBannerIfNeeded()` as dead code. Brew and curl install
users don't run postinstall.mjs, so they'd never see any feedback.

Restore a single-line "installed successfully!" message on stderr.
The verbose changelog dump remains removed — only the postinstall
box shows the full get-started hints.

Addresses review feedback from GPT 5.2 Codex, GLM-5, MiniMax M2.5.
Update to @altimateai/altimate-code-plugin to match the rebranded
npm package name.
Update 7 occurrences in memory-tools.md to use the rebranded
project config directory name.
Add a `changes` job using dorny/paths-filter to detect which areas
of the codebase were modified. Jobs now skip when their paths are
unaffected:

- TypeScript tests: only on packages/opencode/**, bun.lock, etc.
- Python tests (3 matrix jobs): only on packages/altimate-engine/**
- Lint: only on packages/altimate-engine/src/**
- Marker Guard: always runs on PRs (unchanged)

Push to main always runs all jobs (safety net).

For a docs-only or CI-config-only change, this skips ~4 minutes of
unnecessary TypeScript + Python test runs.
@anandgupta42 anandgupta42 merged commit 8653003 into main Mar 15, 2026
7 checks passed
anandgupta42 added a commit that referenced this pull request Mar 17, 2026
…ection (#161)

* fix: v0.3.0 post-release — upgrade crash, install banner, upgrade detection

- Backfill NULL migration names in `__drizzle_migrations` before Drizzle
  `migrate()` runs. Drizzle beta.16 matches by `name` field; old DBs from
  v0.2.x have NULL names causing all migrations to re-run and crash on
  `CREATE TABLE project` (table already exists).

- Move postinstall `printWelcome()` from `console.log` to
  `process.stderr.write` so the banner is visible under npm v7+ (which
  silences postinstall stdout).

- Remove changelog dump from `showWelcomeBannerIfNeeded()` — the
  postinstall banner now handles the install notification.

- Fix `method()` package detection: `opencode-ai` → `@altimateai/altimate-code`,
  brew formula `opencode` → `altimate-code`.

- Fix `latest()` npm registry URL and brew formulae URL to use
  `@altimateai/altimate-code` and `altimate-code.json`.

- Fix `getBrewFormula()` to reference `AltimateAI/tap/altimate-code`.

- Add `altimate_change` markers to all modified upstream-shared files.

- Add `db.ts` to required marker files in upstream-merge-guard test.

- Add 5 branding guard tests for installation detection, brew formula,
  npm registry URL, and `getBrewFormula()`.

- Add 8 E2E install tests covering new user (clean DB) and existing user
  (v0.2.x upgrade) scenarios, including backfill correctness,
  idempotency, and edge cases.

- Add 5 unit tests for migration name backfill logic.

Closes #160

* fix: use precise `altimate-code` match in `getBrewFormula()`

Address code review finding: `includes("altimate")` could match
unrelated packages. Narrowed to `includes("altimate-code")`.

* fix: restore brief upgrade banner in `welcome.ts`

The previous commit removed the entire banner display, leaving
`showWelcomeBannerIfNeeded()` as dead code. Brew and curl install
users don't run postinstall.mjs, so they'd never see any feedback.

Restore a single-line "installed successfully!" message on stderr.
The verbose changelog dump remains removed — only the postinstall
box shows the full get-started hints.

Addresses review feedback from GPT 5.2 Codex, GLM-5, MiniMax M2.5.

* docs: fix stale @opencode-ai/plugin reference in CONTRIBUTING.md

Update to @altimateai/altimate-code-plugin to match the rebranded
npm package name.

* docs: fix .opencode/memory/ references to .altimate-code/memory/

Update 7 occurrences in memory-tools.md to use the rebranded
project config directory name.

* ci: skip unaffected jobs using path-based change detection

Add a `changes` job using dorny/paths-filter to detect which areas
of the codebase were modified. Jobs now skip when their paths are
unaffected:

- TypeScript tests: only on packages/opencode/**, bun.lock, etc.
- Python tests (3 matrix jobs): only on packages/altimate-engine/**
- Lint: only on packages/altimate-engine/src/**
- Marker Guard: always runs on PRs (unchanged)

Push to main always runs all jobs (safety net).

For a docs-only or CI-config-only change, this skips ~4 minutes of
unnecessary TypeScript + Python test runs.
@anandgupta42 anandgupta42 deleted the fix/v030-post-release-issues branch March 17, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: v0.3.0 post-release issues — upgrade crash, install banner, upgrade detection

1 participant