Skip to content

fix: restore Git sessions on link and pull - #83

Merged
iHildy merged 2 commits into
mainfrom
ian/verify-issue-51
Sep 23, 2026
Merged

iHildy merged 2 commits into
mainfrom
ian/verify-issue-51

Conversation

@iHildy

@iHildy iHildy commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes issue #51.

  • /sync-link first copies the synced config with a temporary session-disabled plan. It now rebuilds the session plan from that config and restores the repository's SQLite database and legacy session artifacts after the private-remote check.
  • An explicit /sync-pull now reapplies Git session artifacts even when the remote branch has no new commit. It leaves unrelated local config alone and tells the user to restart OpenCode.
  • A successful restore updates /sync-status's last pull time without changing the last remote update time.
  • Document that this pull replaces local session artifacts with the repository snapshot.

Reproduction and verification

The regression uses a local bare Git remote and two isolated homes with a real SQLite session row. Before the fix, the linked machine had no opencode.db. After the fix, it can read the session after link and again after an up-to-date pull. The test also checks that a remote without privacy acknowledgement cannot copy the database, and that /sync-status records the successful pull.

  • bun run check passed.
  • bun test passed, 197 tests.
  • bun run test passed, 197 tests under the pre-commit Vitest runner.
  • bun run build passed.
  • The full GitHub/OpenCode E2E stopped before session sync because the default model rejected API use; a retry using another external model was blocked by automatic approval review. The local Git and SQLite flow above covers the changed behavior without an external model.

@iHildy
iHildy merged commit c475c61 into main Sep 23, 2026
7 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.

Synced sessions not available on second machine

1 participant