Skip to content

[codex] Structure OAuth scope encoding failures - #3368

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/oauth-scope-errors
Jun 20, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
codex/oauth-scope-errors

fix: structure OAuth scope encoding failures

6bfc53e
Select commit
Loading
Failed to load commit list.
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.ts pure-helper module are appropriate (it is a pure helper/error module, not a Context.Service boundary), consistent with the convention that named imports are kept for pure helper/error/schema modules.
  • Error modeling: OAuthScopeEncodingError is defined with Schema.TaggedErrorClass and 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 omitting cause is correct per convention. The generic constant message getter is acceptable: the failures share the same semantics and the specific context lives in the structural fields. No redundant single-value operation/reason/kind/phase discriminator 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 export isOAuthScopeEncodingError, but a locally-scoped predicate in a test is not a convention violation.)
  • Behavior change: replacing the thrown Error with the structured OAuthScopeEncodingError is 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