fix: v0.3.0 post-release — upgrade crash, install banner, upgrade detection#161
Merged
anandgupta42 merged 6 commits intomainfrom Mar 15, 2026
Merged
fix: v0.3.0 post-release — upgrade crash, install banner, upgrade detection#161anandgupta42 merged 6 commits intomainfrom
anandgupta42 merged 6 commits intomainfrom
Conversation
…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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes critical post-release issues discovered during v0.3.0 user testing:
DB migration crash on upgrade — Existing users upgrading from v0.2.x crash with
CREATE TABLE projecterror. Root cause: Drizzle ORM beta.16 matches applied migrations bynamefield, but old DBs have NULL names, causing all 9 migrations to re-run against existing tables. Fix:backfillMigrationNames()runs beforemigrate(), matching old entries by timestamp and filling in correct names.Install banner invisible — npm v7+ silences postinstall
stdout. Fix: useprocess.stderr.write().Changelog dump on startup — Full 30-line changelog displayed on every first CLI run. Fix: removed from
showWelcomeBannerIfNeeded()since postinstall handles the notification.altimate upgradecompletely broken —method()checked foropencode-aiin 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.Homebrew tap stuck at 0.1.4 —
HOMEBREW_TAP_TOKENsecret expired. Fix: manually pushed formula update to v0.3.0 with correct SHA256 hashes.Upstream merge protection — Added
altimate_changemarkers to all modified upstream-shared files (db.ts,installation/index.ts). Addeddb.tsto required marker files list. Added 5 branding guard tests to catch future regressions.Type of change
Issue for this PR
Closes #160
How did you verify your code works?
opencode.db— 6 entries backfilled, 3 new migrations applied successfullyChecklist
altimate_changemarkers for upstream-shared files🤖 Generated with Claude Code