Skip to content

fix(engine): avoid Cloud migration ID collisions - #480

Open
miyaontherelay wants to merge 1 commit into
mainfrom
codex/cloud-compatible-engine-migration-sequence
Open

miyaontherelay wants to merge 1 commit into
mainfrom
codex/cloud-compatible-engine-migration-sequence

Conversation

@miyaontherelay

@miyaontherelay miyaontherelay commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move the unpublished engine migrations to 0065 and 0066, keeping Cloud's existing 0062–0064 migration IDs intact.
  • Update the migration tests and upgrade notes to use the reserved IDs.

Why

The Cloud Worker has already used IDs 0062–0064 for desktop and mobile tables. Publishing engine migrations at 0062 and 0063 would collide with that deployed migration history and fail the Cloud migration parity gate.

Validation

  • Engine suite: 108 files, 1,308 tests passed.
  • Migration tests: 13 passed.
  • Engine typecheck passed.
  • Published migration immutability check passed.
  • git diff --check passed.

Note

Low Risk
Documentation and test expectation updates plus migration file renames; no runtime or schema logic changes beyond avoiding duplicate migration IDs in hosted deployments.

Overview
Reserves engine migration IDs 0065 and 0066 for direct-DM idempotency and node rotation recovery so they no longer collide with Relaycast Cloud’s already-deployed 0062–0064 history (desktop/mobile tables). The migration SQL is unchanged; only filenames/IDs and references move.

Root and @relaycast/engine changelogs now tell hosts to apply 0065_direct_dm_idempotency.sql and 0066_node_rotation_recovery.sql before upgrade. compactMigrations.test.ts and taskMigration.test.ts expect the new names and migration sequence.

Reviewed by Cursor Bugbot for commit 3d6cc2f. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 759ae4e0-08d3-47b9-aa5b-abeb4cebcea3
📥 Commits

Reviewing files that changed from the base of the PR and between ae734dc and 3d6cc2f.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • packages/engine/CHANGELOG.md
  • packages/engine/src/db/__tests__/compactMigrations.test.ts
  • packages/engine/src/db/__tests__/taskMigration.test.ts
  • packages/engine/src/db/migrations/0065_direct_dm_idempotency.sql
  • packages/engine/src/db/migrations/0066_node_rotation_recovery.sql
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Re-trigger cubic

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