Repository navigation
Description
Problem
The job result lines (roadmap job result: job=... item=#N result=... success=... class=...) carry no effort of the item, so devops roadmap eval grades cannot split a job's rate by effort. A measure on 2026-11-16 had to join each item to its current effort/* label by hand (.data/agent/scratch/effort-corr/, not in git):
| Stage, 2026-11-12 to 2026-11-16 | low | medium | high |
|---|---|---|---|
| Attempts that opened a plan | 11/17 (65%) | 31/69 (45%) | 3/10 (30%) |
| Items with any success | 85% of 13 | 65% of 46 | 43% of 7 |
An ordered trend test gave p of about 0.05 (one-sided). Implement showed no relation (low 2/7, medium 4/21, p of about 0.45). The eventual merge rate of the bot's plan PRs did not fall with effort (low 10/15, medium 44/49, high 4/4). A label read later can differ from the label at the attempt, and Loki keeps the result lines for only about 4.5 days.
Expected behavior
- Each stage and implement result line carries
effort=<low|medium|high|none>from the item's labels at the time of the attempt (andvalue=if it costs nothing more). devops roadmap eval grades --by effort(or a column in the JSON output) shows each job's attempts, successes and Wilson range for each effort.- A test checks the field in the result line and the split in the report.
Related
- feat(roadmap): track the pipeline split into 24 jobs #5474 (split the plan and implement jobs), feat(roadmap): the PR review gate scores each bot PR #5968 (verdict score), feat(roadmap): grade stage by the plans that build #5603 (stage graded by plans that build).
Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: statsmodels (https://pypi.org/project/statsmodels), BSD-3-Clause, last activity 2026-08-30, maintained.
Reason: Searches found no tool that writes the effort field or groups the grade rows. statsmodels gives only the Wilson interval, and the issue already names it as the tool in use.
Covers:
- Wilson 95% interval for a binomial proportion
- Several interval methods beside wilson
- Wilson interval holds the observed rate in the scenario
Lacks:
- effort= field on the stage and implement result lines
- Grouping of result lines by effort with an efforts list
- The --by effort flag and its extra query
- Read of the effort label at the attempt
Proposed design
Problem statement
The stage and implement result lines hold no effort of the item. devops roadmap eval grades cannot split a job's rate by effort. A label read at report time can differ from the label at the attempt. Loki keeps the result lines for about 4.5 days. The change writes effort= at the attempt and adds a Wilson split for each effort. The item waits on dependency #6521.
Acceptance criteria
Requirement: The effort on the stage and implement result line
Each stage and implement result line SHALL carry effort= with low, medium, high or none, taken from the item's effort/* label at the attempt.
Scenario: A low-effort item and an item with no effort label
- WHEN A stage attempt of an item that holds
effort/lowand a stage attempt of an item with noeffort/*label log their result lines. - THEN
uv run devops ci test tests/roadmap/test_job_result.py tests/roadmap/stage/test_roadmap_stage_job_entry.py tests/roadmap/implement/test_roadmap_implement_submit.pypasses, and the lines holdeffort=lowandeffort=noneafterfirst_pass=.
Requirement: The effort split of the report
With --by effort, devops roadmap eval grades SHALL group the attempts of each workflow and repository by the effort= field of its result lines, count a line with no effort= field as none, and add an efforts list to each workflow row of the JSON report.
Scenario: A line from before the field
- WHEN The effort query answers with one stage line that holds
effort=highand one stage line of the same job and repository with noeffort=field. - THEN
uv run devops ci test tests/roadmap/test_job_grade_report.pypasses, the report gives 1highattempt and 1noneattempt, and the JSON row holds both in itseffortslist.
Requirement: Attempts, successes and the Wilson interval for each effort
The --by effort report SHALL give, for each workflow, repository and effort with a line, the attempts with infra=false, the successes, p and the Wilson 95% interval of p.
Scenario: 4 successes in 5 low-effort attempts
- WHEN The report splits a stage row of 4 successes in 5
lowattempts and 1 success in 2highattempts. - THEN
uv run devops ci test tests/roadmap/test_job_grade_report.pypasses, thelowrow gives 5 attempts, 4 successes, apof 0.8 and a Wilson 95% interval that holds 0.8, and thehighrow gives 2 attempts and 1 success.
Requirement: The flag adds the effort query and the table
devops roadmap eval grades SHALL add the effort query to its plan and print the effort table only when --by effort is set.
Scenario: The dry run with and without the flag
- WHEN A person runs
devops roadmap eval grades --dry-runanddevops roadmap eval grades --by effort --dry-run. - THEN
uv run devops ci test tests/commands/test_roadmap_eval_grades.pypasses, the second plan holds one more query that groups the counts byeffort, and the first plan holds no effort query and prints no effort table.
Requirement: The split changes no job grade
The --by effort split SHALL NOT change the grade, the attempts or the ratio of the workflow row.
Scenario: A graded row split by effort
- WHEN The report splits a row of 30 attempts with 24 successes by effort.
- THEN
uv run devops ci test tests/roadmap/test_job_grade_report.pypasses, the row keeps its grade, 30 attempts and apof 0.8, and each effort row carries its own attempts and successes.
Existing Tool Considered
The alternatives check of 2026-11-24 in the issue body gives the verdict in-use for statsmodels (https://pypi.org/project/statsmodels). The block holds what the tool covers and what it lacks. The new report takes the Wilson 95% interval from statsmodels.stats.proportion.proportion_confint. The proposal adds the three parts that the tool lacks: the effort= read at the attempt in src/devops_cli/roadmap/job_result.py, the grouping and the efforts list in the grade report, and the --by effort flag of devops roadmap eval grades. Written cost: about 60k to 80k tokens to build, keep and fix that code, and about one day elapsed.
Key questions
- Which labels hold the effort of an item?: The
effort/*label family holds the effort:effort/low,effort/mediumandeffort/high. An item with no such label has the effortnone. [sources: CONTEXT.md] - When does the job read the effort?: At the attempt. The job reads the item's labels when its attempt starts and writes the value into the result line. The report reads no label. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/job_result.py]
- Chosen: Read at the attempt. The result line is the record of the attempt, and it keeps the label that the attempt saw.
- Rejected: Join the label at report time. A later label can differ from the label at the attempt, and Loki keeps the lines for about 4.5 days.
- Which jobs write the new field?: The stage job and the implement job write
effort=. (best practice) [sources: src/devops_cli/roadmap/job_result.py, tests/roadmap/test_job_result.py]- Chosen: Stage and implement. The issue names both lines, and the split then covers each job that writes the field.
- Rejected: Stage only. The measure found no relation for implement, and the split must show that result, not hide it.
- Rejected: Implement only. The issue asks for each stage result line too.
- What key and value set does the result line hold?: A separate
effort=token holdslow,medium,highornonein lower case.class=keeps its meaning as the failure class. (best practice) [sources: src/devops_cli/roadmap/job_result.py, tests/roadmap/test_job_result.py]- Chosen: A separate
effort=token. The line holds flatkey=valuetokens, and a new key keepsclass=for the infrastructure cut. - Rejected: Reuse
class=.class=is the failure class, and the grade removes theinfra=trueattempts, so the two values must stay apart. - Rejected: A numeric score. CONTEXT.md gives three effort labels, and a score would invent a mapping that no source gives.
- Chosen: A separate
- Where in the line does
effort=go?: Afterfirst_pass=in the fixed prefix, before the counts and the version. (best practice) [sources: tests/roadmap/test_job_result.py, src/devops_cli/roadmap/job_result.py]- Chosen: After
first_pass=. The fixed prefix keeps its order, and the existing fields keep their positions. - Rejected: After the counts. The field would sit in the variable part with the counts.
- Chosen: After
- Does the change add
value=to the result line?: No. The change writeseffort=only. (best practice) [sources: src/devops_cli/roadmap/job_result.py]- Chosen:
effort=only. No report readsvalue=, and the issue asks for the effort split. - Rejected:
effort=andvalue=. No report readsvalue=, so it adds an untested field and more scope.
- Chosen:
- How does the report show the split?: Add the flag
--by effort. With the flag the report plans one more count query grouped byeffortand prints a second table with one row for each workflow, repository and effort with a line. The JSON report adds aneffortslist to each workflow row. (best practice) [sources: CONTEXT.md, docs/roadmap/job-success.md]- Chosen: A
--by effortflag. It matches the first form in the issue, plans the query only when asked, and keeps the default table. - Rejected: A column in the JSON output only. A person reads the table, and a column does not split the rows.
- Rejected: A separate command. One flag on the existing report is less code and keeps one grade path.
- Chosen: A
- What does the report do with a line written before the field?: It counts the line as
none. The effort is optional in the parse, and a line with noefforttoken, or an empty one, goes to thenonerow. (best practice) [sources: src/devops_cli/roadmap/job_result.py, CONTEXT.md]- Chosen: Count it as
none. The window holds lines from before the field, and dropping them would hide attempts. - Rejected: Leave it out of the split. It drops attempts and gives a rate over a part of the window.
- Rejected: Refuse the report. Old lines are valid result lines, and the report must keep reading them.
- Chosen: Count it as
- Does the split change the job grade?: No. The grade stays the floor of the success ratio over all attempts with no infrastructure cut, with one owner action. The split adds rows and changes no grade. (best practice) [sources: CONTEXT.md, docs/roadmap/job-success.md]
- Chosen: Keep one grade for the job. The job grade has one owner action, and the issue asks for a split of the rate, not a new grade.
- Rejected: One grade for each effort. It multiplies the owner actions and gives each effort too few attempts for a grade.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 16, 2026
Both extend devops roadmap eval grades, but #5165 created the base command while this candidate adds an effort-based split to it.devops-cli-service commentedon Nov 17, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (9)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at c62c598 (see proposed design in issue 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 24, 2026
The result in the alternatives block of the issue body changed. Before this check:
none, no tool. A person decides what the new result means for the item.Searches (6)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 27, 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 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Dec 1, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.