Repository navigation
Description
Problem or Motivation
A repair round of an implement step sends the same inputs again with the text of the failure. A second failure of the same kind repeats the same strategy. A stop with action change_tier on a ladder with one tier (roadmap.implement.ladder) names no setting, so a person cannot see what to change. Split from #3053.
Proposed Solution & Architectural Design
- Attempt 1 runs the step as planned.
- Attempt 2 adds context from the repo map, and asks for a smaller group when the failure names a group or the inputs exceed the step budget.
- Attempt 3 changes the model tier when
roadmap.implement.ladderholds more than one tier. When it holds one tier, the stop comment namesroadmap.implement.ladderand its value. - The
attemptevent of the trace records the strategy of each round. - Acceptance: a replay where the first attempt fails with class
testshows more repo-map context in the second attempt; a ladder of one tier names the setting in the stop; a stub model test checks each round.
Target Subsystem
The implement step, src/devops_cli/roadmap/implement_step.py.
Existing Tool Considered
pydantic-ai covers retries and message history. It has no strategy change between rounds. The project builds the ladder: about 70000 tokens to build, 3000 each quarter to keep, 10000 to fix one miss, about 4 hours.
Source: #3053
Proposed design
Problem statement
A repair round of an implement step sends the same inputs again with the text of the failure. A second failure of the same kind repeats the same strategy. A stop with action change_tier on a ladder of one tier names no setting, so a person cannot see what to change.
Acceptance criteria
Requirement: Strategy of each attempt
The step SHALL record the strategy of each attempt in the attempt event of its trace.
Scenario: A failed test on the first attempt
- WHEN a stub model fails the first attempt with class
testandroadmap.implement.repair_roundsis 1 - THEN the trace holds an
attemptevent for attempt 1 with strategyplannedand one for attempt 2 with strategyrepo_map
Requirement: Repository-map context of the second attempt
The second attempt SHALL add the repository-map entries of the files that the failure names to its message.
Scenario: A failed test names a path
- WHEN the reason of the first attempt names
src/devops_cli/roadmap/failure.py - THEN the message of the second attempt holds a section named
# Repository mapwith the entry of that file
Requirement: Tier move of the third attempt
The third attempt MUST run on the next healthy tier when roadmap.implement.ladder holds more than one tier.
Scenario: A ladder of two tiers
- WHEN the ladder names two tiers and the first two attempts fail with a repairable class
- THEN the third attempt calls the model of the second tier, and its
attemptevent names that tier and the strategytier
Requirement: One-tier ladder names its setting
A stop with action change_tier on a ladder of one tier MUST name roadmap.implement.ladder and its value in its reason.
Scenario: A parser failure on a ladder of one tier
- WHEN
roadmap.implement.laddernames one tier and a failure selectschange_tier - THEN the reason of the stopped step holds
roadmap.implement.ladderand the name of that tier
Requirement: Document of the implement step
docs/roadmap/implement.md MUST state the strategy of each attempt and the tier move of the third attempt.
Scenario: The document states the new rule
- WHEN a reader opens
docs/roadmap/implement.md - THEN the file names the repository-map context of the second attempt and the tier move of the third attempt, and no longer states that every repair round stays on its tier
Existing Tool Considered
No alternatives check has run. pydantic-ai covers retries and message history, but it changes no strategy between rounds. The step builds its own round strategy and ladder: about 70000 tokens to build, 3000 each quarter to keep, 10000 to fix one miss, and about 4 hours.
Key questions
- Which strategy does each attempt use, and how does the step select it?: The attempt number selects the strategy: attempt 1 runs the step as planned, attempt 2 adds the repository-map context, and attempt 3 moves to the next tier. A later attempt keeps the strategy of the third attempt. (best practice) [sources: src/devops_cli/roadmap/implement_step.py, src/devops_cli/roadmap/failure.py]
- Chosen: The attempt number selects the strategy. Each attempt tries something new, so a second failure of the same class does not repeat the strategy.
- Rejected: The failure class selects the strategy. A second failure of the same class repeats the same strategy, which is the defect.
- Rejected: A setting names the strategy of each round. It adds a setting to keep, and it does not stop a repeated strategy by itself.
- Which repository-map context does the second attempt add, and how is it bounded?: Attempt 2 adds the repository-map entry of each file that the failure reason names, and of each file of the group. The step counts the section with the message against the window of the step. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/implement_step.py]
- Chosen: The map entries of the files that the failure names and of the group. It reuses the repository map of the planner, and it names the code that the failure touches.
- Rejected: The whole repository map. It can exceed the window of the step and the budget of the item.
- Rejected: The packed text of the files that the failure names. The inputs already pack the files of the group, and the full text costs more tokens than the map.
- How does the third attempt change the tier, and does it spend a repair round?: Attempt 3 moves to the next healthy tier, discards the checkout back to the last
wip:commit, and runs the message with the failure text. The move spends no repair round, as the ladder move does today. (best practice) [sources: docs/ENV_VARS.md, docs/roadmap/implement.md, src/devops_cli/roadmap/implement_step.py]- Chosen: Move to the next healthy tier and spend no repair round. It reuses the tier health check and the keeper, and a new model starts from a known state.
- Rejected: Continue the conversation of the earlier attempts on the new tier. A conversation of one model is not the input of another, and the tree keeps the work of a failed attempt.
- Rejected: Restart at the weakest tier. It repeats a tier that already failed.
- What does the stop reason say when the ladder holds one tier?: The reason holds the setting name
roadmap.implement.ladderand the value of the ladder of the step class, so a person can see the one tier that the failure cannot move past. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/implement_step.py]- Chosen: Name the setting and its value. A person sees the setting to change, and the value that stops the move.
- Rejected: Name the setting only. A person cannot tell the ladder that the step read.
- Rejected: Add a repair round instead. Another round on the same tier repeats the strategy that failed.
- How does the trace record the strategy of an attempt?: The
attemptevent gets astrategyfield with one fixed name:planned,repo_maportier. It sits next to the number, the tier, the class and the evidence. (best practice) [sources: src/devops_cli/roadmap/implement_trace.py, tests/roadmap/test_roadmap_implement_step_attempts.py]- Chosen: A
strategyfield with a fixed name. A test reads the strategy without the text of the evidence, and a reader compares two rounds. - Rejected: The evidence text of the failure. It holds the reason of the failure, not the strategy of the round.
- Rejected: The tier only. Two rounds on one tier look the same, though their strategies differ.
- Chosen: A
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-07: partly.
Tool: pydantic-ai (https://pypi.org/project/pydantic-ai), MIT, last activity 2026-11-04, maintained.
Activity
dan-petty commentedon Nov 5, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.Improves repair efficiency but does not block a release or fix a critical failure.Reduces repeated identical failures and gives a person a clear stop message when the ladder has one tier.Requires changes to attempt logic, context injection, group-size rules, and stop-comment text in implement_step.py.Both change per-attempt behaviour in the implement step; #3060 delivers the model ladder, the candidate adds repo-map context and group-size reduction as strategy changes that use the ladder.feat(roadmap): a step stops at its budgets and records attempts (#3580)
devops-cli-service commentedon Nov 6, 2026
Status set to Ready at 7496693 (see proposed design in issue body).
Moved to new items: #3724.
feat(roadmap): ask for a smaller edit after a parser failure (#3737)
devops-cli-service commentedon Nov 7, 2026
Alternatives check: partly
Reason: The web searches timed out, so the only facts available are the package facts I read and the issue text: pydantic-ai is an actively maintained agent library that covers the retry loop and message history of an attempt, but it changes no strategy between rounds. It therefore covers only the part of the need that re-runs an attempt with the failure text, not the per-attempt strategy, repo-map context, tier ladder or stop-message setting name the issue asks for.
Tool: pydantic-ai (https://pypi.org/project/pydantic-ai)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.
35 remaining items
docs(openspec): archive the change (#3569)
devops-cli-service commentedon Nov 15, 2026
Stopped at scoped checks.
Failure class:
ci_infra.Action taken: none.
Action left:
retry: run the item again.pytest on base: tests/roadmap/implement/test_roadmap_implement_step_attempts.pypytest on base: tests/roadmap/implement/test_roadmap_implement_step_repair.pypytest on base: tests/roadmap/implement/test_roadmap_implement_tier_move.pypytest on base: tests/roadmap/implement/test_roadmap_implement_one_tier.py, tests/roadmap/implement/test_roadmap_implement_step.pyReason:
Last message of the agent (a claim that no check verified): none.
The item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.The job kept the commits that passed on the branch
feat/3569-each-repair-round-changes-the-strategyon origin. The last is4584b4cd78b77eda723f712a06c7af16c8cf8973. The pull request stays a draft. The next run continues from it, runs no group that is ticked, and runs the scoped checks again.devops-cli-service commentedon Nov 15, 2026
The runner Job devops-cli-implement-devops-cli-3569-4abbd6 ended: succeeded.
Image digest: sha256:98de20a7edd09701e7b226a1931ada4763199253d241daf1151b0fe6b79f2dc5
The last lines of its log:
devops-cli-service commentedon Nov 15, 2026
Cleared the stop at scoped checks by the rule
digest: the runner image changed since the stop, from sha256:98de20a7edd09701e7b226a1931ada4763199253d241daf1151b0fe6b79f2dc5 to sha256:014636e1131ac1400a333cf938c841f3ffff1b3a7deb8b63b92cb8920cd31745, and the classci_infraof the stop is one that a new attempt can fix. The item is Planned again, and the Service takes it in the next round. The Service clears at most 1 for each class and 3 for each item by digest. A stop of another class, a new stop on this image, and a stop over a limit wait for a commentimplement: retry.devops-cli-service commentedon Nov 16, 2026
Released in v0.160.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.160.0
devops-cli-service commentedon Nov 16, 2026
Live since 2026-11-16 03:02 UTC