Skip to content

fix(roadmap): intake's reply schema limits type to the repository's type labels, so the model cannot leave it empty #2370

Description

@dan-petty

Problem Description

devops roadmap intake --title … --body-file … --confirm refused a new candidate on 2026-10-27:

skipped, nothing written: the model's proposal is not valid: type '' is not one of type/feature, type/bug, type/security, type/refactor, type/docs, type/infra, type/test, type/chore; type '' is not one of type/feature, type/bug, …

The same command with the same title and body passed on the next run (#2368). Each run took about 5 minutes.

ModelProposal.type is str = "" (src/devops_cli/roadmap/intake_model.py). GatewayIntakeModel.propose sends the JSON schema of ModelProposal to the gateway as response_format (chat_structured, src/devops_cli/ai/client/structured.py). Thus the schema lets the model leave type empty, also when the candidate has no type label and intake needs one. The second request that #1677 added got an empty type too, so the run stopped.

Reproduction Steps

  1. File a candidate that has no type label: uv run devops roadmap intake --title "fix(k8s): <summary>" --body-file <file> --confirm.
  2. Some runs stop with type '' is not one of … and file nothing.

Expected vs Actual Behavior

  • Expected: when the candidate needs a type, the reply schema permits only the labels in ProposalRequest.types, so the model cannot send an empty or unknown type.
  • Actual: the schema permits any string, and intake finds the empty value only after the reply.

Environment Diagnostics

devops-cli 0.7.1 (main at 69928b0). analysis task: qwen3.8:27b through the LiteLLM gateway v1.103.0.

Proposed fix

  • Build the reply schema for each request. When the candidate has no type label, make type required and an enum of ProposalRequest.types. Use the same method for the other fields that have a fixed list (priority, value, effort). The JSON schema enum keyword and the structured output of the gateway do the work, so no new check is necessary.
  • Find out if intake can read the type from the Conventional Commit prefix of a --title candidate (fix gives type/bug) and not ask the model for it.

Related

Activity

  1. added
    source/agent
    type/bug
    on Oct 27, 2026
  2. dan-petty commented on Oct 27, 2026

    @dan-petty
    OwnerAuthor

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

    • Type: type/bug. The schema permits an empty type string that the validator rejects, causing intermittent intake failures.
    • Priority: P2-Medium. The failure is intermittent and blocks a user action, but a retry succeeds, so it is not a hard blocker.
    • Value: Medium. It removes a recurring ~5-minute wasted run and an unreliable intake step for users filing candidates.
    • Effort: Low. The fix changes schema generation to emit an enum and required flag for type, priority, value, and effort, with no new validation logic.
    • Related: feat(ai): constrain structured replies on the claude, openai and copilot providers #1419, which asks for a different change. Both constrain structured model replies, but #1419 adds provider-level wire constraints while this item makes the schema itself reject empty or unknown values at generation time.
  3. added 2 commits that reference this issue on Oct 27, 2026
    b9220b1
    520e8b8
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions