Skip to content

Preserve trace file read causes - #3300

Merged
juliusmarminge merged 3 commits into
mainfrom
codex/preserve-trace-read-causes
Jun 20, 2026
Merged

juliusmarminge merged 3 commits into
mainfrom
codex/preserve-trace-read-causes

test(server): remove redundant trace cause assertion

626ccfe
Select commit
Loading
Failed to load commit list.
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 test import * as Logger from "effect/Logger", import * as References from "effect/References"). @t3tools/contracts correctly retains named type imports.
  • Error modeling: The new TraceFileReadError uses Schema.TaggedErrorClass with structured attributes, derives its message exclusively from the stable traceFilePath attribute (not from cause/cause.message), and preserves the immediate underlying PlatformError as a required cause (Schema.Defect()). This matches the recommended pattern where a semantically precise error tag preserves a real cause.
  • Diagnostic field: causeTag is 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.Service tag with inline interface → make → layer) is preserved, and the service interface is referenced via TraceDiagnostics["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