Skip to content

feat(server): detect OpenCode 1.x or 2.x per instance and route by it - #14239

Merged
juliusmarminge merged 4 commits into
t3code/codex-turn-mappingfrom
v2/oc2-1-runtime-probe
Oct 1, 2026
Merged

juliusmarminge merged 4 commits into
t3code/codex-turn-mappingfrom
v2/oc2-1-runtime-probe

refactor(server): import the OpenCode driver's Effect services as nam…

fa8d700
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Effect Service Conventions succeeded Sep 30, 2026 in 6m 39s

Effect Service Conventions: All clear

All clear

Details

Warning

  • Invalid effort level "max" in front matter. Fell back to "low". Valid values are: low, medium, high.

Note

Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.

Reviewed all 4 changed files (merge base moved)


🔍 Agent activity — 14 tool calls

💭 Inspecting for violations I need to check for any likely violations in the service dependencies, especially in selectOpenCodeRuntimeTextGeneration. It seems like there’s a deliberate composition of non-service wrappers, which is fine. Then, I’ll look into the makeOpenCodeRuntimeProbe function to see if it accepts an Effect probe callback strategy. I'm thinking about whether to probe Effect as a dependency and consider memoization as a generic utility strategy. I should inspect the relevant files too!

1. browse_code — apps/server/src/provider/Drivers/OpenCodeDriver.ts

2. browse_code — apps/server/src/provider/**/OpenCodeServerOwner.ts

💭 Analyzing error handling I'm noticing an issue with the probe. It seems like changing the .mapError is affecting the status, which is supposed to preserve detail. The OpenCodeRuntime.openCodeRuntimeErrorDetail should return cause.detail, but I see it hasn't been fixed. I need to take a closer look at how these changes interact and make sure error handling operates as expected. It’s all about keeping the details clear and functional!

3. browse_code — apps/server/src/provider/Drivers/OpenCodeDriver.ts

💭 Clarifying error handling I noticed that in line 161, I'm copying cause.detail instead of cause.message, but the instruction states to derive the message solely from attributes and not to include the detail field that repeats cause.message. It feels a bit unclear, but I think I can manage it by sticking to what the structured domain error indicates. Focus on getting this right is important to avoid confusion in handling errors consistently.

4. browse_code — apps/server/src/provider/Layers/OpenCodeProvider.ts

5. browse_code — In changed production files for OpenCode runtime probe, identify any new Effect service convention violations, especially whether OpenCodeRuntimeError detail in probe is derived from cause.message or arbitrary raw output, and whether service dependencies are injected as arguments instead of environment. Brief answer.

6. browse_code — Check changed line OpenCodeDriver.ts:161 constructing TextGenerationError with detail: cause.detail. Is cause.detail reliably bounded and safe for all probe paths or can it be arbitrary? Inspect OpenCodeRuntimeError and probe paths. Concise.

7. browse_code — Reconsider actual reachable cause at OpenCodeDriver.ts:161: onOpenCodeV1 swallows probe failures and constructs openCode2Unsupported only for v2. Is arbitrary command detail reachable at this exact site?

8. browse_code — At OpenCodeProvider.ts:450 new mapping openCodeRuntimeErrorDetail(cause) into OpenCodeProbeError.detail: is this new unsafe exposure for binary runOpenCodeCommand failure or preexisting equivalent code? Compare with supplied diff.

9. browse_code — Any other clear new violations of customer's Effect service conventions in changed non-test TS? Focus no false positives, list only concrete.

10. browse_code — No need. Thanks.

11. browse_code — Does checkOpenCodeProviderStatus taking probeRuntime Effect parameter violate deliberate callback strategy exception? This is memoized per-instance effect passed from driver; consider whether re-acquiring via environment is possible without losing shared cache. Brief.

12. browse_code — Done.

13. browse_code — Nothing further.

14. browse_code — Stop.


Agent Credits: 34 credits

Token usage: 117 uncached input · 629,133 cache-read input · 59,542 cache-write input · 4,125 output
Agent Credits may also include non-token charges from external tools such as web research.