Repository navigation
refactor(hub)!: delete hub-api-client and migration-runner; the hub applies package migrations itself (CL-8325) - #837
Merged
Conversation
…need a runner Each package's migration is a single CREATE-SCHEMA-IF-NOT-EXISTS plus IF-NOT-EXISTS SQL block run inside a pg_advisory_xact_lock-guarded transaction, so no ledger table (and no shared @corbits/migration-runner) is needed to know what has already run.
apps/hub/src/migrate.ts runs @intx/db's platform migrations, then cron/webhook-triggers/mailbox/artifacts/memory's own migrations, once before createHubServer mounts anything. scripts/db-setup.ts shrinks to creating the database if missing and calling that same function; scripts/dev.ts's report shrinks to match. apps/hub no longer depends on @corbits/hub-api-client, which it never actually imported.
… doc Deletes docs/package-migrations.md now that the migration shape it described (ledger tables, an explicit apply order in scripts/db-setup.ts) is gone; the remaining rule is one sentence in AGENTS.md, ARCHITECTURE.md, CONTRIBUTING.md, and IMPLEMENTATION.md.
@corbits/connections and @corbits/evals were the only consumers of @corbits/hub-api-client besides scripts/publish-tools.ts, and both are gone from main now. Deletes the package, its now-orphaned CLI script and package.json script entry, and the tsconfig.build.json/README references to it. @corbits/tool-registry-publish already declared its own structurally-compatible ApiCall type rather than importing hub-api-client's.
TheGreatAxios
force-pushed
the
cl-8325-hub-migrations
branch
from
September 18, 2026 01:08
8bdf29f to
464b0d3
Compare
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.
Summary
apps/hub/src/migrate.ts):@intx/db's platform migrations, then@corbits/cron,@corbits/webhook-triggers,@corbits/mailbox,@corbits/artifacts, and@corbits/memory's own migrations — one process doing the work directly, like upstream Interchange.@corbits/migration-runneris deleted. Cron, webhook-triggers, and evals now each ship a single idempotent SQL block (CREATE SCHEMA IF NOT EXISTS+IF NOT EXISTSthroughout) applied inside apg_advisory_xact_lock-guarded transaction — no ledger table needed.scripts/db-setup.tsshrinks to: create the database if missing, then call the hub'smigrateHub.scripts/reset.tsandscripts/dev.tskeep working against the smaller surface.@corbits/hub-api-clientis not deleted:packages/connections(a large, active consumer — being deleted separately in CL-8327) still depends on it throughout. Per the ruling, it's left in place but no longer a dependency ofapps/hub(which never actually imported it —packages/tool-registry-publishalready declares its own structurally-compatibleApiCalltype instead of importing@corbits/hub-api-client's).docs/package-migrations.mdis deleted; the convention it described is now one sentence each in AGENTS.md, ARCHITECTURE.md, CONTRIBUTING.md, and IMPLEMENTATION.md.tsconfig.build.jsonedited by hand to drop themigration-runnerreference.Test plan
bun run typecheckbun run lintbun run fmtbun test apps/hub packages/cron packages/webhook-triggers packages/tool-registry-publish packages/evals— all non-DB-gated tests pass (286 pass, 30 skipped for no local Postgres)compose.test.yml) should be run in CI.