Repository navigation
Description
Problem
The planner request is an untyped dict[str, Any] (_Planner._request, stage.py). The inputs that the gates need are not in it. They are instance fields of _Planner: _probe_lines, _overlaps, _metric_senders and the creators that _creators() reads with a live call.
So a gate cannot run again without the _Planner object and the open requests behind it. This blocks any later work that keeps a plan and judges it again, for example the issue #4064.
A dict also has no check of its keys. A typo in a key reaches the model silently.
Expected
Define one pydantic model StageRequest with extra="forbid", in a new module roadmap/stage/stage_request.py. It holds:
- the fields the model reads today: number, title, body, context, capabilities, budget,
rejected_plan,overlaps,metric_sendersandprobes; - the inputs of the gates: the probe lines, the overlaps, the senders and the creators.
_Planner._request returns a StageRequest. The JSON that the planner sends to the model is request.model_dump(exclude=<the gate-only fields>). The model sees the same keys and values as today.
Add one function gate_arguments(request, ...) that builds the arguments of check_proposal from a StageRequest and the tree. _settle calls it. A gate then reads only the request and the tree, not the planner.
This change stores nothing, adds no setting and changes no gate.
Acceptance criteria
-
uv run pytest tests/roadmap/stage/test_roadmap_stage_request.py -k model_json_unchanged- for a fixed item, the JSON sent to the model equals the golden dict of today. The gate-only fields are not in it. -
uv run pytest tests/roadmap/stage/test_roadmap_stage_request.py -k gates_from_request-check_proposalgives the same problems when its arguments come from aStageRequestalone, with no_Plannerobject. -
uv run pytest tests/roadmap/stage/test_roadmap_stage_request.py -k forbid_extra- an unknown key inStageRequestraises a validation error. -
! grep -n 'request: dict\[str, Any\]' src/devops_cli/roadmap/stage/stage.py- the untyped request is gone.
Every command above fails on the unchanged code. The pull request cites the fail-to-pass run (devops ci fail-to-pass --base <ref>).
Feasibility
I read stage.py at origin/main: _Planner._request, _read_overlaps, _dependency_of, _settle and _creators. I confirmed that the probe lines, overlaps, senders and creators are instance state today. I did not run the planner or the tests.
The JSON keys that the model reads come from _request. A test with a golden dict proves that they do not change. The change makes no GitHub request.
Existing tool considered
pydantic, which the project already uses for every model. No new library.
Cost
Build: about 40k tokens and 2 h (one model, one function, 4 tests). Keep: about 2k tokens per quarter. Fix: about 8k tokens and 0.5 h.
Related
Part of #3027. The issue #4064 uses this model. #3529. Order: after the issue #4040 (both change stage.py).
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
refactorprefix of the title gives the type.(roadmap)scope of the title gives the scope.It blocks follow-up work such as keeping a plan as a file, but it changes no user-facing behaviour today.It enables re-judging plans and file-based plans, which are future user-visible features.The body estimates one model, one function, and four tests at about two hours.Both items modify the stage planner request in stage.py, but #3477 fixes the request size to keep tool calls while this candidate types the request fields.devops-cli-service commentedon Nov 8, 2026
Released in v0.87.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.87.2
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 05:08 UTC