[codex] Structure relay install confirmation conflicts - #3365
Merged
Merged
MacroscopeApp / Macroscope - Effect Service Conventions
succeeded
Jun 20, 2026 in 1m 3s
Effect Service Conventions: All clear
All clear
No Effect service convention violations were introduced or retained in the changed scope.
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.
Files reviewed
apps/web/src/cloud/relayClientInstallDialog.tsapps/web/src/cloud/relayClientInstallDialog.test.ts
Findings
The PR replaces a generic new Error("A relay client installation is already in progress.") with a structured RelayClientInstallConfirmationConflictError. This aligns well with the conventions:
- Imports:
import * as Schema from "effect/Schema"uses the correct namespace subpath import. The named imports (RelayClientInstallProgressStageSchema,RelayClientInstallProgressEvent,RelayClientInstallProgressStage) come from the whole package@t3tools/contracts, which is explicitly exempt from the namespace rule. Verified these names are exported by the package. - Error modeling: The failure is defined with
Schema.TaggedErrorClassand carries structured, serializable attributes (requestedVersion,activeVersion,activeDialogStatus, optionalactiveInstallStage). - Message: Derived exclusively from stable structural attributes, never from a cause.
- Cause: This is a pure domain/validation conflict (concurrent confirmation rejected) created without an underlying failure, so the absence of a
causefield is correct and consistent with the conventions. The test explicitly asserts nocauseproperty, which is appropriate. - Discriminator:
activeDialogStatusis a multi-value literal used both structurally and in the message, not a redundant single-value discriminator paired with the tag, so it does not violate the duplicate-distinction rule. - Tests: Backend behavior changed (new typed error with structured fields/message), and a focused test was added to cover it — consistent with the change-discipline guidance.
No violations to report.
Tool Calls
| # | Tool | Description |
|---|---|---|
| 1 | github_api_read_only |
Does the @t3tools/contracts package export RelayClientInstallProgressStageSchema, RelayClientInstallProgressEvent, and RelayClientInstallProgressStage? Show how RelayClientInstallProgressStageSchema i... |
Agent Credits: 36 credits
Loading