Repository navigation
[codex] Structure terminal adapter startup defects - #3425
Merged
Merged
MacroscopeApp / Macroscope - Effect Service Conventions
succeeded
Jun 20, 2026 in 1m 4s
Effect Service Conventions: All clear
All clear
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.
Reviewed the changed Effect service code in apps/server/src/terminal/BunPtyAdapter.ts, apps/server/src/terminal/NodePtyAdapter.ts and their test files against the configured conventions.
Findings:
- Imports: All Effect modules are imported as namespaces from their subpaths (
effect/Effect,effect/Layer,effect/Schema,effect/Cause,effect/Exit). Local adapter modules are imported as namespaces (* as NodePtyAdapter,* as BunPtyAdapter,* as PtyAdapter). No consolidated named imports from"effect". - Error definitions: Both new errors use
Schema.TaggedErrorClasswith structured attributes and derivemessagefrom those attributes (not fromcause).BunPtyUnsupportedPlatformErroris a pure domain error carrying meaningfulplatformcontext and correctly has nocause.NodePtyModuleLoadErrorwraps a real failure, retains structuredplatform/architecturecontext, and preserves the underlying defect via a requiredcause: Schema.Defect()— the tag and fields identify the failure structurally and the message is not a stringified cause. - No redundant discriminators: The
platformliteral onBunPtyUnsupportedPlatformErroris captured variable context used in the message, not a reason/kind/phase discriminator selecting among collapsed failures. - Naming: Concrete implementation modules correctly use plain
make/layer, consistent with theBunPtyAdapter.ts/NodePtyAdapter.tsexception. - Tests: The behavior change (structured startup defects) is covered by focused tests. The
loadNodePtyModuleinjection mocks only the externalnode-ptyloader, not core business logic, which is permitted.
No concrete convention violations were introduced or retained in the changed scope.
The agent made no additional tool calls beyond your initial Check Run Agent prompt.
Agent Credits: 34 credits
Loading