Repository navigation
Description
Problem Description
The Feasibility trace gate of the stage job does not read the path of a citation in the form of a tool call with arguments, such as read_file("tests/commands/test_test_selection.py", 60, 80). _claimed_path (src/devops_cli/roadmap/stage/stage_change.py) removes a toolbox tool name only when a space follows it (#4463). For the call form it keeps the whole span as the path, so _was_read finds no match, also when the run read the file.
Reproduction Steps
- Make a
StageProposalwhose Feasibility section says:The run read `read_file("src/devops_cli/sample.py", 60, 80)` and found the line. - Make a
TraceFactswith the toolread_fileand the pathsrc/devops_cli/sample.py. - Call
check_proposal(...)with that trace. It returns "The Feasibility section states thatread_file("src/devops_cli/sample.py", 60, 80)was read, but the run did not read it."
Expected vs Actual Behavior
Expected: the gate takes src/devops_cli/sample.py as the claimed path of read_file("src/devops_cli/sample.py", 60, 80), as it does for read_file src/devops_cli/sample.py.
Actual: the gate compares the whole span with the read paths and refuses the claim.
Evidence: the stored record 4472.refused.json of the roadmap-service pod (2026-11-11) holds the refusal "The Feasibility section states that read_file("tests/commands/test_test_selection.py", 60, 80) was read, but the run did not read it." The change of #4495 lets that sentence pass, because the gate now judges the object of the read, but the form stays unparsed. It is 1 of the 14 stored trace refusals.
Environment Diagnostics
- DevOps CLI Version: main after fix(roadmap): trace gate refuses probe and search-hit reads #4495
- Execution Environment: Roadmap Service (the stage row)
Logs, Traces, or Terminal Output
/home/devops/.data/roadmap/stage/dan-petty/devops-cli/4472.refused.jsonPre-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.
Proposed design
Problem statement
The Feasibility trace gate reads the space form read_file src/devops_cli/sample.py but not the call form read_file("src/devops_cli/sample.py", 60, 80). It keeps the whole call as the claimed path. It then refuses a claim even when the run read the file. The fix takes the first string argument of a known stage-tool call as the path.
Acceptance criteria
Requirement: Tool-call citation path
The Feasibility trace gate SHALL use the first string argument of a known stage-tool call as the claimed path.
Scenario: Double-quoted tool call matches a read path
- WHEN A Feasibility line cites
read_file("src/devops_cli/sample.py", 60, 80)and the trace holds toolread_fileand pathsrc/devops_cli/sample.py. - THEN
check_proposalreturns no trace-path problem for the line.
Requirement: Single-quoted tool-call citation path
The Feasibility trace gate SHALL accept a known stage-tool call with a single-quoted path argument.
Scenario: Single-quoted tool call matches a read path
- WHEN A Feasibility line cites
read_file('src/devops_cli/sample.py', 60, 80)and the trace holds toolread_fileand pathsrc/devops_cli/sample.py. - THEN
check_proposalreturns no trace-path problem for the line.
Requirement: Unread tool-call citation
The Feasibility trace gate SHALL refuse a tool-call citation when the trace holds no matching read path.
Scenario: Unread tool call names its path
- WHEN A Feasibility line cites
read_file("src/devops_cli/sample.py", 60, 80)and the trace holds toolread_filebut no pathsrc/devops_cli/sample.py. - THEN
check_proposalreturns the trace-path problem that namessrc/devops_cli/sample.py.
Requirement: Existing space-form citation
The Feasibility trace gate SHALL keep the current result for a stage-tool citation in the space form.
Scenario: Space-form tool call still matches
- WHEN A Feasibility line cites
read_file src/devops_cli/sample.pyand the trace holds toolread_fileand pathsrc/devops_cli/sample.py. - THEN
check_proposalreturns no trace-path problem for the line.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this internal trace-citation parser. The project builds and keeps the parser itself. Build cost: about 6,000 tokens to write and test the parser. Keep and fix cost: about 2,000 tokens per year. Elapsed time: about 3 hours.
Key questions
- How should
_claimed_pathextract the path from a tool call with arguments?:_claimed_pathSHALL parse a call to a known stage tool and take its first string literal argument as the path. It then applies the existing citation and./rules. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1727, src/devops_cli/ai/tools/builtin_tools.py, docs/roadmap/stage.md:41]- Chosen: Parse the first string argument of a known tool call. It uses the existing stage-tool set and keeps one path extractor for the space form and the call form.
- Rejected: Extend
_CITATION_PATHwith the call form. The pattern starts at a path and cannot skip a tool name, an opening parenthesis and a quote. - Rejected: Cut every span at its first quote. It would change spans that are not tool calls and could accept a false claim.
- Should the call form be recognized only for a tool in the stage toolbox?: Yes.
_claimed_pathSHALL remove the call only when the tool name is intool_names(HOLDER_STAGE_EXTENDED), as it does forread_file path. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1727, docs/roadmap/stage.md:41]- Chosen: Restrict the call form to stage tools. It matches the existing space form and leaves an unknown program in the path, so the gate refuses it.
- Rejected: Accept any name before a quoted path. It would let a plan claim a file with a call that the run never made.
- Which test module should hold the regression case?:
tests/roadmap/stage/test_roadmap_stage_trace_spans.pyalready holds the trace-span cases, so the regression case belongs there. [sources: tests/roadmap/stage/test_roadmap_stage_trace_spans.py, tests/roadmap/stage/test_roadmap_stage_trace_subject.py] - Should the call parser accept both quote characters and optional whitespace after commas?: Yes. The parser MUST accept single and double quotes and optional whitespace after commas, because a plan may write either form. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1727, src/devops_cli/ai/tools/builtin_tools.py]
- Chosen: Accept both quote characters and optional whitespace. It handles the same call that a Python reader accepts and avoids a second refusal for a minor form.
- Rejected: Accept only the exact double-quoted form. It leaves a valid call form unparsed and repeats the defect.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
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.A false refusal in the trace gate blocks valid plans, but it affects one of several citation forms and is 1 of 14 stored refusals.It removes a false refusal for a citation form the planner can produce, unblocking valid stage proposals.The fix is a targeted parse addition in _claimed_path, similar in scope to the space-form fix in #4463.Both target _claimed_path in stage_change.py for citation form parsing, but #4463 handles the space-separated tool prefix while the candidate handles the parenthesized call form with arguments.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at 5f75d25 (see proposed design in issue body).
devops-cli-service commentedon Nov 11, 2026
Released in v0.112.3: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.3
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 19:36 UTC