[PR #526] Add OpenCode sqlite transcript parsing with legacy fallback #538

Closed
opened 2026-03-02 04:13:55 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/526

State: closed
Merged: Yes


Summary

  • Update OpenCode integration to read transcripts from opencode.db first (v1.2.0+ storage layout).
  • Preserve backward compatibility by falling back to legacy file storage (storage/message + storage/part) when sqlite is unavailable or has no rows for the session.
  • Support existing test overrides by accepting either an OpenCode root path, legacy storage path, or a direct opencode.db path.

Tests and fixtures

  • Add sqlite fixtures under tests/fixtures/opencode-sqlite and tests/fixtures/opencode-sqlite-empty.
  • Add regression tests covering:
    • sqlite transcript parsing
    • sqlite precedence over legacy storage when both are present
    • fallback to legacy storage when sqlite is empty

Verification

  • cargo test --test opencode

Closes #442

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/526 **State:** closed **Merged:** Yes --- ## Summary - Update OpenCode integration to read transcripts from `opencode.db` first (v1.2.0+ storage layout). - Preserve backward compatibility by falling back to legacy file storage (`storage/message` + `storage/part`) when sqlite is unavailable or has no rows for the session. - Support existing test overrides by accepting either an OpenCode root path, legacy storage path, or a direct `opencode.db` path. ## Tests and fixtures - Add sqlite fixtures under `tests/fixtures/opencode-sqlite` and `tests/fixtures/opencode-sqlite-empty`. - Add regression tests covering: - sqlite transcript parsing - sqlite precedence over legacy storage when both are present - fallback to legacy storage when sqlite is empty ## Verification - `cargo test --test opencode` Closes #442
kerem 2026-03-02 04:13:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#538
No description provided.