[codex] Sanitize client error log diagnostics - #3405
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.
This PR sanitizes client error logs by introducing a pure helper module packages/client-runtime/src/errors/safeLog.ts (safeErrorLogAttributes) and routing log call sites through it. It does not create, move, or refactor an Effect service, so the service-definition, error-class, and file-layout conventions are not engaged.
Reviewed changed in-scope files: safeLog.ts (and barrel errors/index.ts), connection/supervisor.ts, state/shell.ts, state/session.ts, state/archivedThreads.ts, plus the web/mobile call sites. Findings:
safeLog.tsis a pure helper module; named function exports and named imports of it are correct per the conventions (named imports are appropriate for pure helpers).- Effect library modules are imported as namespaces from their subpaths (
import * as Effect from "effect/Effect",* as Cause,* as Option, etc.). Named imports fromeffect/unstable/reactivityare whole-package style and acceptable. - Logging refactors use idiomatic
Effect.logWarning/logError+Effect.annotateLogs, andEffect.fnconstructors are preserved. - No
Schema.TaggedErrorClassdefinitions, error predicates, or service tags/layers were added or changed, so error-modeling and predicate conventions do not apply.
No convention violations introduced or retained in the changed scope.
The agent made no additional tool calls beyond your initial Check Run Agent prompt.
Agent Credits: 37 credits