Skip to content

[codex] Structure terminal adapter startup defects - #3425

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/server-residual-terminal-adapters
Jun 20, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
codex/server-residual-terminal-adapters

[codex] Structure terminal adapter startup defects

5681b5c
Select commit
Loading
Failed to load commit list.
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.TaggedErrorClass with structured attributes and derive message from those attributes (not from cause). BunPtyUnsupportedPlatformError is a pure domain error carrying meaningful platform context and correctly has no cause. NodePtyModuleLoadError wraps a real failure, retains structured platform/architecture context, and preserves the underlying defect via a required cause: Schema.Defect() — the tag and fields identify the failure structurally and the message is not a stringified cause.
  • No redundant discriminators: The platform literal on BunPtyUnsupportedPlatformError is 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 the BunPtyAdapter.ts/NodePtyAdapter.ts exception.
  • Tests: The behavior change (structured startup defects) is covered by focused tests. The loadNodePtyModule injection mocks only the external node-pty loader, 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