Uh oh!
There was an error while loading. Please reload this page.
fix(snapshot): migrate objects from pre-v1.3.3 flat snapshot layout - #19441
fix(snapshot): migrate objects from pre-v1.3.3 flat snapshot layout#19441criticalcognition wants to merge 3 commits into
Conversation
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
rekram1-node
commented
May 15, 2026
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#19437
Type of change
What does this PR do?
PR #19163 changed the snapshot gitdir from
<data>/snapshot/<projectID>/to<data>/snapshot/<projectID>/<Hash.fast(worktree)>/but didn't migrate existing objects. Sessions created before v1.3.3 have step-start/step-finish hashes pointing at tree objects in the old directory. WhendiffFull()tries to diff across those hashes, git returnsfatal: bad objectand the Review tab shows nothing.This PR sets up a
git alternatesfile when both old and new snapshot repos exist, allowing git to read objects from the old location transparently. The migration runs once during snapshot service initialization and is safe (errors are caught silently).Note for users: Sessions affected by this bug will automatically work after this fix is deployed. The Review tab may appear empty initially due to cached
summary_files=0in the database. This will self-heal when:No manual intervention or data migration is required.
How did you verify your code works?
git diffbetween old and new snapshot hashesScreenshots / recordings
N/A — backend-only change, no UI modifications.
Checklist