Skip to content

Comments

Add statSessionFile helper for OpenCode DB virtual paths#284

Merged
rajbos merged 2 commits intomainfrom
cloud
Feb 22, 2026
Merged

Add statSessionFile helper for OpenCode DB virtual paths#284
rajbos merged 2 commits intomainfrom
cloud

Conversation

@rajbos
Copy link
Owner

@rajbos rajbos commented Feb 22, 2026

This pull request introduces a new dependency, statSessionFile, to the backend and sync service layers, enabling support for virtual file systems (such as OpenCode DB) by allowing custom file stat implementations. The change replaces direct calls to fs.promises.stat with this injected helper, improving flexibility and testability. All relevant tests and backend initializations are updated to provide the new dependency.

Backend and Service Layer Enhancements:

  • Added a new required dependency, statSessionFile, to the BackendFacadeDeps and SyncServiceDeps interfaces, allowing custom file stat implementations for session files. [1] [2]
  • Updated BackendFacade and SyncService to use the injected statSessionFile helper instead of direct fs.promises.stat calls, supporting virtual file system scenarios. [1] [2] [3]

Extension and Test Integration:

  • Modified the VS Code extension activation to inject statSessionFile from the tokenTracker, ensuring the backend receives the correct implementation.
  • Updated all backend-related tests and test helpers to provide a statSessionFile implementation, ensuring compatibility and correctness in test environments. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

@rajbos rajbos enabled auto-merge February 22, 2026 22:46
@rajbos rajbos merged commit d6f3e1d into main Feb 22, 2026
12 checks passed
@rajbos rajbos deleted the cloud branch February 22, 2026 22:47
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.

1 participant