Skip to content

[codex] Structure Azure DevOps CLI failures - #3460

Merged
juliusmarminge merged 2 commits into
mainfrom
codex/azure-devops-cli-errors
Jun 21, 2026
Merged

juliusmarminge merged 2 commits into
mainfrom
codex/azure-devops-cli-errors

Distinguish missing Azure CLI from missing cwd

5252104
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Effect Service Conventions succeeded Jun 21, 2026 in 4m 4s

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.
  • detail is now a derived getter and message is derived from stable structural attributes (operation/detail), never from cause — confirmed by the provider test asserting the raw cause text is not leaked into message.
  • cause is now a required Schema.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.failureKind and PlatformError reasons — 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.Union of the error classes plus a direct export const isAzureDevOpsCliError = Schema.is(...) predicate.
  • Namespace imports from effect/* subpaths, named imports from @t3tools/contracts, canonical file order (errors → Context.Service → make → layer), and AzureDevOpsCli["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