Repository navigation
Description
Problem
A plan's ## Feasibility cites results of read_file or search_code, while the stage comment on the issue says "The model made no tool call". No gate compares the claims of the plan with the trace of the run, so a plan can present a premise as checked when the model never read the file. Two cases on 2026-11-02:
- docs(openspec): plan #3076 plan the roadmap follow console #3205 (plan for feat(roadmap): a run console: follow a run and read its history #3076): Feasibility cites
read_fileandsearch_coderesults; the stage comment says no tool call. - docs(openspec): plan #3199 post pr check evidence comment #3237 (plan for feat(pr): post the check results of a pull request as a comment #3199): Feasibility says
read_filewas used; the stage says no tool call was made.
This matters more now that the planner has more tools (#3238): a claim of a read that did not happen is a false premise of its own kind. The premise probe (#3176) checks that cited paths and identifiers exist, and not that the run read them.
Proposed change
- The toolbox client already keeps a
RunTraceof each plan run (the tool calls, with their arguments). Pass the names of the tools and the paths read tocheck_proposal. - Refuse a Feasibility line that names a tool (
read_file,search_code,git_log,references, ...) that the run did not call, or a path as "read" that the run did not read. Name the claim in the message. - When the run made no tool call (the inner client, or a model that did not use the tools), the plan states its premises as "not checked" and does not use the words "read" or "ran".
Acceptance criteria
- A test with a trace of zero calls shows that a Feasibility line "read
src/x.py" is refused. - A test with a trace that read the path shows that the same line passes.
- The planner prompt says to cite only what the run did, and the test(roadmap): check the planner prompt against its rules #3210 test passes.
- A replay case from docs(openspec): plan #3076 plan the roadmap follow console #3205 or docs(openspec): plan #3199 post pr check evidence comment #3237 is in the golden set.
Related: #3176, #3182, #3238, #3200.
Proposed design
Problem statement
The stage job accepts a plan whose Feasibility section cites a tool read that the run never made. No gate compares the claims of the plan with the trace of the run, so a plan presents an unchecked premise as checked. The change compares the Feasibility section with the trace of the run that wrote the reply. It refuses a claim that the trace does not support, and the prompt tells the model to cite only what the run did.
Acceptance criteria
Requirement: Trace facts from a run
TraceFacts.of SHALL take the tool name of each call of a RunTrace and the path, directory and paths values of an argument that parses as JSON.
Scenario: A trace with two calls
- WHEN The trace holds a
read_filecall forsrc/x.pyand asearch_codecall forneedle. - THEN The facts hold the tools
read_fileandsearch_code, and the pathsrc/x.py.
Requirement: Zero-call trace refuses a read claim
The stage job SHALL refuse a Feasibility line that states a backtick path was read when the run trace holds no call that read it.
Scenario: A read claim with no tool call
- WHEN The trace holds zero calls and the Feasibility section says
readsrc/x.py``. - THEN
check_proposalreturns a problem that namessrc/x.pyand the absent read.
Requirement: Trace with the path accepts the read claim
The stage job SHALL accept a Feasibility line that states a path was read when the trace holds a call that read it.
Scenario: A read claim that the trace supports
- WHEN The trace holds a
read_filecall forsrc/x.pyand the Feasibility section saysreadsrc/x.py``. - THEN
check_proposalreturns no problem for that line.
Requirement: Absent tool name is refused
The stage job SHALL refuse a Feasibility line that names a toolbox tool when the trace holds no call to that tool.
Scenario: A tool name that the trace lacks
- WHEN The trace holds no
search_codecall and the Feasibility section sayssearch_codereturned a result. - THEN
check_proposalreturns a problem that namessearch_code.
Requirement: A negation passes
The check SHALL NOT refuse a Feasibility line that negates the read of a path.
Scenario: A stated gap
- WHEN The trace holds zero calls and the Feasibility section says
not readsrc/x.py``. - THEN
check_proposalreturns no problem for that line.
Requirement: No trace skips the check
The check SHALL skip the trace comparison when the caller passes no trace facts.
Scenario: A replay with no run
- WHEN
check_proposalgets no trace facts and the Feasibility section saysreadsrc/x.py``. - THEN
check_proposalreturns no trace problem, and its other checks run as before.
Requirement: Trace facts reach the check
The stage job SHALL pass the trace facts of the run that wrote each reply to check_proposal.
Scenario: The stage job calls the check
- WHEN The planner gets a reply from a toolbox run that called
read_fileforsrc/x.py. - THEN The
check_proposalcall for that reply holds the facts with the toolread_fileand the pathsrc/x.py.
Requirement: Prompt cites only the run
The planner prompt SHALL state that the plan cites only the tools and paths that the run used, and that a premise that the run did not check is written as not checked.
Scenario: The prompt rule is present
- WHEN The stage prompt and
docs/roadmap/stage.mdare read. - THEN Both hold the same sentence of the rule, and the tests in
tests/roadmap/test_roadmap_stage_prompt_rules.pypass.
Requirement: Golden set holds a reported case
The golden set SHALL hold a replay case from #3205 or #3237 whose facts give a trace of zero calls, and the replay SHALL refuse its read claim.
Scenario: The replay refuses the case
- WHEN
devops roadmap eval stage --replayruns on the golden set. - THEN The case is present, and the
tracegate refuses its unsupported read claim.
Existing Tool Considered
No check has run. No open, maintained tool or library covers the need: the check compares this repository's stage reply with this repository's RunTrace. The change builds its own code. Written cost: about 3,000 tokens to build, 1,000 tokens to keep and fix, and about four hours of elapsed work.
Key questions
- Does
RunTracehold the paths that a plan run read?: No.RunTraceholds the name of each tool call and its argument as masked, cut JSON text. A path comes from thepath,directoryorpathsvalue of an argument that parses as JSON. The trace is built from the messages after a run ends. [sources: src/devops_cli/roadmap/agent_run.py, tests/ai/client/test_roadmap_agent_run.py, openspec/changes/archive/2026-11-02-3037-the-stage-job-plans-with-a/design.md] - Is the trace of the run that wrote a reply available when the reply is checked?: Yes.
_Planner.planclearsToolboxClient.tracesat the start of an item and combines them at the end, so the client appends one trace for eachchat_structuredcall. The planner reads the trace of the ask fromtoolbox.tracesafter the ask returns. [sources: src/devops_cli/roadmap/stage.py, openspec/changes/archive/2026-11-02-3037-the-stage-job-plans-with-a/design.md] - Where does the trace comparison live?: In
check_proposal, as an optionaltracekeyword that appends one problem for each unsupported claim. (best practice) [sources: src/devops_cli/roadmap/stage.py, docs/ROADMAP_WORKFLOW.md:275, openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md]- Chosen: Extend
check_proposalwith an optionaltracekeyword. It is the pure function that collects the problems of a reply, and the job, the replay and the plan checks already call it. - Rejected: Add a separate gate module. It repeats the reply parsing and every call site, and the reply would go back to the model from two places.
- Rejected: Enforce the rule in the prompt only. A prompt rule is no gate, and the acceptance criteria require a refusal.
- Chosen: Extend
- What shape does the trace data take?: A
TraceFactsvalue with the setstoolsandpaths, built byTraceFacts.of(trace).check_proposaltakes it as an optional keyword with defaultNone. (best practice) [sources: src/devops_cli/roadmap/agent_run.py, src/devops_cli/roadmap/stage.py]- Chosen: A
TraceFactsvalue. The signature stays short, the check stays pure, and it does not depend on the message structure ofRunTrace. - Rejected: Two parameters for the tools and the paths. The two values always travel together, and they would lengthen every call.
- Rejected: The whole
RunTrace. The check would depend on the message structure of the trace and would carry more data than it needs.
- Chosen: A
- Which claim forms does the check refuse, and what does no trace mean?: A Feasibility line that names a toolbox tool in a code span when the run did not call it, or that states a code-span path was read when the run did not read it. A negated clause passes.
Noneskips the check. Empty facts refuse every affirmative claim. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_tools.py, openspec/specs/roadmap-stage/spec.md]- Chosen: Tool names and code-span paths, with a negation guard. It catches the two reported cases, and a code span keeps the false positives low.
- Rejected: Any occurrence of
readorranin the section. It refuses a line that saysnot read, and it refuses a quoted requirement. - Rejected: A model-based classifier. It adds a model call, it is not deterministic, and the gate must run offline.
- How does the check learn the tool names?: From a constant tuple of tool names in
stage_tools.pythatStageTools.tools()and the check both read, and from the names that the trace records as offered. (best practice) [sources: src/devops_cli/roadmap/stage_tools.py, openspec/changes/archive/2026-11-02-3238-stage-planner-tools/specs/roadmap-stage/spec.md, src/devops_cli/roadmap/implement_shell_policy.py]- Chosen: One constant tuple that the tools and the check read. A new tool is covered without a second edit, and a test keeps the tuple equal to the tools of each toolset.
- Rejected: Hardcode the names in
stage_change.py. It needs an edit for every new tool, and the prompt and the check would drift. - Rejected: Only the offered names of the trace. A run that offered no tool then names no tool, and a claim of a tool that the run never offered passes.
- What does the planner prompt say?: The prompt says to cite only the tools and the paths that the run used. It says to write a premise that the run did not check as
not checked, and never to writereadorranfor it. (best practice) [sources: docs/roadmap/stage.md:37, src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/test_roadmap_stage_prompt_rules.py]- Chosen: Add the rule to the prompt and keep the gate. The prompt guides the model, and the gate enforces the rule.
- Rejected: Prompt only. The issue requires a refusal, and a prompt rule is no gate.
- Rejected: Gate only. The model needs the rule to avoid the refusal.
- How does the golden set hold a case with a run trace?: The
case.jsonof a case gains atracefact with the tool names and the paths.stage_eval_gatespasses it tocheck_proposalasTraceFacts. A case with notracefact passesNone, and the replay skips the check for it. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:275, src/devops_cli/roadmap/stage_eval_gates.py]- Chosen: A
tracefact in the case file. The replay reads no git and calls no model, so the trace of the recorded run must come from the case. - Rejected: Treat a missing trace as zero calls. It would refuse the recorded good plans, and the replay would fail on them.
- Rejected: Defer the golden-set case. The plan text of docs(openspec): plan #3076 plan the roadmap follow console #3205 is on its pull request, so the case is buildable now.
- Chosen: A
- How is the change tested?: Unit tests for the check with a zero-call trace, a trace with the path, a missing tool name, a negation and no trace. A test of the prompt phrase, and a golden-set replay case. The pull request states the replay counts before and after, as
docs/ROADMAP_WORKFLOW.mdrequires. (best practice) [sources: tests/roadmap/test_roadmap_stage_plan.py, tests/roadmap/test_roadmap_stage_prompt_rules.py, docs/ROADMAP_WORKFLOW.md:275]- Chosen: Unit tests plus a replay case. The unit tests cover each branch of the check, and the replay case guards the reported defect.
- Rejected: Replay case only. It does not isolate the branches of the check.
- Rejected: Unit tests only. The issue asks for a golden-set case.
- Which premise of the first proposal does the return of the stage job remove?: The check no longer takes the whole
RunTraceand no longer reads 'the paths read' from it. It takes aTraceFactsvalue that the planner builds from the trace of the reply's run. It skips when the caller has no run, and the replay case carries its trace in the case facts. (best practice) [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/agent_run.py, docs/ROADMAP_WORKFLOW.md:275]- Chosen: Pass per-reply facts, and skip when the caller has no run. The trace of a reply exists when the reply returns, and the replay and the plan checks have no run.
- Rejected: Pass the whole
RunTracetocheck_proposal. The trace holds no paths, and it carries a message structure that the check does not need. - Rejected: Refuse every read claim in every caller. The replay and the plan checks have no run, so they would refuse the recorded good plans.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-06: none.
Tool: none found.
Activity
devops-cli-service commentedon Nov 2, 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.Plans can present unverified claims as checked, undermining trust, but the system still functions and a human can catch it.Prevents false premises in plans, which is important for planning quality but not a system outage.Requires passing RunTrace to check_proposal, adding validation logic, updating the planner prompt, and writing tests.Both are stage-job gates that refuse a plan based on its Feasibility content, but #3010 checks path existence while the candidate checks tool-call trace consistency.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at b1a6c8e (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
x
1 remaining item
devops-cli-service commentedon Nov 6, 2026
Alternatives check: none
Tool: none found
Lacks:
RunTrace(tool names and thepath/directory/pathsarguments) and this repository'scheck_proposal, which no external library knows about.Searches run:
Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.
[-]fix(roadmap): the stage refuses a Feasibility that cites a tool read when the run made no tool call[/-][+]fix(roadmap): Refuse Feasibility claims the run did not support[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 85 characters, and the limit is 60. The type and the scope stay.
fix(roadmap): the stage refuses a Feasibility that cites a tool read when the run made no tool callfix(roadmap): Refuse Feasibility claims the run did not supportdevops-cli-service commentedon Nov 8, 2026
Staged: branch
fix/3266-refuse-feasibility-claims-the-run-did, draft pull request #4146. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
The runs of the planner and the review made 73 model request(s), and used 5879609 input tokens and 66815 output tokens. The tool calls, in order:
list_files({"directory":"src/devops_cli/roadmap/stage"})list_files({"directory":"tests/roadmap/stage"})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py"})file_symbols({"path":"src/devops_cli/roadmap/stage/stage_probe.py"})search_code({"text":"def check_proposal"})search_code({"text":"feasibility"})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1130,"end_line":1330})search_code({"text":"def content_problems"})search_code({"text":"stage_problem_feasibility"})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1020,"end_line":1130})read_file({"path":"src/devops_cli/roadmap/agent_run.py"})search_code({"text":"class RunTrace"})search_code({"text":"traces"})read_file({"path":"src/devops_cli/roadmap/agent_run.py","start_line":180,"end_line":290})read_file({"path":"src/devops_cli/roadmap/stage/stage_tools.py"})search_code({"text":"def tools"})read_file({"path":"src/devops_cli/roadmap/tools.py"})read_file({"path":"src/devops_cli/roadmap/stage/stage_toolbox.py"})search_code({"text":"check_proposal("})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1000,"end_line":1230})search_code({"text":"def _problems"})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1140,"end_line":1240})read_file({"path":"src/devops_cli/roadmap/stage/stage_request.py"})search_code({"text":"self._traces"})search_code({"text":"def plan_item"})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":820,"end_line":1000})search_code({"text":"def _planner_of"})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1593,"end_line":1720})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1490,"end_line":1593})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":1,"end_line":230})list_files({"directory":"src/devops_cli/roadmap/stage"})search_code({"text":"def content_problems"})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1080,"end_line":1300})file_symbols({"path":"src/devops_cli/roadmap/stage/stage_change.py"})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":804,"end_line":935})search_code({"text":"_SELF_ACCEPTANCE_MARKS"})search_code({"text":"_PLAN_CHECK_FILE"})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":120,"end_line":175})search_code({"text":"calls it"})search_code({"text":"def _caller"})list_files({"directory":"src/devops_cli/roadmap"})list_files({"directory":"tests/roadmap/stage"})search_code({"text":"stage/cases"})search_code({"text":"golden set"})list_files({"directory":"tests/fixtures/roadmap_eval/stage"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":168,"end_line":400})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":154,"end_line":260})search_code({"text":"gate_arguments"})search_code({"text":"self.traces"})read_file({"path":"src/devops_cli/roadmap/stage/stage_request.py"})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1100,"end_line":1220})read_file({"end_line":1000,"path":"src/devops_cli/roadmap/stage/stage.py","start_line":860})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":260,"end_line":400})search_code({"text":"replay_case"})search_code({"text":"def replay"})search_code({"text":"replay_all("})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_eval_cases.py","start_line":1,"end_line":90})search_code({"text":"_TOKEN_COST"})read_file({"path":"src/devops_cli/roadmap/agent_run.py","start_line":250,"end_line":450})search_code({"text":"class RunTrace"})read_file({"path":"src/devops_cli/roadmap/agent_run.py","start_line":150,"end_line":250})search_code({"text":"def argument_json"})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":860,"end_line":1010})read_file({"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1120,"end_line":1210})read_file({"end_line":1120,"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1010})search_code({"text":"_Planner("})read_file({"end_line":1600,"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1530})search_code({"text":"class ProposalGate"})read_file({"end_line":1270,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1080})file_symbols({"path":"src/devops_cli/roadmap/stage/stage_change.py"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":120,"end_line":500})read_file({"end_line":620,"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":290})search_code({"text":"ProposalGate"})read_spec({"capability":"roadmap-stage"})search_code({"text":"Feasibility"})read_file({"path":"docs/roadmap/stage.md","start_line":25,"end_line":70})references({"name":"Feasibility"})references({"name":"feasibility"})read_file({"end_line":90,"path":"docs/roadmap/stage.md","start_line":68})read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":1,"end_line":40})search_code({"text":"shared"})read_file({"end_line":420,"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py","start_line":180})search_code({"text":"SHARED"})search_code({"text":"stage.md"})read_file({"end_line":700,"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py","start_line":400})search_code({"text":"json.loads"})search_code({"text":"tool_calls"})search_code({"text":".argument"})search_code({"text":"TraceFacts"})read_file({"end_line":150,"path":"src/devops_cli/roadmap/agent_run.py","start_line":120})read_file({"end_line":230,"path":"tests/ai/client/test_roadmap_agent_run.py","start_line":150})read_file({"end_line":260,"path":"src/devops_cli/roadmap/tools.py","start_line":120})search_code({"text":"tool_names"})read_file({"end_line":330,"path":"tests/roadmap/stage/test_roadmap_stage_eval_gates.py","start_line":230})read_file({"end_line":470,"path":"tests/roadmap/stage/test_roadmap_stage_eval_gates.py","start_line":330})read_file({"end_line":232,"path":"tests/roadmap/stage/test_roadmap_stage_eval_gates.py","start_line":120})read_file({"end_line":330,"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":130})read_file({"end_line":150,"path":"src/devops_cli/roadmap/stage/stage_toolbox.py","start_line":105})read_file({"end_line":120,"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":55})read_file({"end_line":1290,"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1199})read_spec({"capability":"roadmap-stage-eval"})read_spec({"capability":"roadmap-stage","requirement":"The trace of a run records the tools that each request offered"})read_spec({"capability":"roadmap-stage-eval","requirement":"The replay counts the defects by type"})read_spec({"capability":"roadmap-stage-eval","requirement":"The golden set holds the plans with their defects"})read_file({"end_line":1700,"path":"src/devops_cli/roadmap/stage/stage.py","start_line":1593})read_file({"end_line":175,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":150})read_file({"end_line":50,"path":"src/devops_cli/commands/roadmap_eval_stage.py","start_line":20})Tool calls: file_symbols=3 (empty=0), list_files=6 (empty=0), read_file=54 (empty=0), read_spec=5 (empty=0), references=2 (empty=0), search_code=39 (empty=3)
The stage job read the open pull requests and their files in 1 GraphQL request(s).
docs(openspec): plan #3266 Refuse feasibility claims the run did not …
docs(openspec): plan #3266 Refuse feasibility claims the run did not …
fix(roadmap): refuse feasibility claims the run did not make
fix(roadmap): refuse feasibility claims the run did not make
fix(roadmap): refuse feasibility claims the run did not make
devops-cli-service commentedon Nov 8, 2026
Released in v0.92.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.92.1
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 18:19 UTC