Skip to content

feat(roadmap): result lines state attempt, class, pipeline and unit #5500

Done

Description

@dan-petty

Problem or Motivation

Issue #5168 adds tokens and cost_usd_micros to each roadmap job result: line. The approved pipeline split design (tracker #5482) needs more fields to grade the jobs and to compare attempts across retries, kills and pipeline changes. #5168 stays small, and this item adds the other fields after it.

Proposed Solution & Architectural Design

Add these fields to every roadmap job result: line:

The trial arm is not a field of this item: the trial field of #5177 holds it.

Target Subsystem

Roadmap Service and roadmap jobs (src/devops_cli/roadmap/, the result line writer).

Acceptance Criteria

  • Test first: a result line of each job holds the 5 fields. The test fails on the base.
  • A test: a killed attempt writes its class from the pod status.
  • A test: a second attempt of one item after a retry states attempt=2.
  • Live proof: after the merge and the release, the stage, refine, intake and fix-plan jobs run as the App. A comment on this issue gives one result line of each with attempt, class and pipeline.

Existing Tool Considered

The result line writer of #4845 and #5168 exists. No open tool gives these fields. Build: 100,000 to 250,000 agent tokens and 0.5 day.

Related

Tracker #5482, Phase 1. Depends on #5168, #3727 and #5493. #5479 (the config id of the limit settings; pipeline covers the code of the jobs and predicates), #5177 (the trial field), #5437 (one run id for each agent run), #5494.

Source: #5482

Alternatives check of 2026-11-23: none.
Tool: none found.
Reason: Searches returned only generic telemetry-pipeline images (OpenTelemetry Collector/Operator), which ship telemetry but do not compute an attempt count, end class, extensions, pipeline version or unit for the project's result line, so the writer itself must gain the fields.

Lacks:

  • No attempt count across the model, unit and row retry layers
  • No end class such as evicted, deadline or oom from pod status
  • No pipeline version constant or unit name on a result line

Proposed design

Problem statement

Each roadmap job result: line does not state the pipeline version or the unit of work. A query cannot compare attempts across pipeline changes or pods. The existing class, attempt and extensions keys already hold other values, and the pod status cannot give the kill class. This item adds the pipeline and unit fields. Deferred issues hold the attempt count, the kill class and the progress extensions.

Acceptance criteria

Requirement: Pipeline version field

Each roadmap job result: line SHALL hold the pipeline field with the value of PIPELINE_VERSION.

Scenario: The writer states the pipeline constant

  • WHEN a test calls log_job_result and parses the emitted line
  • THEN the line holds pipeline equal to devops_cli.roadmap.job_result.PIPELINE_VERSION

Requirement: Pipeline version is not the release version

The pipeline field MUST NOT change when the devops-cli release version changes.

Scenario: A release version change keeps the pipeline

  • WHEN a test renders one line with devops_cli.roadmap.job_result.__version__ set to 0.0.1 and one line with it set to 0.0.2
  • THEN both parsed lines hold the same pipeline value

Requirement: Unit name field

The unit field SHALL hold the unit name when the caller gives one.

Scenario: A pod run states its unit

  • WHEN a test calls log_job_result(..., unit="stage-123") and parses the emitted line
  • THEN the line holds unit=stage-123

Requirement: Fixed text placeholder

A text field with no value MUST hold -.

Scenario: No unit name

  • WHEN a test calls log_job_result with no unit argument and parses the emitted line
  • THEN the line holds unit=-

Requirement: Every job writes the new fields

Every RoadmapJob member SHALL write the pipeline and unit fields on its result line.

Scenario: Each job writes both fields

  • WHEN a test renders one result line for each member of RoadmapJob
  • THEN each parsed line holds the keys pipeline and unit

Existing Tool Considered

The alternatives check of 2026-11-23 in the issue body gives the verdict none and names no tool: no open, maintained tool covers the result-line fields. The change extends the project's own writer in src/devops_cli/roadmap/job_result.py with pipeline and unit. The issue gives the written cost for the full field set: 100,000 to 250,000 agent tokens and 0.5 day. The re-scoped part costs less.

Key questions

  • Which module writes the roadmap job result: line, and where are its fields stated?: The writer is log_job_result in src/devops_cli/roadmap/job_result.py. The attempt context holds the counters. openspec/specs/roadmap-service-logs/spec.md states the fields of the line, and docs/roadmap/job-success.md states how a query reads them. The test is tests/roadmap/test_roadmap_attempt_context.py. [sources: src/devops_cli/roadmap/job_result.py, openspec/specs/roadmap-service-logs/spec.md, docs/roadmap/job-success.md, tests/roadmap/test_roadmap_attempt_context.py]
  • Does the writer already hold tokens and cost_usd_micros?: Yes. AttemptContext holds tokens and cost_usd_micros, and the living spec lists them. The item does not depend on feat(roadmap): result lines state first-pass, model calls and cost #5168. [sources: src/devops_cli/roadmap/job_result.py, openspec/specs/roadmap-service-logs/spec.md]
  • What does the existing class field hold?: It holds FailureClass or none. A deadline kill writes class=timeout and kill=deadline. An evicted attempt writes no result line. A new class value would break the failure telemetry. [sources: src/devops_cli/roadmap/job_result.py, openspec/specs/roadmap-stage/fix-plan/spec.md:272-283, src/devops_cli/roadmap/steps/fix_plan.py:1299-1307, docs/roadmap/job-success.md:36]
  • Do attempt and extensions already name counts?: Yes. FIRST_PASS uses attempt as a count for FIX_CHECKS and extensions as a count for IMPLEMENT. A new field with either name would collide with the count. [sources: src/devops_cli/roadmap/job_result.py]
  • Can the writer read the kill class from the pod status?: No. src/devops_cli/roadmap/attempt_kill.py:15-17 states that the pod mounts no service account token and cannot read DisruptionTarget. The time budget of the step gives the class. [sources: src/devops_cli/roadmap/attempt_kill.py:15-17]
  • How does the proposal handle the fields that conflict with existing result-line keys?: It adds pipeline and unit. It defers attempt, class and extensions to new issues. (best practice) [sources: src/devops_cli/roadmap/job_result.py, src/devops_cli/roadmap/attempt_kill.py:15-17, docs/roadmap/job-success.md:36]
    • Chosen: Add pipeline and unit; defer attempt, class and extensions. The existing keys hold other values, and the pod status cannot give the kill class. The rest is workable in one pull request.
    • Rejected: Add all five fields and change the existing keys. This breaks FailureClass telemetry and the FIX_CHECKS and IMPLEMENT counts.
    • Rejected: Add no field and close the item. The pipeline and unit fields do not conflict, and the approved design needs them.
  • How does the pipeline field keep a version that changes with a job or a predicate, and not with the release?: Keep one hand-set constant PIPELINE_VERSION in src/devops_cli/roadmap/job_result.py. Bump it in the pull request that changes a job or a predicate. (best practice) [sources: docs/roadmap/job-success.md, src/devops_cli/roadmap/job_result.py]
    • Chosen: A hand-set constant in the result module. One value changes on purpose with a job or a predicate, and a query compares two pipelines. The release version is already on the line.
    • Rejected: A hash of the job code at build time. The hash changes with a comment or a refactor that changes no behavior, so it does not grade a pipeline.
    • Rejected: The release version. The line already ends with the devops-cli version, and a release carries changes that touch no job.
  • What does a text field hold when the attempt has no value, such as no unit name?: The field holds -. The line keeps a fixed field set for queries, as the numeric fields keep 0. (best practice) [sources: src/devops_cli/roadmap/job_result.py]
    • Chosen: A fixed placeholder -. The line keeps one field set, and a query reads each field with no branch.
    • Rejected: Leave the field out of the line. The field set then changes between lines, and a query needs a branch for each missing field.
    • Rejected: An empty string. A reader cannot tell a missing value from a value that a defect dropped.
  • How does a pod give its unit name to the writer?: Add an optional unit argument to log_job_result. A pod caller passes the unit name that it knows. The writer writes unit=- when the caller gives no name. (best practice) [sources: src/devops_cli/roadmap/job_result.py]
    • Chosen: An optional unit argument to log_job_result. The writer stays pure, and each pod caller passes the name it knows.
    • Rejected: Read a new environment variable in the writer. No such variable exists in the repository, and the writer would hide the source.
    • Rejected: Use the existing names mapping only. The writer then cannot add a default unit=- without a duplicate key.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Moved to new items

#6260, #7077, #7078, #7079

Activity

  1. added
    source/agent
    on Nov 13, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 13, 2026
  3. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 13, 2026
  5. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: Searches for a tool that records attempt count, end class, progress extensions, pipeline version and unit name in per-job result records returned only unrelated documentation pages; no open tool or library covers these fields. The fields come from this project's own retry layers, pod status classes, extension registry, pipeline constant and unit names, and the issue states the result line writer of #4845/#5168 is in-repo, so the change is a small extension of that writer.

    Tool: none found

    Lacks:

    Searches run:

    • library that logs pipeline version and attempt number per job run record, results: 5
    • open source tool records job attempt count and pipeline version in result lines, results: 5
    • OpenLineage run event job version facet attempt number record, results: 5
    • MLflow tags attempt number pipeline version per run metadata, results: 5
    • OpenLineage github repository, results: 5
    • Argo Workflows retry attempt number in pod metadata, results: 5

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

  6. added
    status/ready
    and removed
    status/new
    on Nov 18, 2026
  7. 4 remaining items

  8. added
    status/ready
    and removed
    status/new
    on Nov 25, 2026
  9. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.

  10. added
    owner/agent
    status/in-progress
    and removed
    status/ready
    on Nov 28, 2026
  11. added
    status/in-review
    and removed
    status/in-progress
    on Nov 28, 2026
  12. removed
    status/in-review
    owner/agent
    on Nov 28, 2026
  13. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-28 17:56 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