Repository navigation
Description
Problem Description
#4869 (for #4802) made the stage gate returns a setting, roadmap.stage.gate_returns, with the default 3. The setting has only a lower limit (ge=0) and no upper limit. The return loop _Planner._returned in src/devops_cli/roadmap/stage/stage.py stops only at returns >= self._gate_returns. It does not read the stop of the Service.
- No hard ceiling. Each return is one more full planner run, with up to 250 model requests (
CONST_ROADMAP_STAGE_MAX_REQUESTS). The docstring of_Planner.plangives 3R + 4 planner calls for one item with a verifier. A ConfigMap value of 10 gives 34 planner calls for one item. The owner allowance to loosen the roadmap caps says that each extension has a hard ceiling. - No drain guard. On SIGTERM the Service sets the stop, and the stage row starts no next item (fix(roadmap): a Service rollout stops stage rounds with no record #4485). But a return in progress starts a new planner run during the 600 s drain (
CONST_SERVICE_STOP_DRAIN_SECONDS). A planner run sends model requests. The cut at the end of the drain refuses only GitHub requests, so it does not stop the run. The p90 of one planner ask is about 728 s, which is longer than the drain. The pod then gets SIGKILL at 660 s, and the round ends with no clean stop.
The release PR 0.115.0 holds #4869. The image with the setting is not live yet (the Service logs show version 0.114.1), and the live ConfigMap does not set roadmap.stage.gate_returns.
Reproduction Steps
- Run
uv run python -c 'from devops_cli.config.settings import RoadmapStageConfig; print(RoadmapStageConfig(gate_returns=50).gate_returns)'. It prints 50. - In a test, let the planner give a reply that the checks refuse, and call
begin_service_stop()in the model fake after the first ask. The planner gets 3 more asks.
Expected vs Actual Behavior
Expected: a value over 3 fails the settings load with the name of the setting. After the Service stops, the job starts no return; the round ends with ServiceStoppingError and counts no failed round, as the stop before an item does.
Actual: any value loads. A return starts during the drain.
Environment Diagnostics
- DevOps CLI:
mainat c3130a3 (after fix(roadmap): loosen the caps that turn a stage refusal into a loss #4869). - Owner rule: nested timeouts, an inner limit ends before the limit around it.
Logs, Traces, or Terminal Output
gate_returns: Annotated[int, Variable()] = Field(..., default=DEFAULT_ROADMAP_STAGE_GATE_RETURNS, ge=0)
if returns >= self._gate_returns:
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate. feat(roadmap): add the soft-cap and fix-check chain to decision points #4847 adds the soft-cap chain and its guards for decision points in general (the time guard of a stage return stays there). feat(roadmap): extend stage gate returns while the plan improves #4851 adds the fixable check and one extension of the stage returns, and it can raise the ceiling when it adds the extension.
Source: #4869
Activity
dan-petty commentedon Nov 12, 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.The setting is not live yet, but it will go live soon and the drain gap can cause a SIGKILL mid-run.It prevents unbounded planner runs and a hard kill during drain, which protects Service stability.Adding a Pydantic upper bound is small, but the drain guard needs a stop check before each return starts.Both work on the stage gate returns mechanism, but 4802 introduced the setting while the candidate adds an upper bound and a drain guard to it.devops-cli-service commentedon Nov 12, 2026
Released in v0.116.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.116.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 05:27 UTC
fix(roadmap): a refused kept plan uses no stage gate return (#4983)