Skip to content

spec 017: the canary migrates the catalog; the heartbeat says what each node is - #18

Merged
VGSML merged 1 commit into
mainfrom
017-catalog-migrate
Oct 22, 2026
Merged

VGSML merged 1 commit into
mainfrom
017-catalog-migrate

Conversation

@VGSML

@VGSML VGSML commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

The node's side of hugr-platform spec 008 (upgrades, accepted 2026-10-21).

  • catalog.migrate in the bootstrap document (version 2, optional, a boolean). A node told so runs acl_migrate_catalog at step 5, after attaching the catalog and before acl_use_db, when the catalog has its schema.
    • Without the flag a node never migrates. A new build on an older catalog stops at step 5 with acl's "migrate it first", as before.
    • acl's migration is one transaction, and a catalog already at the build's version answers "already". A restarted canary therefore runs it again harmlessly.
  • The heartbeat adds three fields:
    • duckdb_version: the release, which names the repository's channel;
    • platform;
    • catalog: the state as this build judges it (acl_catalog_schema(), read by field name), plus its type and the extension installed from the repository for it.
      An operator of an older pin ignores them.
  • Step 5's schema check now runs only when it decides something (the first policy or the flag), since the listing walks every attached catalog.

Tests

  • sqllogictest: the plan with and without the flag, and a non-boolean value refused.
  • test/e2e/bootstrap/run.sh, green locally twice: the catalog is stamped one schema version back.
    • A node without the flag stops at step 5 and changes nothing.
    • A node with the flag migrates the catalog, serves, and its heartbeat carries the release, the platform and the catalog's state at the build's version.

Spec: specs/017-catalog-migrate/spec.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LdLs2iBQygBKtsApdH9Sxi

…t each node is

hugr-platform spec 008's node side.
- The bootstrap document's catalog.migrate (version 2, optional, a boolean): a node told
  so runs acl_migrate_catalog at step 5, after attaching the catalog and before opening
  it, when the catalog has its schema. Without the flag a node never migrates, and a new
  build on an older catalog stops at step 5 with acl's "migrate it first".
- The heartbeat adds duckdb_version (the release that names the repository's channel),
  platform, and catalog: the state as this build judges it (acl_catalog_schema(), by
  field name), its type, and the extension installed from the repository for it.
- The schema check at step 5 is read only when it decides something (the first policy or
  the flag): the listing walks every attached catalog.

Tests: the plan with and without the flag and a non-boolean refused (sqllogictest); the
bootstrap e2e stamps the catalog one schema version back and starts a node without the
flag (stops at step 5, nothing changed) and with it (migrates, serves, its heartbeat
carries the release, the platform and the catalog's state).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LdLs2iBQygBKtsApdH9Sxi
@VGSML
VGSML merged commit 2c15640 into main Oct 22, 2026
5 checks passed
@VGSML
VGSML deleted the 017-catalog-migrate branch October 22, 2026 05:32
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