Repository navigation
Description
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:
attempt: the attempt count across the retry layers that exist (the model client, the unit and the row). The sweep layer of feat(roadmap): run the reconcile sweep on a cluster schedule #4574 adds to the same count later.class: the end class of the attempt, withevicted,deadlineandoomfor a killed attempt (fix(roadmap): read the pod status to find an out-of-memory kill #3727, fix(roadmap): an evicted fix-plan attempt does not count against its head #5493).extensions: the progress extensions that the attempt used (feat(roadmap): track progress-aware caps and fix-before-refuse #4843, feat(roadmap): make the attempt limits of the failing jobs settings #5440).pipeline: the pipeline version. It is a constant that changes when a job or a predicate changes, not the release version.unit: the unit name when a pod ran the attempt.
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,classandpipeline.
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_resultand parses the emitted line - THEN the line holds
pipelineequal todevops_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 to0.0.1and one line with it set to0.0.2 - THEN both parsed lines hold the same
pipelinevalue
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_resultwith nounitargument 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
pipelineandunit
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 islog_job_resultinsrc/devops_cli/roadmap/job_result.py. The attempt context holds the counters.openspec/specs/roadmap-service-logs/spec.mdstates the fields of the line, anddocs/roadmap/job-success.mdstates how a query reads them. The test istests/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
tokensandcost_usd_micros?: Yes.AttemptContextholdstokensandcost_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
classfield hold?: It holdsFailureClassornone. A deadline kill writesclass=timeoutandkill=deadline. An evicted attempt writes no result line. A newclassvalue 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
attemptandextensionsalready name counts?: Yes.FIRST_PASSusesattemptas a count forFIX_CHECKSandextensionsas a count forIMPLEMENT. 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-17states that the pod mounts no service account token and cannot readDisruptionTarget. 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
pipelineandunit. It defersattempt,classandextensionsto 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
FailureClasstelemetry and theFIX_CHECKSandIMPLEMENTcounts. - 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
pipelinefield keep a version that changes with a job or a predicate, and not with the release?: Keep one hand-set constantPIPELINE_VERSIONinsrc/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 keep0. (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.
- Chosen: A fixed placeholder
- How does a pod give its unit name to the writer?: Add an optional
unitargument tolog_job_result. A pod caller passes the unit name that it knows. The writer writesunit=-when the caller gives no name. (best practice) [sources: src/devops_cli/roadmap/job_result.py]- Chosen: An optional
unitargument tolog_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
namesmapping only. The writer then cannot add a defaultunit=-without a duplicate key.
- Chosen: An optional
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 13, 2026
Both add fields to the same roadmap job result line, but #5168 delivers tokens and cost_usd_micros while the candidate delivers attempt, class, extensions, pipeline and unit.devops-cli-service commentedon Nov 17, 2026
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:
roadmap job result:line is the project's own code (feat(roadmap): log one result line for each roadmap job attempt #4845, feat(roadmap): result lines state first-pass, model calls and cost #5168)Searches run:
Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.
4 remaining items
devops-cli-service commentedon Nov 25, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
feat(roadmap): result lines state pipeline and unit (#5500)
chore(main): release 0.235.0 (#7597)
devops-cli-service commentedon Nov 28, 2026
Released in v0.235.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.235.0
devops-cli-service commentedon Nov 28, 2026
Live since 2026-11-28 17:56 UTC