Skip to content

chore(scripts): remove obsolete one-shot data migrations#364

Merged
mgoldsborough merged 1 commit into
mainfrom
chore/remove-migration-scripts
Jun 3, 2026
Merged

chore(scripts): remove obsolete one-shot data migrations#364
mgoldsborough merged 1 commit into
mainfrom
chore/remove-migration-scripts

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

Why

All production tenants are now on the post-architecture-change runtime (personal-workspace unification → ws_user_<id>, conversations moved to top-level, identity-owned files/automations, user-scoped credential migration). The one-shot migration utilities have served their purpose — ipsdi and bayze were the last pre-migration tenants and are now upgraded — so they're dead weight.

What's removed

  • Scripts (9): migrate-personal-workspaces, migrate-conversations-to-top-level, migrate-user-creds-to-personal-workspace, migrate-files-to-identity, migrate-automations-to-identity, migrate-tenant-files, migrate-usage-shape, heal-truncated-personal-workspaces, cleanup-personal-workspace-members
  • Libs (3): scripts/lib/{migration-lock,resolve-workspace-owner,conversation-metadata}.ts — imported only by the above (verified: zero src/ imports)
  • Tests (12): the matching integration/unit tests + acquire-migration-lock fixture
  • package.json: the migrate:* / heal:* / cleanup:* script entries

Kept

  • scripts/check-*-paths.ts CI guards that enforce the new architecture (independent of the deleted libs)
  • A few historical doc-comments in src//tests still mention these scripts by name; left as-is (architecture history, no code impact)

Verification

  • bunx tsc --noEmit passes (no dangling imports)
  • grep confirms no remaining code references to the deleted files

All production tenants are now on the post-architecture-change runtime
(personal-workspace unification, conversations-to-top-level, identity-owned
files/automations, user-scoped creds), so the one-shot migration utilities
and their support libs are no longer needed.

Removes:
- scripts/migrate-{personal-workspaces,conversations-to-top-level,
  user-creds-to-personal-workspace,files-to-identity,automations-to-identity,
  tenant-files,usage-shape}.ts
- scripts/heal-truncated-personal-workspaces.ts
- scripts/cleanup-personal-workspace-members.ts
- scripts/lib/{migration-lock,resolve-workspace-owner,conversation-metadata}.ts
  (imported only by the above; no src/ references)
- their integration/unit tests + the acquire-migration-lock fixture
- the migrate:* / heal:* / cleanup:* package.json script entries

The check-*-paths.ts CI guards that enforce the new architecture are kept.
tsc --noEmit passes.
@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label Jun 3, 2026
@mgoldsborough mgoldsborough merged commit 5574efd into main Jun 3, 2026
5 checks passed
@mgoldsborough mgoldsborough deleted the chore/remove-migration-scripts branch June 3, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant