Repository navigation
Description
Problem
The trace gate refuses a plan that the job kept, because the kept plan carries no trace.
The stage job keeps a plan after it passes the gates (#4064, #4167). The gates include the trace gate (#3266): it refuses a Feasibility sentence that names a tool or reads a path that the run did not call. The trace gate reads the tool calls of the plan runs of this process (_Planner._trace_facts in src/devops_cli/roadmap/stage/stage.py; it joins every plan run since #4267). The plan record (StagePlanRecord in src/devops_cli/roadmap/stage/stage_plan_record.py) holds the key, the proposal and the request. It holds no trace facts.
So a plan that is read back from the file has no run in this process that can support its claims:
- On a hit, the first reply is the kept plan and
_trace_facts()isNone, so the gate is skipped. The claims pass without a check. - A run of the planner that follows a hit has only its own calls as facts. This happens when another gate refuses the kept plan on a moved commit and the planner is asked again, and when the model review returns the plan and the planner repairs it. The new reply keeps the Feasibility claims of the kept plan, but its run did not call those tools. The trace gate then refuses it.
Evidence: the live run of 2026-11-09 21:53Z on item #4062 (model claude-sonnet-5-5) found a kept plan (the plan record of #4167, the key matched), ran the gates again, and the trace gate refused it twice: "The Feasibility section names the tool read_issue, but the run did not call it. The Feasibility section names the tool find_issues, but the run did not call it." The kept plan at .data/roadmap/stage/dan-petty/devops-cli/4062.json names both tools in its Feasibility section and had passed the gates, trace gate included, in the run that wrote it. I did not see the full log of that run; I read the code path above.
Expected
- The plan record holds the trace facts of the run that made it: the set of tool names, and the paths that the Feasibility section of the plan cites and that the run read. The set is small and bounded by the toolset and by the text of the plan.
- A hit uses these facts, joined with the facts of each later plan run of the item, as the facts of the trace gate. The gate then neither skips a kept plan nor refuses its claims.
- A record without the facts field (an old record) still loads. It counts as a miss: the planner plans again. It does not count as a pass.
- Answer to the question "should a kept plan be reused when the planner model changes?": no, and the code already does this. The key holds the model name (
PlanFiles.keypassessettings.ai.for_task("stage").modeltoplan_key), so a new model gives a new key, a miss, and a new plan. The facts need no extra rule.
Acceptance criteria
-
uv run devops ci test tests/roadmap/stage/test_roadmap_stage_plan_record_facts.pypasses. It fails today (the record has no facts):- A plan whose Feasibility names
read_issue, written after a gated run that calledread_issue, holdsread_issuein the facts of its record. - A record that is read back in a fresh planner (no trace in the process), where another gate refuses the kept plan and the planner revises it with a run that calls no tool, passes the trace gate.
- The same flow with facts that lack
read_issueis refused by the trace gate (the gate is not skipped). - A record in the old format (no facts field) loads, and the planner plans again with a new request.
- A facts list of a plan that read many paths holds only the paths that the Feasibility section cites.
- A plan whose Feasibility names
-
uv run devops roadmap eval stage --replaystill accepts 5 of 5 good plans. -
uv run devops ci fail-to-pass --base origin/mainnames the new tests as fail-to-pass.
Existing tool considered
TraceFacts and RunTrace.combined in src/devops_cli/roadmap/agent_run.py already hold the facts and join runs. The change stores a bounded copy of TraceFacts in the existing pydantic record and reads it back. No new library is needed. Skipping the gate for a kept plan was considered and rejected: it would keep the vacuous pass, and it would weaken the gate.
Cost
About 40 000 tokens to build (one model, one record field, one planner change, five tests, one spec delta), about 5 000 to keep, and 1 hour of elapsed time. The flaw costs two more planner calls for each such item, and the item fails.
Activity
dan-petty commentedon Nov 9, 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 gate either skips validation of a kept plan or refuses a valid one, blocking the planning pipeline or letting unverified claims pass.The stage job is the core planning path; a broken trace gate on kept plans blocks valid plans or admits unchecked ones.The change adds a bounded facts field to StagePlanRecord, updates the gate to use it, handles old records, and adds targeted tests.Both address the trace gate refusing valid Feasibility claims, but #4257 joins in-process runs while the candidate persists facts to the plan record for a kept plan read from disk.fix(roadmap): keep the trace facts of a plan in its record (#4285)
devops-cli-service commentedon Nov 10, 2026
Released in v0.103.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.103.1
devops-cli-service commentedon Nov 10, 2026
Live since 2026-11-09 23:58 UTC