Repository navigation
Description
Split from #6360.
ProblemThe fix_checks job writes result lines with no tokens= field. devops roadmap eval grades shows no efficiency for fix_checks.## Why deferredThe model repair runs in the agent container of a Kubernetes Job. log_job_result(RoadmapJob.FIX_CHECKS, ...) runs later in _report in the service container. _report makes no model call. The token count must cross containers and pods into FixChecksReport or the item job record. Then it must reach fix_checks_row._report. That change is outside #6360.## Acceptance criteria- The fix_checks job SHALL carry the token count of its model repair on each fix_checks result line as tokens=.- A test SHALL run one fix_checks report with a fake token count of 123. The result line SHALL contain tokens=123.- devops roadmap eval grades SHALL show a non-null efficiency value for fix_checks when its result lines carry tokens=.
Proposed design
Problem statement
fix_checks result lines have no tokens= field. devops roadmap eval grades shows no efficiency for fix_checks. The model repair runs in the agent container. _report runs in the service container and makes no model call. The token count must cross the container boundary into FixChecksReport and reach fix_checks_row._report.
Acceptance criteria
Requirement: Fix-checks result line carries the repair token count
The fix_checks job SHALL write the token count of its model repair on each fix_checks result line as tokens=<n>.
Scenario: Report with a repair token count
- WHEN A test runs
fix_checks_row._reportwith a repair result that hastokens=123. - THEN The result line that
log_job_resultreceives containstokens=123.
Requirement: Report serializes tokens
FixChecksReport.to_json SHALL write tokens=<n> when the report has a token count.
Scenario: Report with tokens
- WHEN A test builds a
FixChecksReportwithtokens=123and callsto_json(). - THEN The JSON string contains
tokens=123.
Requirement: Report omits absent tokens
FixChecksReport.to_json SHALL omit the tokens= field when the report has no token count.
Scenario: Report with no tokens
- WHEN A test builds a
FixChecksReportwith notokensvalue and callsto_json(). - THEN The JSON string contains no
tokens=field.
Requirement: Eval grades shows fix_checks efficiency
devops roadmap eval grades SHALL show a non-null efficiency value for fix_checks when its result lines carry tokens=.
Scenario: Grades from a result line with tokens
- WHEN A test feeds the grades parser a fix_checks result line with
tokens=123. - THEN The efficiency value for fix_checks is not null.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers a tokens= field on this repository's own roadmap result line. The change is internal code. Written cost: about 12,000 tokens to build, 3,000 tokens to keep, 5,000 tokens to fix, and about 4 hours of elapsed time.
Key questions
- Where does the token count cross from the
agentcontainer to theservicecontainer?: Theagentcontainer writes the token count into the repair result on the shared pod volume._reportreads that result and sets the count onFixChecksReport. A shared file needs no Valkey credentials and is testable offline. (best practice) [sources: src/devops_cli/roadmap/steps/fix_checks.py, src/devops_cli/roadmap/fix_checks_row.py, src/devops_cli/roadmap/steps/fix_checks_phases.py, openspec/specs/roadmap-implement-job/record/spec.md]- Chosen: Repair result on the shared pod volume. The
agentcontainer and theservicecontainer share the pod volume, and a file needs no Valkey credentials. - Rejected: Valkey item job record. A runner Job may lack Valkey credentials, as the record spec notes.
- Rejected: Agent container log. Log parsing is fragile and needs the Kubernetes API in the test.
- Chosen: Repair result on the shared pod volume. The
- Which object carries the token count into the result line?:
FixChecksReportgets atokensfield.to_jsonwritestokens=<n>when the field is set. The result line then carries the count to every caller. (best practice) [sources: src/devops_cli/roadmap/steps/fix_checks.py:120, src/devops_cli/roadmap/fix_checks_row.py:131]- Chosen: Add
tokenstoFixChecksReport. The result line is built fromFixChecksReport.to_json, so one field reaches every writer. - Rejected: Append the text in
_report. A second writer would duplicate the format and miss other callers.
- Chosen: Add
- What does
_reportdo when the repair result has no token count?:_reportwrites notokens=field when the repair result has no token count.FixChecksReport.to_jsonomits the field. A missing count is not zero. (best practice) [sources: src/devops_cli/roadmap/steps/fix_checks.py:120, src/devops_cli/roadmap/fix_checks_row.py:131]- Chosen: Omit the field. A missing count is not zero, and the eval grades must not read a false value.
- Rejected: Write
tokens=0. A zero would hide a missing count and distort the efficiency.
- Which result-line field does
devops roadmap eval gradesneed for a non-null efficiency for fix_checks?: The fix_checks result line carriestokens=. The grades parser reads that field. The test feeds a fix_checks result line withtokens=123and asserts a non-null efficiency. [sources: docs/roadmap/job-success.md, src/devops_cli/roadmap/fix_checks_row.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 25, 2026
Both add tokens= to fix_checks result lines, but #6360 covers five jobs while the candidate is the fix_checks-only split.devops-cli-service commentedon Nov 25, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
fix(roadmap): log tokens on fix-checks result lines (#7151)
fix(roadmap): log tokens on fix-checks result lines (#7151)
devops-cli-service commentedon Nov 29, 2026
Released in v0.247.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.247.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 16:17 UTC