Skip to content

fix(roadmap): find why a verify screen decision has no outcome record #6181

Open

Description

@devops-cli-service

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 to on and a fake decision model that gives the band continue.
  • THEN The test finds exactly one decision outcome line 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 on and a fake decision model that gives the band review.
  • THEN The test finds exactly one decision outcome line 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 on and a fake decision model that gives the band continue.
  • THEN The line parses as JSON and holds the decision identifier, the point stage.verify_screen, must_run false, weight 0 and result skipped.

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 band review, and a fake review that returns one open finding.
  • THEN The outcome line holds result found, must_run true and weight 1.

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 on and the band continue, _run_review returns before the review runs, so it never calls record_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 outcome JSON line of OutcomeRecord. 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 outcome JSON line of OutcomeRecord. 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.
  • What should the outcome line of a decision that stops before the review hold?: must_run false, weight 0 and result skipped. The review path keeps found when the review found an open defect and clean when it found none. (best practice) [sources: src/devops_cli/roadmap/decision_point.py:236, src/devops_cli/roadmap/stage/stage_jev_screen.py]
    • Chosen: skipped with must_run false and weight 0. The record names the real result, that the review did not run, and it stays distinct from a review that ran clean.
    • Rejected: clean with must_run false and weight 0. It claims that the review ran and found no open defect, which is false on the skip path.
    • Rejected: found with must_run true and weight 0. It claims a defect that no review found.
  • Where should the code write the outcome line so that each return path writes exactly one?: At the two exits of _run_review. A helper record_skip writes the skip outcome before the early return, and record_review keeps 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_review has 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.
  • What test must cover the verify screen decision point?: An offline unit test in tests/roadmap/stage/test_roadmap_stage_jev_screen.py runs the stage workflow with the screen in mode on and 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.

Dependencies

#6521

Activity

  1. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    ContributorAuthor
  2. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 17, 2026
  3. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  4. dan-petty commented on Nov 20, 2026

    @dan-petty
    Owner

    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.

  5. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    ContributorAuthor

    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.

  6. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions