Repository navigation
Description
Problem
devops roadmap eval stage (live) keeps the reason of each case in CaseRun.reason, but neither the text report nor the --json report shows it, and the stored report under .data/roadmap_eval/stage/ does not hold it. For a failed case the reason is only the type name of the error (_ended in src/devops_cli/roadmap/stage/stage_eval_run.py), and the message is dropped.
On 2026-11-18 the base and head runs for #6214 ended with 2 and 3 of 3 cases failed, and the score counts a failed case as not avoided. The runs cost 0.43 and 0.30 USD, and no report said why a case failed, so the base and head scores could not be compared.
Expected behavior
- The text and
--jsonreports list each case with its end (staged,refused,degenerate,over_budget,failed) and its reason, with secrets masked. - A failed case keeps the error message, not only its type, and names an infrastructure end (gateway 429, provider error, timeout) apart from a reply that the schema refused.
- The stored report holds the same.
Related
- fix(roadmap): Tell the stage planner what counts as source code #6214, fix(roadmap): A schema limit of the plan reply never fails a stage item #6319, feat(roadmap): Hold prompt change in draft until live score recorded #4005.
Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Three searches for per-case outcome and failure-reason reporting in eval runs returned only unrelated web API documentation pages, no tool. The need is the internal text, JSON and stored report of devops roadmap eval stage, so no external library covers it.
Lacks:
- No tool renders this repository's stage eval report
- No tool classifies gateway 429, provider, timeout apart from schema refusal
- No tool masks secrets at the CaseRun reason boundary
Proposed design
Problem statement
The stage eval run keeps the reason of each case in CaseRun.reason, but the text report, the --json report and the stored report drop it. A failed case shows only the error type, so a gateway 429, a provider error, a timeout and a schema refusal look the same. The change shows the end and the masked reason in all three reports.
Acceptance criteria
Requirement: Failed case keeps masked message
A case run that ends failed SHALL keep the masked message of its error in CaseRun.reason.
Scenario: Provider error keeps its message
- WHEN The test patches
mask_secretsinstage_eval_runto return[MASKED]and calls_endedwith anAIClientErrorwhose message isprovider failedand whose status is 500. - THEN The returned reason holds
[MASKED]and does not holdprovider failed.
Requirement: Infrastructure ends are named
The reason of a case that ends failed SHALL name gateway_429, provider or timeout for the matching AIClientError and MUST NOT name schema_refusal.
Scenario: Infrastructure classes are named
- WHEN The test calls
_endedwith anAIClientErrorwith status 429, one with status 500, and one withtimed_outset to true. - THEN The returned reasons name
gateway_429,providerandtimeout, and none namesschema_refusal.
Requirement: Schema refusal is not an infrastructure end
The reason of a case that ends failed from StructuredOutputValidationError SHALL name schema_refusal and MUST NOT name gateway_429, provider or timeout.
Scenario: Schema refusal is named apart
- WHEN The test calls
_endedwith aStructuredOutputValidationErrorwhoseerror_typesis('missing',). - THEN The returned reason names
schema_refusaland does not namegateway_429,providerortimeout.
Requirement: Text report lists each case
The text report of devops roadmap eval stage SHALL list each case with its end and its masked reason.
Scenario: Text report shows a failed case
- WHEN The test calls
render_scorewith aStageScorewhosecase_runsholds oneCaseRunwith outcomefailedand reasonprovider: boom. - THEN The text output holds a line with
failedandprovider: boom.
Requirement: JSON report holds each case
The --json report SHALL hold the outcome and reason of each case.
Scenario: JSON report carries both fields
- WHEN The test calls
score_jsonwith aStageScorewhosecase_runsholds oneCaseRunwith outcomefailedand reasonprovider: boom. - THEN The parsed JSON has
case_runs[0].outcomeequal tofailedandcase_runs[0].reasonequal toprovider: boom.
Requirement: Stored report matches the JSON report
The stored report under .data/roadmap_eval/stage/ SHALL hold the same case records as the --json report.
Scenario: Stored report matches the JSON
- WHEN The test runs
devops roadmap eval stagewith a temporary data directory and a mockedrun_casesthat returns one failedCaseRun. - THEN The stored file under the temporary data directory parses to the same
case_runslist as the--jsonoutput.
Requirement: Reports mask secrets
The text report and the --json report SHALL mask secrets in CaseRun.reason with mask_secrets before they write it.
Scenario: Secret is masked in both reports
- WHEN The test patches
mask_secretsinstage_eval_renderto return[MASKED]and renders aCaseRunwhose reason istoken=secret. - THEN The text output and the parsed JSON both hold
[MASKED]and neither holdssecret.
Existing Tool Considered
The alternatives check in the issue body (2026-11-21) records verdict none and no tool. The change extends project code in src/devops_cli/roadmap/stage/stage_eval_run.py, src/devops_cli/roadmap/stage/stage_eval_score.py, src/devops_cli/roadmap/stage/stage_eval_render.py and src/devops_cli/commands/roadmap_eval_stage.py. The written cost is about 15k to 25k tokens to build, about 3k tokens for each later fix, and under one day of elapsed work.
Key questions
- How does the report name why a case ended?: Keep
CaseRun.reasonfor every end. For afailedcase, prefix the masked message with a class. Usegateway_429forAIClientErrorwith status 429,timeoutwhentimed_outis true or the status is 408 or 504,providerfor anotherAIClientError, andschema_refusalforStructuredOutputValidationError. Use the error type name for another exception. Do not add a newOutcomemember. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_run.py:150, src/devops_cli/ai/client/models.py:72, src/devops_cli/ai/client/models.py, src/devops_cli/security/sanitizer.py]- Rejected: Keep the error type name only. The message is dropped, so a gateway 429 and a schema refusal look the same.
- Rejected: Add
infratoOutcome. The closed set changes, and every reader of the five ends must change too. - Chosen: Prefix the masked message with a failure class in
reason. The reason keeps the evidence and names the infrastructure end. The five ends stay stable.
- Where does each report read the end and the reason?:
StageScoreinstage_eval_score.pykeeps acase_runstuple ofCaseRun.render_scoreinstage_eval_render.pyprints one line for each run with its outcome and masked reason.score_jsonwrites acase_runslist withname,outcomeandreason. The commandcommands/roadmap_eval_stage.pywrites thescore_jsontext to stdout and to the stored file. One record shape serves all three outputs. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_score.py, src/devops_cli/roadmap/stage/stage_eval_render.py, src/devops_cli/commands/roadmap_eval_stage.py]- Rejected: Separate shape for each output. The three outputs drift, and a fix in one leaves the others wrong.
- Chosen: One shared case record. One change fixes the text, the JSON and the stored report.
- Does the change add a new
Outcomemember for infrastructure ends?: No. Keep the five membersstaged,refused,degenerate,over_budgetandfailed. Name the infrastructure class inreason.stage_eval_compare.pyand the counters keep working. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_run.py:64, src/devops_cli/roadmap/stage/stage_eval_compare.py, src/devops_cli/roadmap/stage/stage_eval_score.py]- Rejected: Add
infratoOutcome. The closed set changes, and every reader of the five ends must change too. - Chosen: Classify inside
reason. The five ends stay stable and the reason carries the new detail.
- Rejected: Add
- Must the reason be masked before the stored report?: Yes. Call
mask_secretsat the_endedboundary and again inrender_scoreandscore_jsonbefore they write a reason. The stored file never keeps a secret, even if aCaseRunis built elsewhere. (best practice) [sources: src/devops_cli/security/sanitizer.py, src/devops_cli/roadmap/stage/stage_eval_run.py:150, src/devops_cli/roadmap/stage/stage_eval_render.py]- Rejected: Mask at render time only. The stored report could keep a secret.
- Rejected: Mask at the
_endedboundary only. ACaseRunbuilt by another path could reach a report unmasked. - Chosen: Mask at the
_endedboundary and at each output. Every output reads a masked reason and masks it again before it writes.
- Does
CaseRunalready hold the reason?: Yes.CaseRun.reasonexists atsrc/devops_cli/roadmap/stage/stage_eval_run.py:77; only the reports drop it. [sources: src/devops_cli/roadmap/stage/stage_eval_run.py:77] - Which module holds the stage eval report record?:
stage_eval_record.pyrecords constants for the facts of a case. It does not hold the report record.stage_eval_score.pybuilds the score andstage_eval_render.pyrenders the text and the JSON. [sources: src/devops_cli/roadmap/stage/stage_eval_record.py, src/devops_cli/roadmap/stage/stage_eval_score.py, src/devops_cli/roadmap/stage/stage_eval_render.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 18, 2026
Both concern the stage showing what happened to cases, but #4535 adds runtime log lines while the candidate adds reason fields to the eval report output.devops-cli-service commentedon Nov 19, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 21, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (3)
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
chore(main): release 0.219.0 (#7177)
devops-cli-service commentedon Nov 25, 2026
Released in v0.219.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.219.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 17:09 UTC