Skip to content

config: ship the first migration, which exercises the chain end to end - #6

Draft
bdchatham wants to merge 1 commit into
plt-775-05-upstreamfrom
plt-775-06-migration
Draft

bdchatham wants to merge 1 commit into
plt-775-05-upstreamfrom
plt-775-06-migration

Conversation

@bdchatham

Copy link
Copy Markdown
Owner

Runs the machinery end to end. The rewrites existed and nothing had run one.

This appends the first migration, raises the schema version to 2 in the same change, and records what the
step does to its own fixture, which is what freezes it.

It renames the state-commit write mode cosmos_only to memiavl_only. The two names describe the same
routing: releases before v6.6 used the first and this one uses the second, and the reader has translated
the old name on every start since. Moving the file once is what lets a node stop depending on that
translation.

The reader keeps accepting the old name, and has to. Nothing migrates app.toml, so a node still reading
its settings from there depends on it. This migration moves sei.toml and changes no reader.

Five tests cover the chain this binary actually carries rather than one built for a test, because that is
the only chain that runs on a node. A file an operator wrote is upgraded in place: the value moves, the
version moves, the release that moved it is recorded, the operator's comment survives, an unrelated setting
in the same section survives, and the step reports exactly one key changed. A file already holding the
current spelling moves version and reports nothing changed, which is most of a fleet. A file that never
wrote the key gains nothing. Running the upgrade twice leaves the file byte-identical. A preview writes
nothing.

The sixth is the one the migration exists for. Every other test stops at the file. This upgrades a file,
boots with it, and asks the reader that consumes the key what it got: a migration whose result does not
reach the reader has moved a file and nothing else.

The rewrites existed and nothing had run one. This appends the first migration, raises
the schema version to 2 in the same change, and records what the step does to its own
fixture, which is what freezes it.

It renames the state-commit write mode cosmos_only to memiavl_only. The two names
describe the same routing: releases before v6.6 used the first and this one uses the
second, and the reader has translated the old name on every start since. Moving the file
once is what lets a node stop depending on that translation.

The reader keeps accepting the old name, and has to. Nothing migrates app.toml, so a node
still reading its settings from there depends on it. This migration moves sei.toml and
changes no reader.

Five tests cover the chain this binary actually carries rather than one built for a test,
because that is the only chain that runs on a node. A file an operator wrote is upgraded
in place: the value moves, the version moves, the release that moved it is recorded, the
operator's comment survives, an unrelated setting in the same section survives, and the
step reports exactly one key changed. A file already holding the current spelling moves to
the new version and reports nothing changed, which is most of a fleet. A file that never
wrote the key gains nothing. Running the upgrade twice leaves the file byte-identical. A
preview writes nothing and reports the step a real run performs.

The sixth is the one the migration exists for. Every other test stops at the file. This
upgrades a file, boots with it, and asks the reader that consumes the key what it got: a
migration whose result does not reach the reader has moved a file and nothing else.

Two mutations. Editing the shipped migration to transform differently is caught three
ways, including by the recorded result, which is what stops a change that would leave two
nodes agreeing on their version and disagreeing on their contents. Not raising the schema
version with it is caught.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bdchatham
bdchatham force-pushed the plt-775-06-migration branch from f5d863d to c3e7948 Compare August 17, 2026 17:33
@bdchatham
bdchatham force-pushed the plt-775-05-upstream branch from c2f6507 to 3109251 Compare August 17, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant