Repository navigation
Effect Service Conventions: 2 findings
Structural Effect service conventions are satisfied in the changed scope (subpath namespace imports, unchanged Context.Service/make/layer shape, no ManagedRuntime/runPromise or fake Layer.succeed injection, no new error classes or catchTag usage). Two change-discipline findings were posted inline:
apps/desktop/src/backend/DesktopBackendManager.ts— newneverReadyAttemptcap andonPreflightFailedfallback for stdin-delivery (WSL) backends changes restart/fallback behavior with no accompanying test, despiteDesktopBackendManager.test.tsalready providingbootstrapDeliveryandonPreflightFailedharness support.apps/server/src/bootstrap.ts— moving the error listener from the raw stream to the readline interface (plus the newcleanup()calls in each handler) changes bootstrap read behavior with no test for a stream error arriving before the first line.
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 examined in scope: apps/desktop/src/backend/DesktopBackendManager.ts, apps/desktop/src/wsl/DesktopWslEnvironment.ts, apps/server/src/bootstrap.ts, plus existing suites apps/desktop/src/backend/DesktopBackendManager.test.ts, apps/desktop/src/wsl/DesktopWslEnvironment.test.ts, and apps/server/src/bootstrap.test.ts for coverage context.
Checks performed and passed:
- Imports: all Effect modules imported as namespaces from subpaths; local service modules referenced via namespace; no consolidated named imports from
"effect"introduced. - Service definition:
DesktopWslEnvironmentretains its inlineContext.Serviceinterface; no standalone shape types, no renamedmake/layerexports. - Dependency acquisition: services still acquired via
yield*from the environment insidemakeBackendInstance; no service-instance parameters, module globals,ManagedRuntime.make,runPromise, orrunPromiseExitintroduced. - Errors: no error classes added or modified; existing
Schema.TaggedErrorClassdefinitions with structural attributes andcauseare untouched; no newcatchTag/catchIfusage in changed lines (the pre-existingcatchTagindrainBackendOutputis outside the changed scope and was not flagged). - File layout: no service moves, no compatibility shims.
Note (not flagged, outside this check's scope): satisfiesSemverRange(nodeVersion, options.nodeEngineRange) in ensureNodePtyImpl no longer trims the range, whereas the previous code passed options.nodeEngineRange.trim().
🔍 Agent activity — 1 tool call
💭 Looking at the DesktopWslEnvironment changes and checking the convention rules around imports and error handling. The
I'm noticing a behavior change where the code now passes the untrimmedoptions.nodeEngineRangedirectly tosatisfiesSemverRangeinstead of trimming it first, though this seems like a minor implementation detail rather than a convention violation. Looking at the Effect service conventions, I need to check whether the error handling pattern at line 427 withcatchTagfor "BackendProcessOutputHandlingError" follows the expected conventions. However, that line isn't actually modified by this PR — the diff only touches specific lines like 317-321, 333, 458-461, and others, so thecatchTagusage there is retained legacy code outside the changed scope. The bootstrap.ts changes involve error listener registration and cleanup, but those error definitions usingSchema.TaggedErrorClassandSchema.Defect()aren't being altered. I'm also checking whether the new code in DesktopBackendManager properly structures error data when passing reason strings tospec.onPreflightFailed`. Looking at the diff, there aren't any violations of the Effect service convention—the changes are purely behavioral, affecting WSL exit handling, stream registration, and probe parsing. But I need to verify against the change discipline rule: since the bootstrap.ts readline error handling is being modified, this counts as a backend behavior change, which means I should be checking whether the PR includes focused tests for these modifications. I'm noticing a tension here—the PR introduced backend behavior changes like the never-ready cap, engine range validation, and probe script handling, which normally would require focused tests according to the Change discipline guidelines. But I'm uncertain whether these changes fall under the "Effect service conventions" check or if the reporting section has different requirements that might override this. The parseNodeVersion tests already existed before this PR, so that behavior is covered. But the DesktopBackendManager's never-ready cap doesn't have focused tests, and since this is a backend behavior change, I'm wondering if I should flag that as missing test coverage per the convention. I'm checking whether the code changes actually warrant new tests given the explicit requirement that backend behavior changes need focused test coverage. The existing test suite in DesktopBackendManager.test.ts already covers the preflight caps scenario, but I need to determine if that's sufficient or if the PR should have added something more specific to the changes made. The PR introduced a new code path for the never-ready cap in DesktopBackendManager.ts but didn't add corresponding tests, which violates the customer's requirement that backend behavior changes need focused test coverage. I'm considering whether to flag this with an inline comment requesting a test, though I want to be careful not to be overly noisy about it. Looking at the other changes—the bootstrapStream conditional, the Stream.never usage, comment blocks, and error handling—none of these constitute convention violations on their own. The missing test coverage is really the only substantive finding here, so if I'm going to fail the check, that's the basis for it. I'm leaning toward posting two focused comments: one on the DesktopBackendManager's never-ready behavior change and another on the bootstrap error listener modification, since both represent backend behavior shifts that warrant test coverage. The manager change is the more significant one, but the bootstrap change is also testable despite being small. I need to identify the exact line numbers for the inline comments—the manager block spans lines 897-932 and the bootstrap change is at lines 143-149. I'm considering whether to fail the check or not; the guidance says missing focused tests on behavior changes can warrant failure, so I'll mark it as a failure with a clear explanation rather than just a warning. Now I'll draft the first comment on the manager change, pointing out that the new restart cap logic modifies backend behavior but lacks test coverage, and suggesting a focused test case using the existing test harness that verifies the preflight failure handling works as intended. For the second comment on bootstrap.ts, I'm noting that moving the error listener changes how stream errors are handled during bootstrap, and the test suite doesn't cover the case where an error arrives before any data is read—I should recommend adding a test that emits a stream error and verifies the proper error response.
1. modify_pr — Effect service conventions: no violations found in imports, service definition, dependency acquisition, or error modeling. Two change-discipline findings: the behavior changes in DesktopBackendManager.ts and apps/server/src/bootstrap.ts land without focused tests, although both modules already have test suites with the needed harnesses.
Agent Credits: 109 credits