Repository navigation
Description
Split from #5467.
The stage planner and the implement agent still look up the argument forms of devops ci check commands. The code issue adds a generated card and tests its forms, but no offline test can show the live counts, and the proof needs a release of the runner image and 7 days of real Service stage runs and runner runs. Acceptance criteria: count the lookups in stage comments for items outside the scopes ci and roadmap (baseline 17 of 21 items, 81 calls) and show that the stage_problem_command_reference gate returns; count the non-test devops ci forms in runner logs for each run (baseline 34 calls in 8 of 10 runs); use devops roadmap eval stage and devops roadmap eval implement as a screen only, with paired call counts as the primary measure; after release, show the same counts on real Service stage runs and runner runs for 7 days.
Proposed design
Problem statement
Add the offline counters, summaries and report now; defer the live 7-day proof until the runner image release. The stage planner and the implement agent still look up devops ci argument forms. No offline harness counts the stage_problem_command_reference lines in stage comments or the non-test devops ci forms in runner logs. This item adds the two counters, the two summaries, the report builder and a test that the citation gate returns.
Acceptance criteria
Requirement: Stage comment lookup count
The stage lookup counter SHALL return the number of lines in a stage comment that carry the finding code stage_problem_command_reference.
Scenario: Two command-reference lines and one other finding line
- WHEN A test passes a comment with two
stage_problem_command_referencelines and onefalse_premiseline tocount_stage_command_references. - THEN The call returns 2.
Requirement: Item scope filter
The measurement MUST leave out each item whose labels hold scope/ci or scope/roadmap.
Scenario: An item with a measured scope label
- WHEN A test passes the labels
scope/ciandscope/roadmaptoin_measurement_scopein two calls. - THEN Both calls return false, and the item stays out of the count.
Requirement: Citation gate return
command_citation_problems SHALL return one finding with the code stage_problem_command_reference for each cited devops form that does not resolve.
Scenario: Three cited forms that do not resolve
- WHEN A test calls
command_citation_problemswith text that holds threedevopscommand forms that do not resolve. - THEN The call returns three findings whose code is
stage_problem_command_reference.
Requirement: Runner log form count
The runner form counter SHALL count each devops ci form whose first word after ci that is not an option is not test.
Scenario: A test form with a prefix and a check form
- WHEN A test passes
uv run devops ci test --only lintanddevops ci --check --only k8stocount_runner_ci_forms. - THEN The call returns 1.
Requirement: Stage comment summary
The stage summary MUST return the count of items with a hit, the count of items in scope and the count of calls.
Scenario: Two items with a hit and one out-of-scope item
- WHEN A test passes three in-scope items with two, one and zero finding lines and one
scope/ciitem with five lines tosummarize_stage_comments. - THEN The call returns a measure with 2 items with a hit, 3 items and 3 calls.
Requirement: Runner log summary
The runner summary MUST return the count of runs with a hit, the count of runs in scope and the count of calls.
Scenario: Two runs with a hit and one run with no form
- WHEN A test passes three run texts with two, one and zero non-test
devops ciforms tosummarize_runner_logs. - THEN The call returns a measure with 2 runs with a hit, 3 runs and 3 calls.
Requirement: Report screen and primary sections
The report MUST put the eval output under a ## screen heading and the paired counts under a ## primary heading.
Scenario: A report with both sections
- WHEN A test passes the screen text
stage okand a baseline and a post-release measurement torender_measurement_report. - THEN The report holds
## screenbeforestage okand## primarybefore the count rows.
Requirement: Post-release comparison rows
The report SHALL show the baseline measure and the post-release measure beside each other for the stage comments and the runner logs.
Scenario: Baseline and post-release measures
- WHEN A test passes the baseline stage measure
17 of 21 items, 81 calls, the post-release stage measure3 of 21 items, 10 calls, the baseline runner measure8 of 10 runs, 34 callsand the post-release runner measure2 of 10 runs, 4 callstorender_measurement_report. - THEN The report holds the rows
| stage command references | 17 of 21 items, 81 calls | 3 of 21 items, 10 calls |and| runner ci calls | 8 of 10 runs, 34 calls | 2 of 10 runs, 4 calls |.
Existing Tool Considered
No alternatives check has run. ripgrep, devops gh and the Loki LogQL readers are open and maintained. ripgrep cannot read GitHub comments or Loki, and it cannot group a line to an item or a run. devops gh reads the comments, and job_result.py reads the runner lines. The change builds two small counters, two summaries and one report builder over that text. This costs about 40k tokens to build, keep and fix, and about 2 hours.
Key questions
- Which measure is primary for the proof?: The paired call counts are primary. They are the
stage_problem_command_referencelines in stage comments and the non-testdevops ciforms in runner logs. The eval commands are a screen only. (best practice) [sources: docs/ROADMAP_WORKFLOW.md, docs/guidelines/agentic-jobs.md]- Chosen: Paired call counts. They show the live behavior of the two agents.
- Rejected: Eval commands only. The eval scores recorded plans and fixtures, so it cannot show live counts.
- Rejected: Both as equal measures. The issue gives the eval commands the screen role.
- How does the measurement identify a stage command lookup?: It counts the lines of each stage comment that carry the finding code
stage_problem_command_reference. The citation gate returns that code for a citeddevopsform that does not resolve. (best practice) [sources: src/devops_cli/roadmap/stage/stage_commands.py:199, src/devops_cli/roadmap/stage/stage_change.py, docs/ROADMAP_WORKFLOW.md]- Chosen: Count the finding lines. The gate already returns the code, and the comment records it.
- Rejected: Free-text search for
devops ci. It counts valid citations and test commands, and it misses the finding code. - Rejected: Count all cited command lines. It counts valid citations that the gate does not flag.
- Which gate returns the command-reference finding?:
command_citation_problemsinsrc/devops_cli/roadmap/stage/stage_commands.pyreturns it.stage_change.pycalls it. [sources: src/devops_cli/roadmap/stage/stage_commands.py:199, src/devops_cli/roadmap/stage/stage_change.py] - How does the runner form counter exclude the test form?: It reads each
devops ciform and takes the first word aftercithat is not an option. It counts the form when that word is nottest. (best practice) [sources: docs/CLI_REFERENCE.md, docs/guidelines/agentic-jobs.md]- Chosen: The first non-option word after
ci. It reads the form of the command, so auv runprefix or an extra space changes nothing. - Rejected: Search for
devops ci test. Auv runprefix or another spelling of the test command misses the search. - Rejected: Count every
devops ciform. Test invocations would inflate the measure.
- Chosen: The first non-option word after
- Where does the measurement code live?:
tests/support/stage_command_measure.pyholds the two counters, the two summaries and the report builder. Its tests live intests/roadmap/stage/test_roadmap_stage_command_measure.py. (best practice) [sources: openspec/specs/pr-title-labels/spec.md, tests/support/builders.py]- Chosen: A test support module. It keeps runtime code out of a hidden title type, and the tests import it as the other support modules.
- Rejected: A new module in
src/devops_cli/roadmap/stage/. A hidden title type ships no runtime code, so the check refuses it. - Rejected: A shell script. No offline test asserts the counts of a shell script.
- Which labels put an item outside the measurement?: An item is outside the measurement when its labels hold
scope/ciorscope/roadmap. [sources: .github/labels.yml] - Where do the runner log lines come from?: Loki holds the result line of each attempt. The project builds LogQL with
count_over_timeinjob_result.pyandjob_grade_report.py. [sources: src/devops_cli/roadmap/job_result.py, src/devops_cli/roadmap/job_grade_report.py, docs/guidelines/agentic-jobs.md] - Which part waits on an outside event?: The live 7-day measurement waits on the runner image release with the command card of feat(roadmap): a generated card gives the check command forms of the runner #5467. It also waits on 7 days of real Service stage runs and runner runs. The item defers that part to a new issue. (best practice) [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md]
- Chosen: Defer the live measurement. The item cannot show 7 days of live counts before the release, and the rest is offline work.
- Rejected: Hold the whole item. The counters, summaries, report builder and gate test are offline work that one pull request delivers now.
- What does the remaining offline work depend on?: It has no dependency. The change builds test support only. It changes no stage, implement or fix-checks job. (best practice) [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md]
- Chosen: No dependency for the offline work. The counters read comments and logs, and they change no roadmap job.
- Rejected: Depend on feat(roadmap): a generated card gives the check command forms of the runner #5467. The offline counters do not need the generated card.
- Rejected: Hold the whole item on feat(roadmap): a generated card gives the check command forms of the runner #5467. The offline counters can land now.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 18, 2026
Both concern the stage command card; #5467 builds it, the candidate measures its effect after release.devops-cli-service commentedon Nov 19, 2026
Refine cannot set this item to Ready at 6ff83d4 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.
dan-petty commentedon Nov 20, 2026
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.
devops-cli-service commentedon Nov 21, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 23, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Dec 1, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.