Repository navigation
fix(server): the update preflight refuses a database whose J5 ledgers a newer build migrated - #1076
Conversation
… a newer build migrated Upstream's service preflight only reads effect_sql_migrations, so a staged older build passed it when the database held J5-only migrations, which are common between J5 releases. The preflight now also checks j5_a2a_migrations and j5_run_observability_migrations (#518, FORK.md case 117). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
Before a background service moves to a staged build, upstream's service preflight refuses a database that records upstream migrations the build doesn't know. It reads only upstream's ledger. J5 keeps two more, and J5-only migrations are common between J5 releases:
v0.0.51andv0.0.52-nightly.20261029.12differ only in the J5 ledger (46 against 47). So the preflight let an older build onto a database it can't read.Part of #518 (step 1). Step 2,
updaterunning the preflight, waits for upstream.What changed
apps/server/src/j5/persistence/newerJ5Migrations.tsreadsj5_a2a_migrationsandj5_run_observability_migrationsread-only, as upstream'srecordedMigrationsdoes, and lists ids above this build's heads.runServicePreflightadds that list to upstream's with one call.The check runs inside the staged build, so it protects a downgrade only to builds that contain it. Builds before this one, including stable
v0.0.51, can't be checked. Covering those needs release metadata (#927).Live testing
Pass at
7d62485039. The head (209fdd5d48) is that commit rebased onto one docs-only commit (#1075), so it was not re-tested. Tester: GPT-6.1 Sol in its own worktree, test home fromsetup-agent-live-test.ts, then--fresh. All checks ran__service-preflightlive, against copies of a database a real server had migrated, with the server stopped:j5_a2a_migrations, inj5_run_observability_migrations, and in upstream's ledger. Each reason names the table and the migration.Not exercised live: the in-app server update that stages a release and runs this preflight, because exercising it would touch the machine's real background service. The unit test covers the hook through
runServicePreflight.Upstream impact
apps/server/src/cloud/servicePreflight.ts: one import and one call, recorded as FORK.md case 117. The ledger row now readsB, 50, 117.Council review
Rounds: 1
Opus's points:
No code changed after review.
Checklist
newerJ5Migrations.test.tsfails onj5/mainfor both ledgersFORK.md(case text and file-table row) in this PRj5 updateuntil step 2.Claude Opus 5.5 via Claude Code in J5 Code.
🤖 Generated with Claude Code