Skip to content

feat(roadmap): report pipeline outcomes in roadmap explain #3217

Closed

Description

@devops-cli-service

Split from #3069.

devops roadmap explain prints yes or no and the first rule that stops the stage job and the implement job. It reports no outcome counts, durations, repair rounds or tokens. The dashboard panel agreement with explain cannot be tested. This part is deferred until explain reports pipeline outcomes. Acceptance criteria: devops roadmap explain SHALL report outcome counts, durations, repair rounds and tokens for one item. A test SHALL compare each dashboard panel value with the explain output for a fixture item. The test SHALL fail when a panel value differs from the explain output.

Proposed design

Problem statement

devops roadmap explain reports yes or no for each job and the first rule that stops it. It gives no totals of the last implement run: no outcome counts, no duration, no repair rounds and no tokens. This item adds those totals to the text output and to a JSON object under --json. A person and a test then read the same values. The dashboard panel agreement test leaves this item. The panels are totals by repository and class, so no panel value equals one item's value.

Acceptance criteria

Requirement: Totals of the last implement run

devops roadmap explain SHALL report the token total, the seconds total, the repair-round count and the outcome counts of the last implement run of the item.

Scenario: Totals of a fixture run

  • WHEN the job record of the fixture item holds a trace with one model event of 1200 input tokens, 300 output tokens and 90 seconds, and two attempt events, the first with outcome failed and next repair, the second with outcome passed and next stop
  • THEN the output reports 1500 tokens, 90 seconds, 1 repair round, 1 failed outcome and 1 passed outcome.

Requirement: JSON object with the totals

devops roadmap explain SHALL give the same totals as a JSON object when it runs with --json.

Scenario: The JSON object agrees with the text

  • WHEN the command runs with --json on the fixture item
  • THEN the JSON object holds tokens_total 1500, seconds_total 90, repair_rounds 1 and outcomes with 1 failed and 1 passed, and the text output holds the same values.

Requirement: Item with no recorded run

devops roadmap explain SHALL state that the item has no recorded implement run when the job record holds no trace.

Scenario: No trace in the record

  • WHEN the job record of the fixture item holds no implement.trace value
  • THEN the output states that the item has no recorded run and gives no totals, and the JSON object gives null for each total.

Requirement: Dropped events beside the totals

devops roadmap explain SHALL state the number of events that the trace bound dropped beside the totals.

Scenario: Trace with dropped events

  • WHEN the trace of the fixture item reports 12 dropped events
  • THEN the output names 12 dropped events and says that the totals leave them out.

Requirement: No model call and no write

devops roadmap explain MUST report the totals with no model call and no write to GitHub or git.

Scenario: A run that reports totals

  • WHEN the command reports the totals of the fixture item and the model client refuses every call
  • THEN the command gives the totals and the store records no write.

Existing Tool Considered

No alternatives check has run. jq is the nearest open, maintained tool. It sums the fields of a JSON document offline. It does not read the job record of the item from the issue body or render the text and JSON of the command. The change extends src/devops_cli/roadmap/explain.py and src/devops_cli/commands/roadmap.py. Written cost: about 12k tokens to build the report and its JSON object. It takes 3k tokens a year to keep and fix it, and about half a day of elapsed time.

Key questions

  • What does devops roadmap explain print today?: It prints yes or no for the refine, stage and implement jobs. Each line gives the reason of the first rule that stops the job, and the implement job also gives its effort line. --trace prints one line for each event of the last implement run. Each line gives the tokens, seconds, retries and attempts, and the output gives the count that the bound dropped. [sources: src/devops_cli/roadmap/explain.py, src/devops_cli/commands/roadmap.py, tests/roadmap/test_roadmap_explain.py]
  • Does the job record hold a history of the runs of one item?: No. StageRecordKey and ImplementRecordKey hold the last run only. The record holds the trace and the spend of the last implement run, and the failed time of the last stage run. It holds no per-run outcome count, duration or token total. [sources: src/devops_cli/roadmap/store.py, src/devops_cli/roadmap/explain.py]
  • What does the trace of the last implement run hold for outcomes, tokens and seconds?: Each model event holds tokens_in, tokens_out and seconds. Each attempt event holds an outcome of passed or failed and a next of repair or stop. The trace also holds the count of earlier events that the bound dropped. A sum over its events leaves those events out. [sources: src/devops_cli/roadmap/implement_trace.py]
  • Does this item need a per-item run history?: No. The trace of the last implement run holds the outcome counts, the seconds, the repair rounds and the tokens of that run. The totals read the trace, so the item needs no history store and no other item. (best practice) [sources: src/devops_cli/roadmap/implement_trace.py, src/devops_cli/roadmap/store.py]
    • Chosen: Build the totals from the trace of the last run. The record already holds the trace, so the item needs no new store and no other item.
    • Rejected: Add a per-item run history first. It adds a store of its own and does not fit the pull request that adds the totals.
  • How does explain give the totals so a test compares them exactly?: It gives a JSON object under --json beside its text output. The test reads the JSON object, and a person reads the text output. (best practice) [sources: src/devops_cli/commands/roadmap.py, src/devops_cli/roadmap/explain.py]
    • Chosen: A JSON object under --json beside the text output. The test compares each value exactly and does not parse prose, and plan-check, plan-recheck and implement already carry the option.
    • Rejected: Text output only. The test would parse prose and break on a wording change.
    • Rejected: JSON only. A person reads the text output of the command.
  • How does explain count a repair round?: It counts the attempt events of the trace whose next is repair. The trace of the last run holds them, so the count needs no new record and no other item. (best practice) [sources: src/devops_cli/roadmap/implement_trace.py, src/devops_cli/roadmap/explain.py]
    • Chosen: Count the attempt events whose next is repair. The attempt event marks each repair round of a step, and the record already holds the trace.
    • Rejected: Read a repair-round count that feat(roadmap): metrics for the pipeline outcomes #3069 records. No such count is in the record today, and the item would wait on another item for a value that the trace holds.
    • Rejected: Count the retry events. A retry event is also a send again of a model request, so it is not a repair round.
  • How does explain count an outcome?: It counts the attempt events of the trace by their outcome field: passed and failed. (best practice) [sources: src/devops_cli/roadmap/implement_trace.py]
    • Chosen: Count the attempt events by outcome. The attempt event names the outcome of the step, and the record already holds the trace.
    • Rejected: Count the check events by status. A check event is one command, not the outcome of a step.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-06: partly.
Tool: jqlang/jq (https://github.com/jqlang/jq), NOASSERTION, last activity 2026-11-02, maintained.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 2, 2026
  2. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    ContributorAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Improves observability and enables dashboard agreement tests but does not block delivery.
    • Value: Medium. Enables verification that dashboard panels match CLI output for one item.
    • Effort: Medium. Add four output fields to an existing command and write one comparison test.
    • Related: feat(roadmap): metrics for the pipeline outcomes #3069, which asks for a different change. Both cover pipeline outcome metrics; #3069 delivers dashboards and alerts, the candidate delivers CLI output in 'devops roadmap explain'.
  3. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    ContributorAuthor

    Refine cannot set this item to Ready at b39dcba until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • Which file holds the roadmap dashboard panel and its expression? (missing verified source)
  4. dan-petty commented on Nov 6, 2026

    @dan-petty
    Owner

    Returned to New under AGENTS.md rule 2: the item cannot be built as written. Two reviewers read the code of origin/main on 2026-11-06 and agreed.

    Evidence

    The data that explain would report does not exist per item. src/devops_cli/roadmap/store.py StageRecordKey and ImplementRecordKey hold the last run only (implement.spend, implement.trace of the last run, stage.failed_at). There is no stage run history, no outcome count and no per-run duration. #3076 was returned for the same reason: 'no source holds a history of runs'. The scenario 'two stopped stage runs and one passed' has no source. The repair-round count is not in the job record yet either; #3069 adds it. #3069 also forbids an issue number in a metric label, so a panel value is a total by repo and class and cannot equal an explain value for one item. 'devops roadmap explain --trace' (#3355) already prints tokens, seconds, retries and attempts for the last implement run, so the 'prints only yes or no' claim is partly false.

    Re-scope for refinement

    As written (outcome counts, durations, repair rounds and tokens for one item, and a test that each dashboard panel equals the explain output) it cannot be built: no per-item run history exists, and the panels, once #3069 and #3655 land, are aggregates. Under AGENTS.md rule 2, return it to New with this evidence (devops roadmap return 3217 --comment ... --confirm). Suggested re-scope: (a) after #3069 records repair rounds in the job record, add the totals of the last implement run (tokens, seconds, repair rounds) to explain, with --json; (b) leave the panel-to-record test to #3655, whose own acceptance criteria already hold 'a test evaluates the panel queries on fixture series of a sample item and compares each value with the job record'; (c) if a run history per item is wanted, file it as its own item with a cost note.

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

    @devops-cli-service
    ContributorAuthor

    Refine cannot set this item to Ready at c714551 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/store.py.

  6. added
    status/ready
    and removed
    status/new
    on Nov 6, 2026
  7. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    ContributorAuthor

    Status set to Ready at 235a807 (see proposed design in issue body).

    Moved to new items: #3851.

  8. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    ContributorAuthor

    Alternatives check: partly

    Tool: jqlang/jq (https://github.com/jqlang/jq)

    • License: NOASSERTION
    • Last activity: 2026-11-02
    • Maintained: yes

    Covers:

    • Aggregates the numeric fields of a JSON document offline: it adds values and counts items of an array, which is the arithmetic behind tokens_total, seconds_total, repair_rounds and the outcome counts

    Lacks:

    • Does not read the job record of the item from the issue body, so it cannot obtain the trace of the last implement run by itself
    • Does not know the trace semantics: that an attempt event's outcome is the outcome and that next: repair is a repair round
    • Does not render the text output or the --json object of devops roadmap explain
    • Does not report dropped events beside the totals or the 'no recorded run' state of an item

    Searches run:

    • jq command line JSON processor sum fields aggregate
    • jq add filter sum array of numbers reduce
    • jq JSON processor
    • sum JSON fields offline tool command line

    Sources:

    Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.

  9. 12 remaining items

  10. added
    status/blocked
    and removed
    status/in-progress
    on Nov 7, 2026
  11. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    ContributorAuthor

    The runner Job devops-cli-runner-20261107-084504-8cdf ended: succeeded.
    Image digest: sha256:a12d8a3601a2f9803ba6a7f77fe19fdcc27a4de30944a1e65fc19d08808e9eff

    The last lines of its log:

    Tool call: shell, started: uv run python -c <masked>
    Tool call: shell, program uv, refused.
    Tool call: shell, started: uv run python -c <masked>
    Tool call: shell, program uv, refused.
    Tool call: shell, started: uv run python -c <masked>
    Tool call: shell, program uv, ok.
    Tool call: write_file, ok.
    Tool call: shell, started: uv run --env-file .data/agent/scratch/pod.env devops ci ...
    Tool call: shell, program uv, ok.
    Tool call: read_file, ok.
    Tool call: edit_file, ok.
    Tool call: shell, started: uv run --env-file .data/agent/scratch/pod.env devops ci ...
    Tool call: shell, program uv, ok.
    Tool call: shell, started: uv run --env-file .data/agent/scratch/pod.env devops ci ...
    Tool call: shell, program uv, ok.
    Tool call: shell, started: uv run --env-file .data/agent/scratch/pod.env devops ci ...
    Tool call: shell, program uv, ok.
    Tool call: shell, started: grep -rn isolate_gh_config\\|isolate_ssh_agent tests/ --include=<masked> | ...
    Tool call: shell, started: uv run ruff check tests/conftest.py
    Tool call: shell, program grep, ok.
    Tool call: shell, program uv, ok.
    Tool call: shell, started: grep -rn autouse tests/invariants/*.py docs/TESTING.md | ...
    Tool call: shell, program grep, ok.
    Tool call: read_file, ok.
    Tool call: shell, started: grep -rn DEVOPS_CLI_DRY_RUN\\|HOME\\|KUBECONFIG docs/TESTING.md | head ...
    Tool call: shell, program grep, ok.
    Tool call: shell, started: tail -c 1200 /home/devops/.data/agent/worktrees/w-3217/.pydantic-ai-harness/shell/085ca331f8a0451192d27564141ac5c5/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: cat /home/devops/.data/agent/worktrees/w-3217/.pydantic-ai-harness/shell/085ca331f8a0451192d27564141ac5c5/status.json
    Tool call: shell, started: wc -l /home/devops/.data/agent/worktrees/w-3217/.pydantic-ai-harness/shell/085ca331f8a0451192d27564141ac5c5/output.log
    Tool call: shell, program cat, ok.
    Tool call: shell, program wc, ok.
    Tool call: read_file, ok.
    Tool call: shell, started: tail -c 800 /home/devops/.data/agent/worktrees/w-3217/.pydantic-ai-harness/shell/085ca331f8a0451192d27564141ac5c5/output.log
    Tool call: shell, program tail, ok.
    Tool call: shell, started: git diff
    Tool call: shell, program git, ok.
    Failure class limit_reached. Action left: raise_limit.
    ✓ Took 0 item(s) to a ready pull request, stopped 1.
    Elapsed: 42m 32s
    
  12. removed
    owner/service
    on Nov 7, 2026
  13. added
    status/in-review
    and removed
    status/blocked
    on Nov 7, 2026
  14. removed
    status/in-review
    on Nov 7, 2026
  15. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    ContributorAuthor

    Live since 2026-11-07 15:48 UTC

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/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions