Skip to content

fix: rollback risky legacy db merge flow#230

Merged
code-JDS merged 1 commit intoScience-Discovery:devfrom
lixfrank:fix/legacy-db-copy-rollback
Apr 9, 2026
Merged

fix: rollback risky legacy db merge flow#230
code-JDS merged 1 commit intoScience-Discovery:devfrom
lixfrank:fix/legacy-db-copy-rollback

Conversation

@lixfrank
Copy link
Copy Markdown
Collaborator

@lixfrank lixfrank commented Apr 9, 2026

Issue for this PR

Closes #229

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This rolls back the risky multi-database legacy merge path to a conservative copy-only flow. If aether-prod.db already exists we now do nothing; otherwise we copy the newest .db in the data directory to aether-prod.db and copy its .db-wal / .db-shm sidecars when present. The PR also removes the old agent-driven merge path, drops the unused merge-verification code and tests, and removes the success popup so startup stays quiet unless the copy fails.

How did you verify your code works?

  • PATH="/Users/lx/miniconda3/bin:/Users/lx/miniconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" bun typecheck in packages/opencode
  • PATH="/Users/lx/miniconda3/bin:/Users/lx/miniconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" bun test test/storage/legacy-db.test.ts in packages/opencode
  • Manual local validation of the rollback behavior

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Replace the multi-database merge path with a conservative latest-db copy so missing targets can be recovered without risking existing user data.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

The following comment was made by an LLM, it may be inaccurate:

This PR may overlap with existing open pull requests:

Please check whether this work should be consolidated.

@code-JDS code-JDS merged commit 671b29a into Science-Discovery:dev Apr 9, 2026
9 checks passed
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.

Legacy DB auto-merge can overwrite or lose user data

3 participants