Repository navigation
Description
Problem or Motivation
Fix rounds run only inside the runner Job, before the ready mark (implement_run.py:1639 _checks, :1665 _repair_after_push, :1696 _fix). When the Job ends, no job fixes the pull request. The classes test, lint and types have the action REPAIR (failure.py:120-122), but no job takes it. A plan draft with a failing check stays a draft (stage_ready.py:138-140, #3387). Each fix round uses a model, also for a lint or lock failure that a tool can fix.
Proposed Solution & Architectural Design
steps/fix_checks.py runs one round for each call.
- Read the failed log (failed_log) and class it.
- Tier 1, no model:
ruff check --fixandruff formaton the changed paths,devops docs generateoruv lock, as the check needs. Then run the check again. - Tier 2, model: run_fix_step (implement_step.py:2196), only when the log names a path of the plan scope (fix(roadmap): confine repair fix turns to the plan files #4028, outside_plan) and the fixable check passes (feat(roadmap): add the soft-cap and fix-check chain to decision points #4847 when it merges).
- Push with the push step. A plan draft gets the stage plan repair, scoped to its change folder (feat(roadmap): Stage items whose draft plan fails the check #3387 folds here). A ci_infra failure gets one comment and WAIT, because the App cannot run a check again (owner decision O2).
Bounds: bot pull requests only; stop on an owner/* label or on a head that is not the judged head; soft cap 3 rounds for each pull request (roadmap.implement.repair_rounds), one more while the error count falls (#4861), hard cap 5; at most 3 heads for each pull request.
Record keys fix_checks.key (:), .rounds, .errors, .result. The runner Job calls the step in its repair loop.
CLI devops roadmap step fix-checks --pull N. After this item, #3577, #4861, #4859 and #4847 change only this module.
Start after verdict-step, because both change implement_run.py:1639-1715. Timeouts: log 60 s < fixers 300 s < model request 1200 s < model step 1800 s; checks 1800 s; push 300 s.
Cost: about 1.5M tokens and 1 agent-day to build; at run time at most 4M tokens for each round.
Target Subsystem
Roadmap steps (src/devops_cli/roadmap/steps/), the implement repair loop and the stage plan repair.
Existing Tool Considered
ruff (check --fix, format), devops docs generate and uv lock fix tier 1 failures with no model.
Acceptance Criteria
- Tests: tier 1 fixes a lint failure with 0 model requests; a log outside the plan scope stops with 0 model requests; a moved head returns skipped; the caps hold.
- The implement repair tests stay green.
- A dry-run test sees 0 requests.
Dependencies
- fix(roadmap): the final push of the implement Job can miss the latest main #4957 (push-step: fix(roadmap): one push step holds main at every push)
- refactor(github): one pull request verdict for all monitors #5021 (verdict-step: refactor(github): one pull request verdict for all monitors)
- Part of feat(roadmap): track the Service step jobs #5014 (track the Service step jobs).
Source: #5014
Owner decision 2026-11-13
The approved pipeline split (tracker #5482, Phase 3): fix-checks is due only on a checked head that merges cleanly and has a completed, failed required check on that same head, with no claim. A ci_infra failure gets no unit; its rerun waits for O2. Mode plan for 1 week, then the O5 caps.
- Live proof: after the merge and the release, the step runs as the App in mode
planon the open bot PRs with a failed required check. A comment gives the result lines.
Alternatives check of 2026-11-15: in-use.
The repository already uses this tool.
Tool: astral-sh/ruff (https://github.com/astral-sh/ruff), MIT, last activity 2026-11-15, maintained.
Activity
dan-petty commentedon Nov 12, 2026
Both fix ruff or type failures, but #2795 gives the existing step one turn while the candidate is a new dedicated step with tiered tool and model rounds after the job ends.dan-petty commentedon Nov 14, 2026
Evidence for this item from shepherd cycles 51 and 52 (2026-11-14): the implement fix step stopped with
outside_plantwice in 24 h. In both cases the failed check had its cause in a path that the plan did not name, and an agent fixed the plan by hand.devops cirowroadmap-stage-eval-commitsneeds the full git history, but theStatic Analysisjob of.github/workflows/ci.ymlchecked out with depth 1. The plan did not nameci.yml. Fix: the plan now namesci.yml, and the job checks out withfetch-depth: 0.Static Analysisfailed on thesecurity(bandit) andswallowed-failuresrows. A fix workflow works on it now.In both cases the step that this item asks for would add the missing path to the plan, record the reason, and run the fix again. That removes a stop that a person or an agent must clear. Implement is at 1/4 (6 h) and 4/10 (24 h), and
outside_planis its top failure class.devops-cli-service commentedon Nov 15, 2026
Alternatives check: in-use
Reason: The searches found no general tool that repairs failed required checks on a pull request end to end; the only concrete fit is ruff, which the issue itself already names, and it covers the tier-1 lint/format fixing with no model request. The tiered rounds, log classification, repair caps, plan-stage repair and the push step are project-specific and remain to be built.
The repository already uses this tool.
Tool: astral-sh/ruff (https://github.com/astral-sh/ruff)
Covers:
ruff check --fixrepairs many lint failures on the changed paths with no model request (tier 1)ruff formatfixes formatting-only failures with no model requestLacks:
devops docs generate) or lock files (uv lock), which are separate tier-1 toolsTools considered:
Searches run:
Sources:
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 16, 2026
Owner direction 2026-11-16 for every new job that is split out of the plan or implement job: the job uses
openrouter/deepseek/deepseek-v4.1-flash-1017until itsroadmap job resultgrade reaches 80%. Then it gets a trial onlocal/qwen3.8:27b.For this item: give the new step its own model setting
ai.tasks.<step>(a new field ofAITasksConfig), set toopenrouter/deepseek/deepseek-v4.1-flash-1017. Do not read the setting of another job (analysis,triage,implementorstage), so that a model change of one job never moves another job.3 remaining items
fix(roadmap): make check_scope and is_bot_author public to satisfy in…
test(commands): fake github api in test_fix_checks_command_error (#5023)
feat(roadmap): a fix-checks step fixes a failed check (#5023)
fix(roadmap): regenerate docs and sort imports for fix-checks (#5023)
test(roadmap): cover fix-checks step and CLI command execution (#5023)
fix(roadmap): make check_scope and is_bot_author public to satisfy in…
test(commands): fake github api in test_fix_checks_command_error (#5023)
chore(main): release 0.163.0 (#5964)
devops-cli-service commentedon Nov 16, 2026
Released in v0.163.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.163.0
devops-cli-service commentedon Nov 16, 2026
Live since 2026-11-16 12:30 UTC