Repository navigation
Description
Problem Description
Three strict caps turn each refusal of the stage job into a loss:
- A reply that the stage gates refuse goes back to the planner one time (
CONST_ROADMAP_STAGE_GATE_RETURNS = 1). A second refusal fails the item with the classplan_defect. - A failed item with the class
plan_defectwaits 6 hours before the job takes it again (RETRY_AFTERinsrc/devops_cli/roadmap/failure.py). The ledger of failed rounds uses the same wait for the retry time of a suspended row. - A row that fails 3 rounds in a row is suspended (
DEFAULT_SERVICE_MAX_FAILED_ROUNDS = 3). One failed item fails the whole stage round, also when the other items of the round staged.
The holds stack. Only a code change can change these values, so the owner cannot tune them live while the jobs move to 80% success.
Measured over the 7 days to 2026-11-11 (repository dan-petty/devops-cli):
- Stage success is about 20%: 39 staged comments against about 156 failed item attempts.
- 66 of about 110 classified failed stage rounds end with "The change fails its checks, also after a second try", which is the return cap.
- In 8 of 10 sampled refused items, the returned reply had a shorter problem text and the same or a larger plan, so the run was still making progress when the cap stopped it. Examples of problem text size from the first to the second reply: fix(roadmap): confine repair fix turns to the plan files #4028 1595 to 149 characters, fix(roadmap): halt implement step on consecutive command refusals #4043 1390 to 305, fix(github): Fix check-readiness base and monitor merged state #2530 1530 to 494, fix(pr): Require a replay score in stage-change PRs #3398 658 to 119. Two items made no progress: fix(service): route issues webhooks past scoped intake #4412 got a new problem, and fix(ci): a narrowed ci test runs many slow tests serially #4472 kept stale test paths that no reply can repair.
- A gate refusal names the problems of the gates that failed. Gate refusals in 7 days: paths 155, content 142, spec-delta 116, trace 114, citation 68, form 52, criteria 19. A plan that has problems in two modules often needs a third reply.
- The stage row was suspended 25 times in 7 days (16 with the class
plan_defect), 13 times on 2026-11-09 alone. Withplan_defect, each suspension holds the row for 6 hours or until new input. - On 2026-11-11, 26 Ready items held a stage failure with the class
plan_defect.
Reproduction Steps
- Give the stage job an item whose first reply the gates refuse, and whose returned reply the gates also refuse.
- Read the result: the item fails with
plan_defect, and the planner gets no third reply. - Run the stage round again 1 hour later: the job leaves the item out until 6 hours after the failure.
- Fail 3 stage rounds in a row: the Service suspends the row until the retry time, 6 hours after the last failure.
Expected vs Actual Behavior
Expected: a refused reply that makes progress gets more returns, a refused item waits a short time, and a row runs more rounds before a suspension. The owner can tune the return count and the row limit live in the ConfigMap.
Actual: one return, a 6 hour wait and a stop after 3 rounds, all in code.
Proposed Solution
This is the first step toward 80% stage success. The progress-aware caps plan later makes these soft caps with a decision-model check.
- Add the setting
roadmap.stage.gate_returns, default 3, in place ofCONST_ROADMAP_STAGE_GATE_RETURNS. A reply then gets up to 4 tries for each ask. Evidence: 8 of 10 sampled items made progress at the second reply, and a plan with problems in two modules needs one more reply. - Set the wait of
plan_defectinRETRY_AFTERto 1 hour, the same asproviderandci_infra. The stage row runs every 37 minutes, so a failed item still skips one round. The return to New after 3plan_defectfailures on one body (CONST_ROADMAP_STAGE_PLAN_DEFECT_LIMIT) still limits the attempts of an item. The wait stays in the one table offailure.py, because the stage spec says that no setting changes the wait, and four jobs read the table. - Add the setting
service.max_failed_rounds, default 6, fromDEFAULT_SERVICE_MAX_FAILED_ROUNDS. At 37 minutes a round, the stage row then runs about 3.7 hours of failed rounds before a suspension, not about 1.9 hours.
Nested limits: a return is one more planner call in the same item. Each call keeps its own tool call limit (200) and request limit (250). The stage row has no wall-clock deadline in the Service. The 600 second stop drain still ends a round at its next GitHub request. The item wait of 1 hour is longer than the stage interval of 37 minutes. The row retry time of 1 hour is shorter than the 3 hour for of the alert RoadmapServiceRowSuspended.
Cost: a return sends the refused reply and its problem, so it costs less than a new attempt from the first ask. The worst case of one item goes from 3 to 5 planner calls without a verifier, and from 7 to 13 with one.
Existing Tool Considered
No open tool holds the caps of this project's roadmap jobs. The change uses the existing settings model (pydantic-settings) and the ConfigMap. Cost to build: about 60,000 tokens and 1.5 hours.
Acceptance Criteria
roadmap.stage.gate_returnssets the returns of a refused reply, default 3, anddevops config showlists it.service.max_failed_roundssets the failed rounds before a suspension, default 6.RETRY_AFTERholds 1 hour forplan_defect.- The docs and the specs name the new values and settings.
Dependencies
None. The progress-aware caps plan builds on this change.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.Stage success is 20% and the fix targets 80%, but the pipeline still runs and no data is lost.Raising stage success from 20% to 80% directly improves throughput for all roadmap users.Three constants become settings and one table value changes, but the edits span failure.py, stage.py, and settings with coordination needed.Both touch the stage gate return cap in roadmap, but #4491 added the cap of one return while this candidate loosens it to three and makes it a live setting.dan-petty commentedon Nov 11, 2026
Scope from the progress-aware caps plan (2026-11-11)
The tracker #4843 orders this item as child 1 (start now). Where this comment and the body differ, this comment is the scope.
Problem
Code caps turn a stage refusal into a loss. (1)
CONST_ROADMAP_STAGE_GATE_RETURNS= 1: 66 of about 110 classified failed stage rounds in 7 days end at this cap; one return clears 211 of 254 problems (83%); in 8 of 10 sampled items the second reply had less problem text. (2) The row suspends after 3 failed rounds: 25 suspensions in 7 days, 16 with onlyplan_defectfailures; each holds the row 6 hours while 149 Ready items are selectable. (3) A loosened cap has no time bound: a stage item has no wall-clock limit, a planner ask takes up to about 728 s (p90), and the 600 s Service drain cut about 8 stage rounds on 2026-11-11.Corrections to the first body:
raise_for_failed_round(#3493) already fails a round only when no item staged or stopped, so the rule to change is the class rule. A 1 hourplan_defectwait adds no plan PRs (2 of 149 selectable items waited) and spends the 3 plan defects of an unchanged body in about 3 hours. A default of 6 failed rounds also loosens the suspension for provider outages.Solution
roadmap.stage.gate_returns(default 2, allowed 1 to 3) in place ofCONST_ROADMAP_STAGE_GATE_RETURNS.service.max_failed_rounds(default 3) fromDEFAULT_SERVICE_MAX_FAILED_ROUNDS.raise_for_failed_round, a round whose failed items all have the classplan_defectdoes not count as a failed round; each item keeps its 6 hour wait; other classes count as today.plan_defectwait at 6 hours.Cost to build: about 0.8M tokens, half a day.
Acceptance criteria
gate_returns1 it does not.gate_returns4 fails the settings load.plan_defectfailures and no staged item adds nothing to the failed-round ledger; a round with 3 provider failures adds 1.plan_defectfailures, and the feat(roadmap): log one result line for each roadmap job attempt #4845 stage ratio is higher than in the 7 days before.Dependencies
None.
test(telemetry): count each refusal of a stage reply after each return
chore(openspec): archive 4802-loosen-the-caps-that-turn-a
dan-petty commentedon Nov 12, 2026
Scope gap after the merge of #4869
The owner merged #4869 on 2026-11-12 at 00:44 UTC. It delivers the first body of this issue. The scope comment above asked for different values and three more parts. This table compares the scope comment with
mainafter the merge:roadmap.stage.gate_returnsge=0, no upper limitservice.max_failed_roundsplan_defectwait inRETRY_AFTERplan_defectfailures is not a failed roundstage gate returns:lineEffects on the other items of #4843:
roadmap.stage.gate_returns: 2.plan_defectfailures now. The 7-day measure of this issue (0 stage row suspensions with onlyplan_defectfailures) decides if the rule is necessary with 6 rounds.There is no second pull request for this issue. The parts above go to #4847 and #4851.
devops-cli-service commentedon Nov 12, 2026
Released in v0.115.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.115.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 04:08 UTC