Preserve trace file read causes - #3300
Merged
Merged
MacroscopeApp / Macroscope - Effect Service Conventions
succeeded
Jun 20, 2026 in 2m 2s
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.
I reviewed the changed in-scope file apps/server/src/diagnostics/TraceDiagnostics.ts (and its test) against the Effect service conventions. The changes are compliant:
- Imports: All Effect modules are imported as namespaces from their subpaths (
import * as Result from "effect/Result",import * as Schema from "effect/Schema", and in the testimport * as Logger from "effect/Logger",import * as References from "effect/References").@t3tools/contractscorrectly retains named type imports. - Error modeling: The new
TraceFileReadErrorusesSchema.TaggedErrorClasswith structured attributes, derives itsmessageexclusively from the stabletraceFilePathattribute (not fromcause/cause.message), and preserves the immediate underlyingPlatformErroras a requiredcause(Schema.Defect()). This matches the recommended pattern where a semantically precise error tag preserves a real cause. - Diagnostic field:
causeTagis a multi-value, serializable normalized category (cause.reason._tag) used only for log annotations/diagnostics, not to select the message or drive control flow, so it is permitted to remain a field. - Service layout/shape: Canonical order (imports → error declaration →
Context.Servicetag with inline interface →make→layer) is preserved, and the service interface is referenced viaTraceDiagnostics["Service"]["read"]. - Behavior/tests: The message now derives from structural attributes rather than stringifying the platform error, which aligns with the error conventions, and the existing test was updated (not bloated) to match.
No 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: 28 credits
Loading