Skip to content

fix(roadmap): a stage item that fails with AIClientError shows no reason #4338

Closed

Description

@dan-petty

Problem

A stage item that fails with AIClientError shows no reason, in the report of the command or in the log of the Service.

_failure_of in src/devops_cli/roadmap/stage/stage.py sets reason to an empty text for an AIClientError that is no schema failure ("a model's error says its class ... never the reply"). _plan_each catches the error and logs nothing. The report then reads #3599 (AIClientError).

Evidence: a live stage run with devops roadmap stage --plan --item 3599 and the stage model deepseek-v4.1-flash-1017, 2026-11-10, ended after 2 minutes 48 seconds with #3599 ... AIClientError. The gateway was healthy (devops ai gateway status). A second run on the same item passed that step. The cause of the first error (a gateway error, a timeout, a cut at 125 seconds) is not known.

Expected

  • The failure text of an AIClientError names the class of the error and its message, with the reply and the secrets masked (the message of a transport or HTTP error holds no reply).
  • The log of the Service holds one warning line for it, with the item number.

Acceptance criteria

  • A test of a stage item whose model call raises AIClientError("gateway returned 502") shows the text gateway returned 502 in StageFailure.reason. It fails today.
  • A test shows that the reply text of a StructuredOutputValidationError is still not in the reason.

Existing tool considered

mask_secrets and violation_summary already exist in the same module. The change prints the message of the error through mask_secrets. Cost: about 15 000 tokens to build, 2 000 to keep, and 45 minutes.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The gap hides the cause of stage failures but does not block the pipeline or lose data.
    • Value: Medium. Operators cannot diagnose a stage failure without the error message, which delays resolution.
    • Effort: Low. The change prints the error message through the existing mask_secrets helper in one function, about 45 minutes of work.
    • Related: fix(roadmap): refine's failure warnings name no repository and drop the reason, so a gateway timeout and a bad model reply look the same #2562, which asks for a different change. Both show the AIClientError message in a failure record, but #2562 fixes the refine step warning while this candidate fixes the stage step reason field.
  3. added
    priority/p2-medium
    owner/agent
    status/in-review
    and removed
    status/new
    on Nov 10, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 10, 2026
  5. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-10 07:20 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions