Repository navigation
Conversation
Closes #178. The engine pin moves to 4.0.0.a8. Until now every pin move orphaned every database, because no 4.0 alpha ships upgradeImage. Grail now carries the upgrade (GemTalk/Grail#1866, `scripts/upgrade_engine.sh --in-place`), so a start that finds an a5 database upgrades it: - `ensureRunning` reads the extent's version with copydbf (once per window and extent), after shared memory and before the processes start. For a pair in `ENGINE_UPGRADES` (a5 -> a8), it asks, modally, naming the backup. - It stops the stone and listener with the PREVIOUS engine, under the stone lock: after an extension update the old stone is usually still up, and a8's stopstone cannot log in to an a5 stone (4044, measured). It refuses to run the script while a stone is still listed. - It runs the bundled script with GEMSTONE = the new engine and GemDB's GEMSTONE_GLOBAL_DIR, under a temporary stone `gemdbupgrade`, and shows the script's latest `upgrade_engine: ` line as progress. - On success it forgets the Grail and MCP stamps, so the start goes on to install both again, and says where the backup is. On failure the script has restored the extent; GemDB checks the version copydbf reads, says whether it is back, points at the backup and the log, and does not start. - Auto-start and agents are not asked: they get a warning with an "Upgrade Database..." button that runs Start. The GemDB Shell's cold start meets the pre-start guard, which now says how to get the upgrade. The guard (`assertDatabaseMatchesEngine`) now sorts the database into matches / upgrade / older / newer / unknown. Older without a measured pair and unknown are refused as before; newer is refused without the advice to delete it. Setup lets an upgradable database through, since it touches none. New telemetry outcomes: upgradeNeeded, upgradeDeclined, upgradeFailed. bundle-grail.sh and check-vsix.sh now require scripts/upgrade_engine.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Temporarily the head of GemTalk/Grail PR #1867 (0c5e215), which carries scripts/upgrade_engine.sh --in-place and the install's repair of a Grail an engine upgrade has stripped. Move it to the merge commit once #1867 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…od fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The brain-freeze gate failed on #180 at 84850be: the upgrade's temporary stone ran with the product's key and defaults, took the 8192 MB default maximum, and refused GemDB's extent, which is pregrown to the key's 10240 MB. Grail's upgrade_engine.sh is gaining UPGRADE_ENGINE_STONE_CONFIG, the caller's own stone configuration. GemDB's stone reads two files, conf/system.conf (the cap, pregrow, the threshold) and then conf/gemdb.conf (KEYFILE, the page cache), and neither alone carries both the key and the cap. So the upgrade writes them, in that reading order, to db/log/upgrade-stone.conf (after ensureSpaceLimits, as a start would) and passes that. The integration test passed because it copied a bare 335 MB extent into an empty directory, so the script's stone never met a GemDB configuration. It now builds the database the way an earlier GemDB did: createDatabase's config, the previous engine's key, and the extent pregrown to 10240 MB by a stone of the previous engine on GemDB's config (GEMDB_TEST_UPGRADE_ENGINE). Against Grail 0c5e215, which ignores the variable, it now fails exactly as the gate did ("FAILED while starting stone gemdbupgrade"), with the extent restored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…config Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ab9de40
The brain-freeze gate now upgrades a5 -> a8 with its data identical, but the
web app's `import email.message` was refused ("EmailMessage changed its
bases (Message -> MIMEPart)"): Grail replaced its own email package with
CPython's after c8cbc92. Grail ab9de40 repairs such a base change on a class
with no stored instances in scripts/redeployModules.gs, which Grail's
install.sh runs and GemDB's install-grail.sh did not.
install-grail.sh now runs it last, after gemdb and unicodedata, as Grail's
install.sh does (same topaz settings), so those two are already current and
left alone. A failure is a warning, as in Grail: the modules it could not
rebuild stay stale and rebuild on their next import. Every
`redeployModules:` line goes to the log, so a failed module is named.
bundle-grail.sh and check-vsix.sh now require scripts/redeployModules.gs,
which inputs nothing else.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
This branch has not been deployed
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.
Closes #178.
The engine pin moves to 4.0.0.a8. A database GemStone 4.0.0.a5 wrote is now upgraded in place with Grail's
scripts/upgrade_engine.sh --in-place(GemTalk/Grail#1867), so users no longer have to delete it.How it behaves
ensureRunningchecks the extent withcopydbf -iafter the shared-memory step and before the processes start. It checks once per window and extent, not on every cell.ENGINE_UPGRADES, currently a5 → a8), when someone asked for the database (Start, a notebook cell, the Shell, Run or Debug File):db/data/extent0.dbf.pre-4.0.0.a5) and says that a failure restores it.stopstonecannot log in to an a5 stone (error 4044, measured). If a stone is still listed, GemDB does not run the script.GEMSTONEset to the new engine and GemDB'sGEMSTONE_GLOBAL_DIR, under a temporary stone namedgemdbupgrade. The latestupgrade_engine:line shows as progress, and the full output goes to the GemDB log.copydbfreads a8. It then removes the Grail and MCP stamps, so the start continues and reinstalls both without asking: the upgrade removed their compiled methods. A notification says where the backup is.prepareFiles) lets an upgradable database through, because setup touches no database.databaseStartedoutcomes:upgradeNeeded,upgradeDeclined,upgradeFailed, documented indocs/telemetry.md.The long comment on
assertDatabaseMatchesEngine, the CLAUDE.md section on engine upgrades,docs/automation-boundary.md(the upgrade is now under "Asked") and the CHANGELOG are updated.bundle-grail.shandcheck-vsix.shnow requirescripts/upgrade_engine.sh.Testing
npm test: 1316 passed. New coverage: version ordering and judging; the guard's messages; the upgrade steps against a fake world (declined, no disk room, stop order under the lock, never running the script while the stone is up, the restored and unconfirmed failure messages, a zero exit that the extent does not confirm); running the script itself (the arguments of the--in-placeinterface, and the reason taken from its last line); and howensureRunninghandles each trigger.src/__integration__/engineUpgrade.test.ts. It needsGEMDB_TEST_UPGRADE_EXTENT, an a5 extent, and skips without it. It runs the real script from the bundledgrail/on a copy, in the fixture's own global dir. 4 of 4 passed with the a8 engine and Grail at 5d0333f, on a GemDB-shaped database (createDatabase's config, the a5 key, extent pregrown to 10240 MB): a decline leaves the database alone; a failure (a wrong from-version) restores it byte-for-byte and leaves nothing running; the upgrade itself took 45s, after which the database reads a8, the backup equals the original, nothing is left running, and the stamps are gone.-N.resources/install-grail.shinstalled Grail 0c5e215 (exit 0), with "Recompiling 5826 Grail methods an engine upgrade removed".sum, a dict holding a tuple and None, and Unicodeupper().npm run test:integration. It needs the pinned engine under~/GemDB, which I did not touch.Remaining
PINNED_GRAIL_REFis Grail main, 29833cd (61d18f6): #1867 (the engine upgrade), #1888 (redeploy of dataclass defaults) and #1886 (compile()in anexcept SyntaxError:handler), all merged. The brain-freeze gate (ci/upgrade.sh: move a reader's GemDB to a new release and prove nothing was lost brain-freeze#101) reruns on this build..vsix. The new script carries no password literal, but the payload has not been scanned yet.🤖 Generated with Claude Code