small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo

feat(migrations): refuse a home a newer build upgraded past this one

An older daemon started on a home a newer one upgraded had no defined behaviour: nothing recorded what the home was upgraded to, and old code could misread data a newer migration moved or rewrote. Every migration now declares a migration.Compatibility. Additive ones (a new table, index, or defaulted column, or a backfill of one) record nothing and never block a rollback. A breaking one records its name in breaking_migrations before it writes: core steps and extension data migrations in their own commit first, extension schema migrations in the same savepoint as their change. The SDK's SchemaMigration and DataMigration gain a name and a compatibility, and migration_names lists an install's declared names. server.main reads that record after the home lock and before anything opens storage. A recorded name this build does not declare (core, kernel, retired core, or any declared extension's) makes it print "This home was upgraded by a newer albedo (<names>); update albedo or restore a backup." and halt with status 78, which the CLI shows from the startup log. Breaking today: image_store, session_prompts, pending_inputs_inbox, cell_images, and coding_lcm_name. Every migration runs at each startup, so the first build with the record backfills it for homes upgraded earlier. Builds from before the record do not check it. Core migrations become a list of named steps, and startup reports every step's rewritten rows as "migration <name>: <rows> rows".


Author aly.codes
Date Commit Parent 45eca2ef