replace remaining internal Git.run(...) facade hops in FileWatcher, Storage migrations, and File with direct Git.Service usage
keep the new git requirements at the correct composition boundary by updating the affected default layers and manual test layers
simplify File's internal git usage with a small local gitText helper and by reusing git.show(...) for original file content
Notes
file/index.ts was the trickiest file in this sweep because its old Effect.promise(async () => ...) blocks mixed git subprocess calls with non-git file-content work. The fix was to pull only the git subprocess pieces into Git.Service while leaving the rest of the file-content logic unchanged.
I reviewed the diff for simplification after the first pass. I kept the worthwhile local cleanups, but did not broaden this PR into larger reuse changes like switching storage migration identity logic over to Project or changing file status behavior more aggressively.
Testing
bun typecheck
bun turbo typecheck
bun run test -- test/storage/storage.test.ts test/file/watcher.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Notes
Testing