GeezerVison is showing github.com — refactor(effect): move read tool onto defineEffect by kitlangton · Pull Request #21016 · anomalyco/opencode
Conversation
kitlangton
commented
Apr 4, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- move the read tool onto
Tool.defineEffect(...) and close over the real services it depends on
- rewrite the read tool tests to use the Effect test harness and real instance-scoped services
- follow up with the simpler single-bridge pattern, scoped LSP warmup, and cleaner test helpers
Validation
bun typecheck
bun run test test/tool/read.test.ts
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Yield AppFileSystem, Instruction, LSP, and FileTime from the read tool effect so the tool closes over real services instead of static facades. Rewrite read tool tests to use the effect test harness and document the migration pattern for effectified tools.
Move the read tool body onto a named Effect path and keep a single Promise bridge at execute(). This keeps the service graph wiring from the previous commit while reducing runPromise islands inside the tool implementation.
Keep LSP warmup off the read critical path and use AppFileSystem helpers directly in the read tool. Update the migration note to describe the single-bridge pattern that the tool now follows.
Reduce helper indirection in the read tool tests by adding a scope-local run helper, reusing a shared permission capture helper, and keeping env-permission assertions inside a single instance scope.
Capture Scope.Scope in the read tool effect and fork LSP warmup into that scope instead of using runFork inside Effect.sync. This keeps the fire-and-forget behavior while matching the surrounding Effect patterns.
Move the repaired Windows path normalization and not-found handling back behind AppFileSystem helpers so the read tool stays on the service abstraction end-to-end. Keep external-directory checks on the same path helper family for consistency.
Update the effect migration checklist now that the read tool has moved onto Tool.defineEffect and its tests/use-sites have been rewritten around the effectful tool shape.
Uh oh!
There was an error while loading. Please reload this page.
Rwanbt
pushed a commit
to Rwanbt/unifia
that referenced
this pull request
May 5, 2026
AIALRA-0
pushed a commit
to AIALRA-0/opencode-turn-engine
that referenced
this pull request
Jun 10, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|