Skip to content

refactor(instance): remove ambient instance context#27811

Open
kitlangton wants to merge 2 commits into
devfrom
kit/delete-instance-local-context
Open

refactor(instance): remove ambient instance context#27811
kitlangton wants to merge 2 commits into
devfrom
kit/delete-instance-local-context

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

@kitlangton kitlangton commented May 16, 2026

Summary

  • Remove the legacy LocalContext export from project/instance-context.ts now that instance context is carried via InstanceRef.
  • Stop CLI bootstrap from installing unused instance ALS around callbacks.
  • Convert the affected workspace tests from the old Promise-style withInstance harness to it.instance, so tests use the same Effect instance fixture instead of ambient context.

Verification

  • bunx prettier --write packages/opencode/src/project/instance-context.ts packages/opencode/src/cli/bootstrap.ts packages/opencode/test/control-plane/workspace.test.ts
  • bun typecheck from packages/opencode
  • bun run test -- test/control-plane/workspace.test.ts from packages/opencode
  • bunx oxlint packages/opencode/src/project/instance-context.ts packages/opencode/src/cli/bootstrap.ts packages/opencode/test/control-plane/workspace.test.ts (0 errors; existing warnings in workspace.test.ts)
  • pre-push root bun turbo typecheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant