[codex] Structure Azure DevOps CLI failures - #3460
Effect ServiceEntions: 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 error refactring in apps/server/src sourceContro//AzureDevOpsCli.ts and its touched call sites (AzureDevOpsCli.test.ts and AzureDevOpsSourceControlProvider.test.ts`) against the Effect service conventions.
The change splits the former single AzureDevOpsCliError (which used a stored detail string to pick the message) into distinct Schema.TaggedErrorClass variants and is well aligned with the conventions:
- Distinct error classes for semantically distinct failures (
AzureDevOpsCliUnavailableError,AzureDevOpsCliAuthenticationError,AzureDevOpsPullRequestNotFoundError,AzureDevOpsCommandFailedError, and the decode errors), matching the rule to split failures whose user-facing messages differ. detailis now a derived getter andmessageis derived from stable structural attributes (operation/detail), never fromcause— confirmed by the provider test asserting the raw cause text is not leaked intomessage.causeis now a requiredSchema.Defect()(previously optional) since every construction wraps a real failure, and the immediate underlying error is preserved.- String-matching on error text was replaced with structured branching on
VcsProcessExitError.failureKindandPlatformErrorreasons — this is the source of the new focused behavior (distinguishing a missing working directory from a missing Azure CLI), which is appropriately covered by new, focused tests rather than bulk tests. Schema.Unionof the error classes plus a directexport const isAzureDevOpsCliError = Schema.is(...)predicate.- Namespace imports from
effect/*subpaths, named imports from@t3tools/contracts, canonical file order (errors →Context.Service→make→layer), andAzureDevOpsCli["Service"]usage are all preserved.
The single-value operation/command literals on the command-level errors are orthogonal, serializable context (which the conventions explicitly endorse capturing), not a discriminator that duplicates the failure distinction encoded by the tag, so they are not a violation. No convention violations were found in the changed scope.
The agent made no additional tool calls beyond your initial Check Run Agent prompt.
Agent Credits: 86 credits