Skip to content

Repair legacy shell summary migrations#4143

Draft
salemkode wants to merge 1 commit into
pingdotgg:mainfrom
salemkode:agent/repair-legacy-migration-collision
Draft

Repair legacy shell summary migrations#4143
salemkode wants to merge 1 commit into
pingdotgg:mainfrom
salemkode:agent/repair-legacy-migration-collision

Conversation

@salemkode

@salemkode salemkode commented Jul 19, 2026

Copy link
Copy Markdown

What changed

  • Make migration 25 tolerate databases where pending_approval_count is not present yet.
  • Add migration 34 to re-run the idempotent shell-summary schema, backfill, and cleanup migrations.
  • Leave migration ID 33 retired because ProjectionThreadsSettled shipped in a nightly before it was reverted.
  • Add regression coverage for databases where legacy migrations already occupy IDs 23 and 24.

Why

Older nightly databases can record IDs 23 and 24 as ProjectionThreadsAssociatedWorktreeRef and ProjectionThreadsArchivedAt. The current migration registry reuses those IDs for the projection thread shell-summary migrations, so the migrator skips them and then migration 25 fails with no such column: pending_approval_count.

That backend failure causes the desktop process to continuously restart its child server without ever creating the main window. I reproduced this on macOS 27.0 arm64 with the current nightly.

Impact

Affected existing installations self-repair on their next startup without resetting user data. Fresh databases remain unchanged apart from recording migration 34.

Validation

  • Focused migration regression tests pass.
  • vp check passes with zero errors (only existing unrelated warnings).
  • vp run typecheck passes for all 15 packages.
  • vp run --filter t3 build succeeds.
  • A copy of the affected 126 MB database successfully ran migrations 25-32 and 34 with the rebuilt server.
  • The desktop app then opened on macOS 27.0 arm64 and rendered the existing projects and threads from that migrated database.

Note

Repair legacy shell summary migrations by adding migration 34

Macroscope summarized a659fb1.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: abf74f8c-06f0-4ba8-8038-1b58a3f764ac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant