[codex] Structure OAuth scope encoding failures - #3368
Merged
Merged
MacroscopeApp / Macroscope - Effect Service Conventions
succeeded
Jun 20, 2026 in 56s
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 scope: packages/shared/src/oauthScope.ts and packages/shared/src/oauthScope.test.ts.
Findings:
- Imports:
import * as Schema from "effect/Schema"correctly uses the subpath namespace import. The test's named imports from the local./oauthScope.tspure-helper module are appropriate (it is a pure helper/error module, not aContext.Serviceboundary), consistent with the convention that named imports are kept for pure helper/error/schema modules. - Error modeling:
OAuthScopeEncodingErroris defined withSchema.TaggedErrorClassand structured attributes (scopes,invalidScopes,duplicateScopes) rather than storing an unstructured message as the only data. This is a pure validation/domain error created without an underlying failure, so omittingcauseis correct per convention. The generic constantmessagegetter is acceptable: the failures share the same semantics and the specific context lives in the structural fields. No redundant single-valueoperation/reason/kind/phasediscriminator is introduced. - Predicate: the test uses
Schema.is(OAuthScopeEncodingError)directly rather than wrapping it in a redundant function, which is fine. (Optionally the module could exportisOAuthScopeEncodingError, but a locally-scoped predicate in a test is not a convention violation.) - Behavior change: replacing the thrown
Errorwith the structuredOAuthScopeEncodingErroris covered by a focused added test, satisfying the behavior-change testing guidance; no service definition, layer, or file-migration conventions apply to this pure helper module.
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: 28 credits
Loading