Repository navigation
Description
Problem Description
The Feasibility trace gate of the stage job refuses sentences that make no claim about what the run read. It also refuses a file that the run saw in a search hit or in the probe output. #4463 covers the citation forms that _claimed_path does not parse (path:N-M, path:N, a tool prefix, a trailing slash). This issue covers two other causes that #4463 does not fix.
Cause 1: the gate reads any "read" word as a claim about the run. _READ_WORD (src/devops_cli/roadmap/stage/stage_change.py:1694) and _uncalled_path (stage_change.py:1757) take each read or reads outside a negation as a claim that the run read the first path span of the sentence. _CODE_READS (stage_change.py:1699, from #4314) exempts only a code span, it or which as the subject. Other subjects are not exempt: "this plan", "the probe", "the group that changes the catalog". The gate does not parse the sentence, so it cannot tell a claim of the run from a statement about the plan or about code.
Cause 2: the read set counts only some tool arguments. _paths_in_argument (src/devops_cli/roadmap/agent_run.py:435) and TraceFacts.of (agent_run.py:461) record as reads only the path, directory and paths arguments of tool calls. A file that the run saw only in search_code hits or in the probe text counts as not read.
Both causes apply on origin/main 0ac2f76 and in the live 0.110.0 image.
Reproduction Steps
- Make a
StageProposalwhose Feasibility section holds this sentence from the refused record of fix(ai): price cached prompt tokens of chat calls #4442:This plan reads `tests/ai/client/test_ai_client_finish_reasons.py` in group 2. - Make a
TraceFactsthat does not hold that path. - Call
_trace_problems(proposal, trace). The gate returns "The Feasibility section states thattests/ai/client/test_ai_client_finish_reasons.pywas read, but the run did not read it." - Do the same with these sentences from the refused records of 2026-11-11:
- fix(ai): price cached prompt tokens of chat calls #4442:
The probe of the stream type reads, word for word: The path `src/devops_cli/ai/client/network.py` is a file of the staging commit. - feat(roadmap): the stage plan states constant claims in a structured field #3388:
`search_code` ... shows the import line `tests/roadmap/implement/test_roadmap_implement_amend.py:5:...`, so the group that changes the catalog reads that test.
- fix(ai): price cached prompt tokens of chat calls #4442:
Expected vs Actual Behavior
Expected: the gate refuses only a claim that the run read a file (a first-person or run subject), and only for a file that the run never saw. A sentence whose subject is the plan, a group, the probe or code is no read claim. A path from a search_code hit or from the probe text counts as seen.
Actual: the gate refuses all three sentences above. Each refusal costs one more plan run, and two refusals end the item with "The change fails its checks, also after a second try".
48-hour data (2026-11-08T23:45Z to 2026-11-10T23:45Z):
- 34 item failures on 30 items had a trace-path refusal (74 refused sentences), plus 5 trace-tool refusals on 5 items.
- 30 of the 34 came before the fix(roadmap): the trace gate judges the path of a citation #4299 and fix(roadmap): the trace gate counts code that reads a file #4329 fixes went live (03:19Z on 2026-11-10). After that: 4 item failures (fix(roadmap): halt implement step on consecutive command refusals #4043 07:43Z, fix(security): 52 Trivy-config alerts stay open, none judged #4401 18:33Z, fix(service): route issues webhooks past scoped intake #4412 20:24Z, feat(roadmap): Stage items whose draft plan fails the check #3387 20:24Z). For fix(roadmap): halt implement step on consecutive command refusals #4043, fix(service): route issues webhooks past scoped intake #4412 and feat(roadmap): Stage items whose draft plan fails the check #3387, the trace gate was the only problem.
devops_cli_roadmap_stage_gate_refusals_total{gate="trace"}increased by about 89 refusal rounds in 48 hours, and about 20 rounds in the 20 hours after the fix(roadmap): the trace gate counts code that reads a file #4329 deploy.- Still occurring: at 02:27Z on 2026-11-11, fix(ai): price cached prompt tokens of chat calls #4442 (3 sentences) and feat(roadmap): the stage plan states constant claims in a structured field #3388 (1 sentence) failed on the current image. Causes 1 and 2 give those refusals, not the forms of fix(roadmap): the trace gate refuses valid citation forms #4463.
Environment Diagnostics
- DevOps CLI Version: 0.110.0 (the live roadmap-service pod)
- Python Version: 3.14
- OS & Architecture: Linux x86_64
- Execution Environment: Roadmap Service (the stage row in the cluster)
Logs, Traces, or Terminal Output
# Loki, 2026-11-08T23:45Z to 2026-11-11T03:15Z
{namespace="devops", app_kubernetes_io_name="roadmap-service"} |= "Service job execution failed" |= "the stage job failed for"
sum(count_over_time({namespace="devops"} |= "but the run did not read it" [48h]))
# Prometheus
sum by (gate) (increase(devops_cli_roadmap_stage_gate_refusals_total[48h]))
# Refused records, read-only, in the roadmap-service pod
/home/devops/.data/roadmap/stage/dan-petty/devops-cli/4442.refused.json
/home/devops/.data/roadmap/stage/dan-petty/devops-cli/3388.refused.json
The Feasibility section states that `tests/ai/client/test_ai_client_finish_reasons.py` was read, but the run did not read it.Related: #4463 (citation forms, open), #4314, #4290, #4281, #4257 and #3266 (closed earlier forms), #3978 (a different change).
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 Feasibility trace gate refuses valid plan sentences. It treats any read word as a claim about the run. It also records as reads only some tool arguments. The gate must refuse only a run read claim for a path that the run never saw. It must also count paths from search hits and probe text as seen.
Acceptance criteria
Requirement: Non-run subjects are not read claims
The trace gate SHALL treat a read verb as a claim about the run only when its subject is first-person or names the run.
Scenario: A plan subject is not a run read
- WHEN The Feasibility section says
This plan reads tests/ai/client/test_ai_client_finish_reasons.pyand the trace facts do not hold that path. - THEN
_trace_problemsreturns no problem for that sentence.
Requirement: Run read claims are still refused
The trace gate SHALL refuse a first-person or run-subject read claim when the trace facts do not hold the claimed path.
Scenario: A run read claim names a missing path
- WHEN The Feasibility section says
I read src/missing.pyand the trace facts do not holdsrc/missing.py. - THEN
_trace_problemsreturns the refusal that namessrc/missing.py.
Requirement: Read object is the claimed path
The trace gate SHALL compare the path that the read verb takes as its object, not the first path in the sentence.
Scenario: A search hit path is not the read object
- WHEN The Feasibility section says
read_fileofsrc/prompt.pyshows the line, andsearch_codereturned a hit insrc/tf.py, and the trace facts holdsrc/prompt.pybut notsrc/tf.py. - THEN
_trace_problemsreturns no problem for the search hit path.
Requirement: read-only is not a read verb
The trace gate SHALL ignore the substring read when it is part of a hyphenated word such as read-only.
Scenario: A read-only root filesystem
- WHEN The Feasibility section says
k8s/devops/cronjob-runner.yamlruns the pod with a read-only root, and the trace facts do not hold that path. - THEN
_trace_problemsreturns no problem for that sentence.
Requirement: Search hit paths count as seen
TraceFacts.of SHALL record as seen each path that a search_code hit line names.
Scenario: A search_code hit line names a test
- WHEN A tool result from
search_codeholdstests/roadmap/implement/test_roadmap_implement_amend.py:5:.... - THEN
TraceFacts.of(trace)holdstests/roadmap/implement/test_roadmap_implement_amend.py.
Requirement: Probe output paths count as seen
TraceFacts.of SHALL record as seen each path that the probe output text names.
Scenario: The probe text names a client file
- WHEN A probe tool result holds
The path src/devops_cli/ai/client/network.py is a file of the staging commit. - THEN
TraceFacts.of(trace)holdssrc/devops_cli/ai/client/network.py.
Requirement: Code subjects are not run read claims
The trace gate SHALL keep the code-span, it and which exemptions for a read verb.
Scenario: A function reads a file
- WHEN The Feasibility section says
because it reads .github/labels.yml of the default branchand the trace facts do not hold that path. - THEN
_trace_problemsreturns no problem for that sentence.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the need. The trace gate is specific to this project. The change edits stage_change.py and agent_run.py and builds no new component. Estimated build cost is about 5,000 tokens. The keep and fix cost is about 1,000 tokens. Elapsed time is under two hours.
Key questions
- Where do the trace gate and the trace facts live?: The gate is
_uncalled_pathinsrc/devops_cli/roadmap/stage/stage_change.py. The facts areTraceFacts.ofinsrc/devops_cli/roadmap/agent_run.py. [sources: src/devops_cli/roadmap/stage/stage_change.py:1757, src/devops_cli/roadmap/agent_run.py:461] - How should the gate tell a run read claim from a statement about the plan, a group, the probe or code?: Use a subject allowlist. Only a first-person subject or a run subject counts as a run read claim. Keep the existing code-span,
itandwhichexemptions. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1694, src/devops_cli/roadmap/stage/stage_change.py:1699, src/devops_cli/roadmap/stage/stage_change.py:1757]- Chosen: Subject allowlist. It matches the expected behavior and does not add a parser dependency.
- Rejected: Exemption list for plan, group, probe and code. A new non-run subject would cause another false refusal.
- Rejected: Full sentence parser. It adds a dependency and is more than the gate needs.
- Which path should the gate compare for a read claim?: Compare the path that follows the read verb and is its object. Do not compare the first path in the sentence. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1726, src/devops_cli/roadmap/stage/stage_change.py:1757]
- Chosen: Path after the read verb. The read claim is about its object, and this removes the feat(roadmap): a plan states the identifiers that a behavior group adds #3453 false refusal.
- Rejected: First path in the sentence. It refuses a path that the read does not name.
- How should the gate treat
readinsideread-only?: Match a read verb only when the next character is not a hyphen. Treatread-onlyas no read claim. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1694]- Chosen: Negative lookahead for a hyphen. It removes the false refusal without a word list.
- Rejected: Keep the word-boundary match.
readinread-onlystill matches.
- Which tool results should add paths to the read set?: Add paths from
search_codehit lines and from probe output text. Keep the existingpath,directoryandpathsarguments. (best practice) [sources: src/devops_cli/roadmap/agent_run.py:435, src/devops_cli/roadmap/agent_run.py:461]- Chosen: Parse structured search hits and probe text. These are paths that the run saw, and the issue shows both false refusals.
- Rejected: Keep only tool arguments. It leaves cause 2 in place.
- Rejected: Parse every path token in every tool result. It adds noise and is not needed for the two named sources.
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.34 item failures in 48 hours and refusals still occur on the live 0.110.0 image.Each false refusal costs a plan run and two refusals end the item, blocking roadmap work.Two functions in two files need targeted changes; the logic is well scoped by the reproduction steps.Both touch _READ_WORD and _uncalled_path for false-positive 'reads' refusals, but #4314 exempts code/it/which subjects while the candidate extends the exemption to plan, probe, and group subjects and adds search_code and probe text to the rdan-petty commentedon Nov 11, 2026
Two more causes of the same type, from a replay of the stored refused records of the Service (2026-11-11, 9 items, 32 trace refusals) with the change of #4463. The change of #4463 fixes the citation forms and quoted probe lines. These 7 bare-path refusals stay:
k8s/devops/cronjob-runner.yamlreadinsideread-only: "k8s/devops/cronjob-runner.yamlruns the pod as user 1000 with a read-only root"._READ_WORDmatchesreadbefore the-.tests/roadmap/implement/test_roadmap_implement_plan_reason.pytests/roadmap/implement/test_roadmap_implement_amend.pytests/ai/client/test_ai_client_finish_reasons.pysrc/devops_cli/roadmap/stage_form.pysrc/devops_cli/commands/tf.pyread_fileof that prompt at lines 24 and 26 shows ..., andsearch_codewithAdds:returned one unrelated hit insrc/devops_cli/commands/tf.py" (cause 2 of this issue covers the search hit)src/devops_cli/roadmap/plan_read.pyread_fileofsrc/devops_cli/roadmap/plan_read.pyline 478 shows ..."; the record holds no traceSo two causes are not in the body above: the word
readinsideread-only, and a claim judged on the first path of the sentence when the read names another object.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at c3f62a9 (see proposed design in issue body).
4 remaining items
docs(openspec): archive the change of #4495
fix(roadmap): a path in the result of a read is not its object
docs(openspec): archive the change of #4495
dan-petty commentedon Nov 11, 2026
Pull request #4544 changes two acceptance criteria of this issue.
The requirement "A search match supports a citation of its line" replaces "Search hit paths count as seen" and "Probe output paths count as seen".
TraceFacts.ofkeeps thepath:lineof eachsearch_codeorcallersmatch line. A Feasibility citation of that line (path:lineorpath:line:text) counts as seen. A claim of the whole file does not count as seen. A probe line gives no support to a path.Evidence (2026-11-11,
_sentence_trace_problemon the branch of #4544):src/devops_cli/commands/roadmap.py:813and the pathsrc/devops_cli/roadmap/stage_change.pyof the feat(roadmap): the plan check pairs each new spec scenario with a test task #3423 probe line. The run read neither file.read_fileonsrc/devops_cli/commands/roadmap.pyshowed the command bodies" and the claim "I readsrc/devops_cli/roadmap/stage_change.py".The false refusals that the two criteria were to stop do not occur without them: a cited match line is seen, and #4463 removes a quoted probe sentence. Thus the narrower rule is not a missing part, and no new issue is necessary. The proposal
## Feasibilitysection of the change records the same evidence.fix(roadmap): a path in the result of a read is not its object
docs(openspec): archive the change of #4495
fix(roadmap): a path in the result of a read is not its object
docs(openspec): archive the change of #4495
fix(roadmap): a path in the result of a read is not its object
docs(openspec): archive the change of #4495
devops-cli-service commentedon Nov 11, 2026
Released in v0.112.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.1
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 15:02 UTC