Repository navigation
Description
Split from #5273.
Problem of the part 5 decisions have no outcome record: on #3049, #4481 two times, #5107 and #5118. Prometheus counts 4 decisions of the Job roadmap-fix-plan-validation with no line in Loki. No one knows the cause. The bar of ADR 0020 counts labelled outcomes only, so each missing record delays it.## Why it is deferred part. The cause is in the live Service logs and the Loki streams of the cluster. No offline test reads them, and the live logs are outside this repository. #5273 makes the gap visible: its report counts each decision with no outcome as not labelled. A read of the live logs settles the cause.## Acceptance criteria issue names the cause of each missing outcome, with the LogQL query that shows it. A test shows that the point writes one outcome line for each decision, including a decision that stops before the review. A live check over one day shows the count of decisions equal to the count of outcome lines.
Proposed design
Problem statement
The verify screen decision point can skip the review and return with no outcome line. A decision with no outcome line delays the labelled-outcome bar of ADR 0020. This change writes exactly one outcome line on each exit of the decision point. An offline test asserts the line on the skip path and on the review path. The live cause of the five missing records goes to a new issue.
Acceptance criteria
Requirement: Outcome line on the skip path
The verify screen decision point SHALL write exactly one outcome line for a decision whose band is continue in mode on and that skips the review.
Scenario: Decision stops before review
- WHEN The offline unit test runs the stage workflow with
roadmap.decisions["stage.verify_screen"]set toonand a fake decision model that gives the bandcontinue. - THEN The test finds exactly one
decision outcomeline for that decision.
Requirement: Outcome line on the review path
The verify screen decision point SHALL write exactly one outcome line for a decision whose band runs the review.
Scenario: Decision reaches review
- WHEN The offline unit test runs the stage workflow with the screen in mode
onand a fake decision model that gives the bandreview. - THEN The test finds exactly one
decision outcomeline for that decision.
Requirement: Outcome line fields on the skip path
The outcome line SHALL be the existing decision outcome JSON line of OutcomeRecord and MUST hold the decision identifier, the point stage.verify_screen, must_run, weight and result.
Scenario: Skip result
- WHEN The offline unit test runs the stage workflow on a plan with the screen in mode
onand a fake decision model that gives the bandcontinue. - THEN The line parses as JSON and holds the decision identifier, the point
stage.verify_screen,must_runfalse,weight0 andresultskipped.
Requirement: Review result unchanged
The review path SHALL keep result found with the count of open findings, and result clean with weight 0 when the review finds no open defect.
Scenario: Review finds one open defect
- WHEN The offline unit test runs the stage workflow with the screen in mode
on, a fake decision model that gives the bandreview, and a fake review that returns one open finding. - THEN The outcome line holds
resultfound,must_runtrue andweight1.
Existing Tool Considered
No alternatives check has run. No open, maintained tool covers this need: the change writes one line in the project's own stage workflow. Build cost: about 10 lines and one test, about 3,000 tokens to build, about 1,000 tokens a year to keep and fix, and about two hours. Grafana Loki with LogQL, which src/devops_cli/k8s/logql.py queries, covers the live log search in the deferred issue. Loki lacks a view of the decision point: it reads only a line that the code writes.
Key questions
- Which return path of the verify screen decision point writes no outcome line?: The path that skips the review. With the mode
onand the bandcontinue,_run_reviewreturns before the review runs, so it never callsrecord_review, which writes the line. [sources: src/devops_cli/roadmap/stage/stage.py:2399, src/devops_cli/roadmap/stage/stage_jev_screen.py] - What format should the outcome line use?: Use the existing
decision outcomeJSON line ofOutcomeRecord. Add no new format. (best practice) [sources: src/devops_cli/roadmap/decision_point.py:236, tests/roadmap/test_roadmap_decision_point.py]- Chosen: Existing
decision outcomeJSON line ofOutcomeRecord. The join reads this record today, and Loki parses this line today. - Rejected: A new log format. It needs new parsing, and no project decision names it.
- Rejected: A plain text line. It loses the decision identifier and the fields that the join needs.
- Chosen: Existing
- What should the outcome line of a decision that stops before the review hold?:
must_runfalse,weight0 andresultskipped. The review path keepsfoundwhen the review found an open defect andcleanwhen it found none. (best practice) [sources: src/devops_cli/roadmap/decision_point.py:236, src/devops_cli/roadmap/stage/stage_jev_screen.py]- Chosen:
skippedwithmust_runfalse andweight0. The record names the real result, that the review did not run, and it stays distinct from a review that ran clean. - Rejected:
cleanwithmust_runfalse andweight0. It claims that the review ran and found no open defect, which is false on the skip path. - Rejected:
foundwithmust_runtrue andweight0. It claims a defect that no review found.
- Chosen:
- Where should the code write the outcome line so that each return path writes exactly one?: At the two exits of
_run_review. A helperrecord_skipwrites the skip outcome before the early return, andrecord_reviewkeeps the review outcome after the review. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py:2399, src/devops_cli/roadmap/stage/stage_jev_screen.py]- Chosen: At the two exits of
_run_review. The outcome depends on whether the review ran, and_run_reviewhas two exits; each exit writes its own line. - Rejected: At the single exit of the decision point. The decision point returns the band before the review, so it cannot know the result of the review.
- Rejected: In each band handler. A handler that returns early skips the line, which is the defect.
- Rejected: In each caller. Callers vary, and one caller that forgets loses the line again.
- Chosen: At the two exits of
- What test must cover the verify screen decision point?: An offline unit test in
tests/roadmap/stage/test_roadmap_stage_jev_screen.pyruns the stage workflow with the screen in modeonand a fake decision model. It asserts one line on the skip path and one line on the review path. (best practice) [sources: tests/roadmap/stage/test_roadmap_stage_jev_screen.py]- Chosen: Offline unit test at the stage workflow. It runs the skip path and the review path with a fake model, so CI covers both.
- Rejected: Live check only. A live check cannot isolate the skip path in CI.
- Rejected: No test. The missing line would return with no guard.
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 17, 2026
Both work on the verify screen decision records of ADR 0020, but #5273 defines the bar and recording, while the candidate finds the cause of missing outcome lines.devops-cli-service commentedon Nov 18, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
devops-cli-service commentedon Nov 21, 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 Dec 1, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.