Repository navigation
Description
Split from #5905.
Problem: The refine judge grade must mark an approved verdict held when a later stage result shows a plan that builds. Why deferred: the stage result line records result, plan_calls, gate_returns, verify_rounds, tokens and seconds, and no plan-check result (src/devops_cli/roadmap/stage/stage.py:4731-4738). Issue #5603 adds the stage plan grade and is open. Acceptance criteria: The stage result line SHALL record the plan-check result of the plan that it staged. The job grade report SHALL mark an approved refine_judge verdict held when a later stage result line of the same item records a passing plan check. A test SHALL assert both outcomes with a fake stage result line.
Proposed design
Problem statement
Record the plan-check result in the stage result line, and make the job grade report hold an approved refine_judge verdict when a later stage result line of the same item records a passing plan check. The item waits on #5603, which adds the stage plan grade to the stage result line. The stage result line holds no plan-check result now, so the grade report cannot hold an earlier approval.
Acceptance criteria
Requirement: Stage result plan check
The stage job SHALL write the result of its plan check into the stage result line as the field plan_check, with the value pass, fail or none.
Scenario: Plan check outcome
- WHEN A unit test builds the stage result line for a passing plan check, a failing plan check and a missing plan check
- THEN The stage result line holds
plan_checkwith the valuepassfor the passing check,failfor the failing check andnonefor the missing check.
Requirement: Grade holds the approved verdict
The job grade report MUST mark an approved refine_judge verdict held when a later stage result line of the same item records plan_check pass.
Scenario: Later stage line with a passing plan check
- WHEN A unit test gives the grade report an approved
refine_judgeresult line and a later stage result line of the same item withplan_checkpass - THEN The grade report shows the
refine_judgeverdict as held.
Requirement: Grade keeps the approved verdict on a failing plan check
The job grade report MUST keep an approved refine_judge verdict not held when the later stage result line of the same item records plan_check fail.
Scenario: Later stage line with a failing plan check
- WHEN A unit test gives the grade report an approved
refine_judgeresult line and a later stage result line of the same item withplan_checkfail - THEN The grade report keeps the
refine_judgeverdict approved and not held.
Requirement: Grade keeps the approved verdict with no plan check
The job grade report MUST keep an approved refine_judge verdict not held when the later stage result line of the same item records plan_check none.
Scenario: Later stage line with no plan check
- WHEN A unit test gives the grade report an approved
refine_judgeresult line and a later stage result line of the same item withplan_checknone - THEN The grade report keeps the
refine_judgeverdict approved and not held.
Requirement: Grade keeps the approved verdict for a line without the field
The job grade report MUST keep an approved refine_judge verdict not held when the later stage result line of the same item holds no plan_check field.
Scenario: Older stage result line
- WHEN A unit test gives the grade report an approved
refine_judgeresult line and a later stage result line of the same item with noplan_checkfield - THEN The grade report keeps the
refine_judgeverdict approved and not held.
Existing Tool Considered
No alternatives check has run. No open tool or library covers this need: the change is internal to the stage result line and the job grade report of devops-cli. The written cost to build, keep and fix this code is about 4,000 tokens and 2 hours.
Key questions
- Which field records the plan-check result in the stage result line?: Add a string field
plan_checkto the stage result line, with the closed valuespass,failandnone. Keep the existingresultfield for the job outcome. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py, CONTEXT.md]- Chosen: Add string field plan_check. It records the plan check beside the job result and gives the grade report a closed set of values.
- Rejected: Add boolean field plan_ok. It cannot show that no plan check ran.
- Rejected: Reuse the existing result field. It conflates the job outcome with the plan-check outcome.
- Where does the job grade report apply the hold?: In the job grade report, when it reads the result lines of one item. A later stage result line with
plan_checkpass marks an earlier approvedrefine_judgeverdict held. The stored result lines stay unchanged. (best practice) [sources: CONTEXT.md, src/devops_cli/commands/roadmap_eval.py]- Chosen: Apply the hold in the grade report. The item asks the job grade report to mark the verdict held, and the recorded result lines stay unchanged.
- Rejected: Rewrite the refine_judge result line. It changes recorded history and needs a second write.
- Rejected: Hold the verdict at refine time. The stage result line does not exist when refine runs.
- What value shows that no plan check ran?: Record
plan_checkwith the valuenonewhen the stage job staged no plan or ran no plan check. The grade report then keeps the approvedrefine_judgeverdict not held. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py, CONTEXT.md]- Chosen: Record plan_check as none. It makes the absence of a plan check explicit and keeps pass and fail unambiguous.
- Rejected: Omit the plan_check field. The grade report cannot tell an old result line from a new line with no plan check.
- Rejected: Record plan_check as fail. It reports a plan failure when no plan check ran.
- Where does the stage job take the plan-check result that it records?: From the outcome of the plan check that the stage job already runs on the plan before it opens the draft. A plan that passes the check gives
pass, a plan that fails givesfail, and a run with no plan check givesnone. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py, CONTEXT.md]- Chosen: Reuse the outcome of the stage plan check. The stage job already refuses a plan that fails the check, so the outcome costs no second check.
- Rejected: Run a second plan check after the result line is built. It costs a second check and can disagree with the check that staged the plan.
- Rejected: Record none for every run. It hides a real plan check from the grade report.
- Which module holds the job grade report that reads the result lines?: The
devops roadmap evalcommand group is registered fromsrc/devops_cli/commands/roadmap_eval.py. The commanddevops roadmap eval gradesprints the job grade from the result lines of each attempt in Loki. [sources: src/devops_cli/commands/roadmap.py, src/devops_cli/commands/roadmap_eval.py, CONTEXT.md]
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 25, 2026
Both work on the refine judge grade, but #5905 fixes the refusal count while the candidate adds a held-verdict marker tied to a later stage plan check.devops-cli-service commentedon Nov 25, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.