Repository navigation
Description
Split from #4204.
Problem The stage job stages no item because the model sends replies of placeholders. The Service cannot name the cause yet: window, toolset, output tool of the structured reply, or model. ## Why deferred The cause needs Service data that does not exist before #4204 ships. The model change is allowed only when the evidence names the model, as owner decision #3874 allows. ## Acceptance criteria 1. The analysis names the cause in this issue: window, toolset, output tool or model. It cites the kept replies and the request fields. 2. The fix removes the cause. If the cause is the model, the stage slot names another model. 3. sum by (result) (increase(devops_cli_roadmap_stage_total[24h])) shows staged above 0 for each 24 hours in which an item is Ready and has a plan that passes the gates. 4. The golden-case eval reports 0 degenerate replies for the chosen model.
Proposed design
Problem statement
The stage job stages no item because the model sends placeholder replies. The cause can be the window, the toolset, the output tool of the structured reply, or the model. The repository rules out the window: a run that the window starves raises an error before the reply is read. The Service data of #4204, the kept replies and the request fields, names the remaining cause. This issue uses that data, removes the cause, and proves the result with the stage metric and the golden-case eval.
Acceptance criteria
Requirement: Cause analysis
The analysis SHALL name one cause of the placeholder replies among the toolset, the output tool and the model, and MUST cite the kept reply and the request field that show it.
Scenario: Cause named from the kept data
- WHEN the analysis reads the kept replies and request fields of fix(roadmap): the stage job stages no item (placeholder replies) #4204
- THEN it names exactly one cause, and it does not name the window, because a window-starved run raises
RoadmapStageErrorbefore the reply is read
Requirement: Cause removal
The fix SHALL remove the cause that the analysis names, and it MUST change the model of the stage slot only when the analysis names the model.
Scenario: Model is the cause
- WHEN the analysis names the model as the cause
- THEN the stage slot names another model, and for any other cause the stage slot keeps
deepseek-v4.1-flash-1017
Requirement: Staged results
The metric devops_cli_roadmap_stage_total SHALL show staged above 0 for each 24 hours in which an item is Ready and has a plan that passes the gates.
Scenario: Staged count after the fix
- WHEN
sum by (result) (increase(devops_cli_roadmap_stage_total[24h]))runs after the fix for a 24-hour window with such an item - THEN the result
stagedis above 0
Requirement: Golden-case eval
The golden-case eval SHALL report 0 refused cases whose content problem names a placeholder for the chosen model.
Scenario: Eval of the chosen model
- WHEN the golden-case eval runs offline with the recorded replies of the chosen model
- THEN no case ends
refusedwith acontentproblem that names a placeholder
Existing Tool Considered
pydantic-ai is the open, maintained agent runtime that the stage job already uses: ToolboxClient runs the planner and the verifier through investigate with a RunTrace that records the limit, the tools each request offered, the tool calls and the schema violations (src/devops_cli/roadmap/stage/stage_toolbox.py:151, src/devops_cli/roadmap/agent_run.py:196). It lacks a recorder for the model's replies and the request fields, which #4204 adds. The project's golden-case eval (devops roadmap eval stage) replays recorded replies and reports the outcomes (src/devops_cli/roadmap/stage/stage_eval_run.py:56). The change adds no new library and no second word list: it uses is_placeholder (src/devops_cli/roadmap/pull_form.py:129) and the existing eval. The cost is one analysis run, one small fix, and one eval run, with a few hours of elapsed time after #4204 ships.
Key questions
- Which cause makes the stage job get placeholder replies: window, toolset, output tool or model?: The cause is not named yet. The repository gives the test that names it, and rules out the window:
ToolboxClient._window_starvedraisesRoadmapStageErrorbefore it reads a reply whenRunTrace.limitisRunLimit.WINDOWand the run made fewer thanCONST_ROADMAP_STAGE_MIN_TOOL_CALLS(8) calls (src/devops_cli/roadmap/stage/stage_toolbox.py:176,:194;docs/roadmap/stage.md:71). A placeholder reply that reaches the gates therefore did not come from a window-starved run.RunTracealso records the tools each request offered, the tool calls and the schema violations (src/devops_cli/roadmap/agent_run.py:196): a reply with 0 violations points away from the output tool, and a run that offered tools and called none points to the model. The kept replies and request fields of fix(roadmap): the stage job stages no item (placeholder replies) #4204 apply this test and name the toolset, the output tool or the model. [sources: src/devops_cli/roadmap/stage/stage_toolbox.py:176, src/devops_cli/roadmap/stage/stage_toolbox.py:194, src/devops_cli/roadmap/agent_run.py:196, docs/roadmap/stage.md:71, k8s/devops/configmap.example.yaml:39, k8s/devops/configmap.example.yaml:105] - When may the fix change the model of the stage slot?: Only when the analysis names the model. The owner decision of 2026-11-07 (feat(k8s): the Service uses one model for every chat slot #3874) sets
deepseek-v4.1-flash-1017for every chat slot until most roadmap steps work, and the ConfigMap says to undo that choice then (k8s/devops/configmap.example.yaml:19). A model change without the kept evidence would hide the cause and break that decision. For any other cause the stage slot keeps its model. (best practice) [sources: SECURITY.md:40, k8s/README.md:674, k8s/devops/configmap.example.yaml:19, openspec/changes/archive/2026-11-07-3874-one-model-for-service/proposal.md:5]- Chosen: Change the model only when the evidence names it. The owner decision of 2026-11-07 (feat(k8s): the Service uses one model for every chat slot #3874) sets one model for every chat slot until most steps work; a change without the kept evidence hides the cause and breaks that decision (
k8s/devops/configmap.example.yaml:19). - Rejected: Change the model first as a quick test. It breaks the owner decision and hides the real cause if the cause is another one.
- Chosen: Change the model only when the evidence names it. The owner decision of 2026-11-07 (feat(k8s): the Service uses one model for every chat slot #3874) sets one model for every chat slot until most steps work; a change without the kept evidence hides the cause and breaks that decision (
- What does a
degeneratereply mean in the golden-case eval?: The stage eval has nodegenerateoutcome. It recordsstaged,refused,over_budgetandfailed(src/devops_cli/roadmap/stage/stage_eval_run.py:56), and a placeholder text is refused by thecontentgate, which callsis_placeholder(src/devops_cli/roadmap/stage/stage_change.py:1579,src/devops_cli/roadmap/pull_form.py:129). The criterion counts arefusedcase whosecontentproblem names a placeholder. [sources: src/devops_cli/roadmap/stage/stage_eval_run.py:56, src/devops_cli/roadmap/stage/stage_change.py:1579, src/devops_cli/roadmap/pull_form.py:129]
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service 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.The stage job is down. This fix waits for #4204 data. P2-Medium reflects the blocked but important work.The fix restores staging and stops placeholder replies for roadmap users.The work needs cause analysis, a fix, metric checks and a golden-case eval.Both items address placeholder replies in the stage job; #4204 collects the incident data and the candidate removes the cause after that data exists.devops-cli-service commentedon Nov 9, 2026
Refine cannot set this item to Ready at d37762b while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
src/devops_cli/roadmap/agent_run.py,src/devops_cli/roadmap/stage/stage_toolbox.py.dan-petty commentedon Nov 9, 2026
Cause found on 2026-11-09, with one live run. The stage call never reaches
claude-sonnet-5-5. The gateway sends it todeepseek-v4.1-flash-1017as the fallback.Evidence:
devops roadmap stage --plan --item 3576with the Service config (slotanalysis, whichstageinherits through_TASK_PARENTS: modelclaude-sonnet-5-5, window 200000). The gateway spend log (GET /spend/logs, rows byrequester_ip_address127.0.0.1) holds 32 rows for this run, all of groupdeepseek-v4.1-flash-1017, none ofclaude-sonnet-5-5.fallbacks: []in the request body shows the first request fail:400 ... AnthropicException ... tool_choice: type "tool" and "any" are not supported for this model.tool_choice: "required"gives 400,tool_choice: "auto"gives a tool call. The stage planner uses a pydantic-ai agent with a tool output (output_type=StageProposal). pydantic-ai resolves that totool_choice: requiredwhen no direct text output is allowed (pydantic_ai/models/_tool_choice.py,resolve_tool_choice), and the OpenAI model sends it because the profile hasopenai_supports_tool_choice_requiredtrue. The comment inllm-gateway-configsays that Sonnet 5.5 refuses a forced tool call and that a caller sends "auto".claude-sonnet-5-5: [deepseek-v4.1-flash-1017]in the gateway config, so the 400 does not reach the client. The spend log shows no Sonnet row for the Service rounds after 04:19 UTC. The settings of the Service nameclaude-sonnet-5-5, and the stage log does not say which model answered.So the finding that "a strong model fails the same way" is wrong. The model that fails is DeepSeek in both cases. Window, toolset and the output tool are not the cause: the output tool is the reason for the fallback.
Two fixes remove the cause (not built here):
tool_choice: autofor a Claude group: set the pydantic-ai model profileopenai_supports_tool_choice_required=Falsefor the group inresolve_pydantic_ai_model(src/devops_cli/ai/pydantic_ai_bridge.py). pydantic-ai then sends "auto", and a text-only reply goes back as a retry.response.model) and count a fallback, so a slot never reads Sonnet while DeepSeek answers.Criterion 4 of #4204 (
degenerate) stays needed: DeepSeek sends the placeholder reply.A second, separate defect shows in the same run: the prompt asks for
nullinreferences[].reasonand the schema refuses it. It is filed as #4214.Not verified: that Sonnet 5.5 with
tool_choice: autoreturns a fullStageProposalthat passes the gates; the cause of the Sonnet rows before 04:19 UTC (a run that sent "auto" or a text reply); the 4096-token completions in 3 of those rows.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