Repository navigation
Description
Problem
The prompt of the stage planner tells the model to send null for reason in an entry of references. The schema of the reply does not allow null there. A reply that follows the prompt fails the schema, and the job ends the item with StructuredOutputValidationError.
src/devops_cli/ai/tasks/roadmap_stage_change.md, keyreferences: "reasonis a non-empty string whenunchangedis true, else null." (added by feat(roadmap): require a move plan to cover each reference #4166, commit c3cf983, 2026-11-08).src/devops_cli/roadmap/stage/stage_change.py, classStageReference:reason: Line = "".Lineisstr. The JSON schema that pydantic-ai sends is{"type": "string", "default": ""}.
Reproduction on 2026-11-09 (one live run, devops roadmap stage --plan --item 3576, with the violations printed):
loc=('references', 0, 'reason') type=string_type msg=Input should be a valid string input=None
loc=('references', 1, 'reason') type=string_type msg=Input should be a valid string input=None
loc=('references', 3, 'reason') type=string_type msg=Input should be a valid string input=None
Offline: StageReference.model_validate({"path": "src/a.py", "kind": "import", "unchanged": False, "reason": None}) raises string_type on reason.
The log of the Service holds only "N schema violation(s)" (#4204), so this cause stayed hidden. A model that follows the prompt exactly fails; a reply that fails this way also costs the return try of the item.
Note: in this run the model that answered was deepseek-v4.1-flash-1017, not claude-sonnet-5-5 (see #4205). The defect does not depend on the model: the prompt asks for null.
Expected
The prompt and the schema agree on the value of reason when unchanged is false. A reply that follows the prompt passes the schema.
Acceptance criteria
uv run devops ci test tests/roadmap/stage/test_roadmap_stage_content.pyholds a test that validates aStageProposalwithreferences: [{"path": ..., "kind": ..., "unchanged": false, "reason": null}]and gets noValidationError. Today the test fails withstring_type.uv run devops ci test tests/roadmap/stage/test_roadmap_stage_prompt_rules.pyholds a test that reads thereferencesline of the prompt and builds the example reply from it. The reply passesStageProposal. Today the reply built from the prompt fails.
Existing tool considered
pydantic: StageReference.reason: Line | None = None (the schema then shows null), or one word in the prompt ("else an empty string"). No new library or helper. The smallest change is the prompt line, because the schema and the code that reads ref.reason already use a string.
Cost
Tokens to build: about 20,000 (one line of the prompt or one type, two tests). Tokens to keep: none. Tokens to fix: none. Elapsed time: 30 minutes.
Related
#4204 (the violation text is not logged), #4205 (placeholder replies; the gateway sends the stage call to the fallback model), #4166 (added the prompt line).
Source: #4204
Activity
dan-petty commentedon Nov 9, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.A model that follows the prompt fails validation, but the fix is one word or one type annotation.The regression commit c3cf983 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.It unblocks correct model replies that currently end the item with a StructuredOutputValidationError.The change is one line in the prompt or one type annotation plus two tests, about 30 minutes.Both items address stage reply failures, but #4205 removes the cause of placeholder replies while this item fixes a prompt/schema mismatch on the reason field.devops-cli-service commentedon Nov 9, 2026
Released in v0.100.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.100.0
devops-cli-service commentedon Nov 9, 2026
Live since 2026-11-09 10:07 UTC