Repository navigation
Description
Problem Description
The Feasibility trace gate of the stage job (_trace_problems in src/devops_cli/roadmap/stage/stage_change.py) refuses plans that cite a file that the run did read. The function _claimed_path gets the path from a code span. It accepts only the forms path:N:text and path:def name (_CITATION_PATH). Other citation forms that the planner writes do not match, so the gate compares the full span with the read paths and does not find it:
path:N-M(a line range), for examplesrc/devops_cli/roadmap/run.py:770-861.path:N(one line with no text).- a toolbox tool name before the path in the same code span.
- a directory with a trailing slash, for example
tests/telemetry/.
The trace and citation gates are the largest active cause of stage refusals: 62 refusals on 42 items in 48 hours. Three earlier fixes did not stop them (#4299, #4329, #4305). The study of 2026-11-11 found that 18 of the 62 trace refusals use one of these forms. A skeptic pass confirmed the cause.
Reproduction Steps
- Make a
StageProposalwhose Feasibility line isI read `src/devops_cli/roadmap/run.py:770-861`. - Make a
TraceFactswhosepathsholdssrc/devops_cli/roadmap/run.py. - Call
_trace_problems(proposal, trace).
Expected vs Actual Behavior
Expected: no problem, because the run read the file.
Actual: the gate returns "The Feasibility section states that src/devops_cli/roadmap/run.py:770-861 was read, but the run did not read it."
Fix: _claimed_path removes :N, :N-M, a leading toolbox tool name (the names of tool_names(HOLDER_STAGE_EXTENDED), not a second list) and a trailing /. A path that the run did not read stays refused. The gate reads no claim from a quoted probe line.
Out of scope (separate issues): re-anchor a stale citation that matches one line at the staged commit, and name the right file in stage_problem_missing_test_file.
Environment Diagnostics
- DevOps CLI: main at 6cf78e7
- Execution environment: the roadmap Service (stage job) and the devcontainer
Logs, Traces, or Terminal Output
The Feasibility section states that `src/devops_cli/roadmap/run.py:770-861` was read, but the run did not read it.
The Feasibility section states that `tests/roadmap/test_roadmap_limit_classes.py:1-70` was read, but the run did not read it.
The Feasibility section states that `tests/telemetry/` was read, but the run did not read it.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.
Proposed design
Problem statement
The trace gate refuses valid Feasibility citations. It accepts only path:N:text and path:def name. Plans also cite path:N-M, path:N, a toolbox tool name before a path, and a directory with a trailing slash. The gate then reports that the run did not read a file that it read. The fix normalizes these forms before the read check.
Acceptance criteria
Requirement: Line range citation
The trace gate SHALL accept a line-range citation when the run read the cited file.
Scenario: Read file with a line range
- WHEN A Feasibility line states that
src/devops_cli/roadmap/run.py:770-861was read, andTraceFacts.pathsholdssrc/devops_cli/roadmap/run.py. - THEN
_trace_problemsreturns no problem.
Requirement: Single line citation
The trace gate SHALL accept a single-line citation when the run read the cited file.
Scenario: Read file with one line
- WHEN A Feasibility line states that
src/devops_cli/roadmap/run.py:770was read, andTraceFacts.pathsholdssrc/devops_cli/roadmap/run.py. - THEN
_trace_problemsreturns no problem.
Requirement: Toolbox prefix
The trace gate SHALL accept a code span that puts a toolbox tool name before the cited path.
Scenario: Read file with a toolbox prefix
- WHEN A Feasibility line states that
read_file src/devops_cli/roadmap/run.py:770was read,read_fileis intool_names(HOLDER_STAGE_EXTENDED), andTraceFacts.pathsholdssrc/devops_cli/roadmap/run.py. - THEN
_trace_problemsreturns no problem.
Requirement: Directory citation
The trace gate SHALL accept a directory citation with a trailing slash when the run read that directory.
Scenario: Read directory with trailing slash
- WHEN A Feasibility line states that
tests/telemetry/was read, andTraceFacts.pathsholdstests/telemetry. - THEN
_trace_problemsreturns no problem.
Requirement: Unread path refused
The trace gate SHALL refuse a citation when the run did not read the cited path.
Scenario: Citation of an unread file
- WHEN A Feasibility line states that
src/devops_cli/roadmap/run.py:770-861was read, andTraceFacts.pathsdoes not holdsrc/devops_cli/roadmap/run.py. - THEN
_trace_problemsreturns the trace path problem forsrc/devops_cli/roadmap/run.py.
Requirement: Quoted probe line
The trace gate SHALL read no path claim from a quoted probe line.
Scenario: Quoted probe line with a path
- WHEN A Feasibility line quotes a probe line in a code span and holds no read verb outside that span.
- THEN
_trace_problemsreturns no trace path problem for the path in the quoted line.
Existing Tool Considered
No check has run. No open, maintained tool covers the repository-specific citation parser in _claimed_path. The change edits existing code and adds no new subsystem. The written cost is about 8k tokens to build and 4k tokens to keep and fix, and 2 hours.
Key questions
- Which function and pattern read the path from a Feasibility code span?:
_claimed_pathmatches_CITATION_PATHand returns thepathgroup, else the span, with a leading./removed._uncalled_pathcalls it for each code span of a sentence. [sources: src/devops_cli/roadmap/stage/stage_change.py:1717, src/devops_cli/roadmap/stage/stage_change.py:1727, src/devops_cli/roadmap/stage/stage_change.py:1768] - Which citation forms must
_claimed_pathremove before the read check?: It must remove a line number, a line range, adeforclasssymbol suffix, a leading toolbox tool name, and one trailing slash. A path that remains unread stays refused. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1717, src/devops_cli/roadmap/stage/stage_change.py:1727]- Chosen: Anchored regular expression. The existing
_CITATION_PATHis anchored and already handlespath:N:textandpath:def name; one pattern keeps one parse path. - Rejected: Split the span on colons. The text after a colon can hold colons, and a tool name can precede the path, so a split is fragile.
- Rejected: Add line ranges only. It leaves the single-line, tool-name and trailing-slash forms refused.
- Chosen: Anchored regular expression. The existing
- Which list supplies the toolbox tool names that the parser removes?:
tool_names(HOLDER_STAGE_EXTENDED)supplies the names._trace_problemsalready builds its tool set from that list. (best practice) [sources: src/devops_cli/roadmap/tools.py, src/devops_cli/roadmap/stage/stage_change.py:1797]- Chosen: The existing toolbox list. The trace gate and the parser use one list, so a new tool needs one edit and the two checks cannot drift.
- Rejected: A second list in the parser. A new tool would need two edits, and one edit would be missed.
- Should
_claimed_pathremove a trailing slash from a directory citation?: Yes. It removes one trailing slash before_was_readcompares the path withTraceFacts.paths. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/roadmap/agent_run.py]- Chosen: Remove one trailing slash. The trace records the directory path without a slash, so the exact comparison then matches.
- Rejected: Keep the slash. It keeps the false refusal that the issue reports.
- Should the gate still refuse a path that the run did not read?: Yes. Normalization removes citation syntax only. A path that
TraceFacts.pathsdoes not hold stays refused. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1768]- Chosen: Keep the refusal. The gate must catch a false claim of a read.
- Rejected: Accept every normalized path. It would hide an unread file.
- How does the gate avoid a claim from a quoted probe line?: The gate reads a read claim from the sentence text outside code spans. A quoted probe line in a code span gives no read verb, so it gives no path claim. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py]
- Chosen: Read claims outside code spans.
_claim_wordsalready blanks code spans, so a quoted probe line cannot add a read verb. - Rejected: Read every code span as a claim. A quoted probe line would produce a false refusal.
- Chosen: Read claims outside code spans.
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.It is the largest active cause of stage refusals with 62 refusals on 42 items in 48 hours, and three earlier fixes did not stop them.It unblocks valid plans that are currently refused, removing the top cause of stage job failures.The fix is scoped to one function and four citation forms with a clear specification, but requires testing each form and the exclusion of quoted probe lines.Both fix the trace gate refusing valid citations in stage_change.py, but #4290 fixed the comparison of span to bare path while this candidate fixes _claimed_path to extract the path from line-range, single-line, tool-prefixed, and trailing-devops-cli-service commentedon Nov 11, 2026
Status set to Ready at c653bde (see proposed design in issue body).
dan-petty commentedon Nov 11, 2026
Service data, 48 hours to 2026-11-10T23:45Z: trace gate refusals
Count: 34 item failures on 30 items had a trace-path refusal ("The Feasibility section states that
<path>was read, but the run did not read it"), with 74 refused sentences. 5 more item failures on 5 items had a trace-tool refusal.devops_cli_roadmap_stage_gate_refusals_total{gate="trace"}increased by about 89 refusal rounds. By final item failures, trace is the largest gate.First and last: the first failure at 00:21Z on 2026-11-09, the last in the window at 20:24Z on 2026-11-10. After the window, #4442 and #3388 failed at 02:27Z on 2026-11-11 on the current image. Still occurring: yes. 3 item failures in the last 6 hours of the window (#4401, #4412, #3387).
By deploy: 30 of the 34 item failures came before the #4299 and #4329 fixes went live (0.106.0, 03:19Z on 2026-11-10). 35 of their sentences used the
path:N:textorpath:defforms that #4299 fixed. After that, 4 item failures: #4043 at 07:43Z (SAMPLE.md), #4401 at 18:33Z (src/devops_cli/config/constants.py), #4412 at 20:24Z (13 sentences) and #3387 at 20:24Z (one test path). For #4043, #4412 and #3387, the trace gate was the only problem. About 20 trace refusal rounds came in the 20 hours after the #4329 deploy; the repair round fixed most of them, but each refusal costs one more plan run.This issue's form is the largest share after the fix: 12 of the 16 refused sentences after the #4329 deploy are
path:N-Mspans, all from the #4412 failure. I ran_sentence_trace_problemwith a trace that holdssrc/devops_cli/roadmap/run.py, and the spanrun.py:430-570was still refused._CITATION_PATH(src/devops_cli/roadmap/stage/stage_change.py:1717) and_claimed_path(stage_change.py:1727) parse onlypath:N:textandpath:def|class name.Causes that this issue does not cover (filed as a separate issue, which links here):
_READ_WORDand_uncalled_path(stage_change.py:1694,:1757) take anyread/readsoutside a negation as a claim of the run. Sentences with a subject other than the run are refused: "This plan readstests/ai/client/test_ai_client_finish_reasons.pyin group 2" (fix(ai): price cached prompt tokens of chat calls #4442), and "The probe of the stream type reads, word for word: The pathsrc/devops_cli/ai/client/network.pyis ..." (fix(ai): price cached prompt tokens of chat calls #4442). The quoted-probe requirement of this issue covers a read verb inside a code span only, and these verbs are outside it._paths_in_argumentandTraceFacts.of(src/devops_cli/roadmap/agent_run.py:435,:461) count only thepath,directoryandpathsarguments as reads. A file seen only insearch_codehits or in the probe text counts as not read (feat(roadmap): the stage plan states constant claims in a structured field #3388).Bare names that are not repository files (
SAMPLE.mdin #4043,schedule.jsonin #4412) can be correct refusals.Cost: each refusal ends one plan run and one repair run. Stage error rows took about 71,951 s of the model lane in 48 hours for all gates together; the trace share is not measured apart.
Priority: P1 fits the evidence.
Queries:
devops-cli-service commentedon Nov 11, 2026
Released in v0.111.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.111.0
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 05:46 UTC