Repository navigation
Effect Service Conventions: 1 new finding, prior findings open
New finding (comment posted)
apps/server/src/provider/providerProbeTimeouts.ts(136-139):resolveProviderProbeCwdwraps theHostProcessWorkingDirectoryread inEffect.catch. That reference is aContext.Referencewith adefaultValue, so its error channel isneverand the recovery branch is dead code implying a failure mode that cannot occur. Read the reference directly.
Previously flagged, still open (not re-commented to avoid duplicates)
apps/server/src/provider/providerProbeTimeouts.ts:resolveProviderProbeCwdSync/isUsableProbeDirectoryperform blockingnode:fsI/O (statSync,accessSync,readdirSync) and defaultenvironmenttoprocess.env, even though every call site runs inside Effect withFileSystem.FileSystem/Path.PathandHostProcessEnvironmentavailable. These runtime dependencies remain hidden from the Effect environment.apps/server/src/provider/providerSnapshot.ts/Layers/CursorProvider.ts: backend probe behavior changed (stdin closed immediately after spawn, probes spawn with a resolved cwd) but the added tests only cover the pure timeout/cwd helpers. Focused assertions on spawnedcwdand stdin closure in the existing mock-spawner probe tests are still missing.
Items resolved since the earlier revisions: the DEFAULT_TIMEOUT_MS / AUTH_PROBE_TIMEOUT_MS re-export shims are gone, platform is now taken from HostProcessPlatform via Effect values at the probe sites, and the local VERSION_PROBE_TIMEOUT_MS alias in GrokProvider.ts was removed.
Details
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.
Files reviewed in scope: apps/server/src/provider/providerProbeTimeouts.ts, apps/server/src/provider/providerProbeTimeouts.test.ts, apps/server/src/provider/providerSnapshot.ts, apps/server/src/provider/Layers/{ClaudeProvider,CodexProvider,CursorProvider,GrokProvider}.ts, apps/server/src/provider/Layers/{CursorProvider,ProviderRegistry}.test.ts.
Checked and found acceptable: namespace subpath imports for effect/* modules; named imports from @t3tools/shared/hostProcess and ./providerProbeTimeouts.ts (pure helpers / config references, consistent with processRunner.ts); no new Layer.succeed, ManagedRuntime.make, or runPromise usage in service code (the Layer.succeed(ChildProcessSpawner...) in makeCursorAcpProbeRuntime is pre-existing and forwards an environment-acquired service); no error classes added or restructured; the ProviderRegistry.test.ts TestClock.adjust bump matches the new platform-aware auth probe bound.
🔍 Agent activity — 1 tool call
💭 I'm checking whether
resolveProviderProbeCwdSyncstill has the issue of defaulting toprocess.envinstead of using the FileSystem that's already available in the environment, and whether the blocking sync APIs were addressed in a previous commit or if they remain unchanged. Looking at the other conventions violations: namespace imports fromhostProcessaren't required since other parts of the codebase use named imports TheHostProcessWorkingDirectoryfunction wraps its error channel in a catch that will never actually trigger since the error type isnever, making it dead code that falsely suggests error handling is happening. It's a minor convention violation—the catch should only be used when there's a genuine error channel to handle. Looking at the prior violations that were flagged, I need to check whether the code changes made in response were sufficient or if issues remain unfixed. The first item aboutresolveProviderProbeCwdSynchad changes to add a working directory parameter and Effect form, but the FileSystem part of the violation still seems to be there. I'm spotting a potential issue withEffect.catchin theresolveProviderProbeCwdfunction — sinceHostProcessWorkingDirectoryis a Context.Reference with anevererror channel, usingEffect.catchthere is essentially dead code that implies error handling where none can actually occur. There's also the lingeringprocess.envdefault inresolveProviderProbeCwdSyncat line 103, which was flagged before as a module-global imperative dependency that should be modeled through the environment instead. Since the surrounding code changed with the newworkingDirectoryparameter but this default persists unchanged, I'm inclined not to repeat the earlier comment unless it's now the sole remaining issue worth highlighting. TheproviderProbeTimeouts.tsmodule mixes pure helpers with Effect values, which is fine, and usingEffect.fnwith an environment override parameter as a config option is also acceptable. The only genuinely new finding is the deadEffect.catchon a never-failing reference read—it's a minor cleanliness issue rather than a clear convention violation, so I'm leaning toward either posting a light suggestion or marking this as all clear depending on whether it rises to the check's threshold. I'm checking whetherEffect.catchactually exists in this version and if the HostProcessWorkingDirectory read could fail — it doesn't look like either applies here. The dead catch block isn't a real violation, and given the guidance against failing on optional style preferences, I should probably just declare this clean rather than post another comment. aining items are duplicates and the catch is minor. But the sync-fs/process.env issue is genuinely a retained convention violation in changed scope, and the check should reflect it in state even if I don't re-comment. Hmm — I could set failure state with summary noting the unresolved prior findings without posting duplicate comments. That's reasonable: the state reflects that violations remain. I'll post the one new comment (no-op Effect.catch) — actually is that valuable? Yes, moderately: it can be simplified and the fallback-to-undefined logic is misleading since default value always exists (process.cwd()), meaning working directory is always present. Also note: with the Reference default,HostProcessWorkingDirectoryyields process.cwd() anyway — so the "do not read process.cwd() here" comment is satisfied via the environment. Fine. Let me verify the line numbers for the comment in the diff. The file is new, so all lines are in diff. Lines 136-139. I'll post an inline comment suggesting simplification and set failure citing the retained sync-fs dependency issue plus this new finding. The sync-fs violation is concrete: the callers declareFileSystem.FileSystem | Path.Pathrequirements, but the new code bypasses that with direct Node.js file system calls inside Effect code — a clear violation of the dependency hiding principle.
1. modify_pr — One new item on the Effect-form cwd resolver; the earlier findings about resolveProviderProbeCwdSync doing blocking node:fs I/O and defaulting to process.env inside Effect call sites (which already carry FileSystem.FileSystem / HostProcessEnvironment) are still open — see previously posted comments rather than a repeat here.
Agent Credits: 73 credits