Skip to content

fix(roadmap): fix-plan keeps the citations that the run of the head read - #5400

Merged
dan-petty merged 3 commits into
mainfrom
fix/5391-fix-plan-stage-reads
Nov 13, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/5391-fix-plan-stage-reads

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The fix-plan Job on #5390 failed at the trace gate after 3 gate returns and 2.4M tokens, before the review of the head. Two defects caused it.

The trace gate of a repair judged each Feasibility sentence of each reply with the reads of the repair only, because no trace of the run that wrote the head is in the process. Now revise gives the sentences of the head to the gate as judged. The gate of the run that wrote the head passed them, so the gate does not judge them again. A sentence that the repair adds or changes is judged with the reads of the repair, so a citation of a file that no run read stays refused.

The gate took the path of a span read_file <path> <start> <end> as all the text after the tool name, so it refused the claim also when the run read the file. Now _citation removes the start and end line after the path of a toolbox tool span.

Closes #5391

Change: openspec/changes/archive/2026-11-13-5391-fix-plan-stage-reads/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 13, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Checks on the branch

  • uv run devops ci fail-to-pass --base origin/main: exit 0. 6 tests fail on the base and pass on the head, and tests/roadmap/stage/test_roadmap_stage_trace_repair.py has a collection error on the base because it imports the new feasibility_sentences. The failed tests on the base:
    • test_roadmap_fix_plan_trace::test_a_repair_keeps_a_citation_that_only_the_stage_run_read: "The Feasibility section states that src/devops_cli/sample.py was read, but the run did not read it."
    • test_roadmap_fix_plan_trace::test_a_repair_that_cites_a_file_that_no_run_read_is_still_refused
    • test_roadmap_fix_plan_trace::test_a_repair_that_reads_the_file_with_its_lines_passes
    • test_roadmap_stage_trace_spans::test_the_line_arguments_after_a_read_path_are_no_part_of_the_path[3915 3935] and [3915]
    • test_roadmap_stage_trace_spans::test_the_refusal_of_a_read_with_line_arguments_names_the_path
  • uv run devops ci test tests/roadmap/stage tests/roadmap/steps/test_roadmap_fix_plan_trace.py tests/roadmap/steps/test_roadmap_fix_plan.py tests/roadmap/test_roadmap_plan_read.py tests/commands/test_roadmap_step_fix_plan.py: 2708 passed, 1 skipped.
  • uv run mypy on the 4 changed source files: no issues. ruff check and ruff format --check: pass.
  • uv run devops ci --check --only lint,format,domain: pass. uv run devops ci docs: up to date. uv run devops openspec check: pass.
  • uv run devops roadmap eval stage --replay (builder run): 82 of 319 defects caught by a gate, 6 of 6 good plans accepted.

Evidence

The Loki line of pod fix-plan-5390-wnpj5 names the refused paths with their line numbers: src/devops_cli/roadmap/decision_step.py 50 215, src/devops_cli/config/constants.py 3915 3935 and src/devops_cli/roadmap/decision_point.py 398 432. The fixture tests/fixtures/roadmap/plan_heads/5390-8d08977ffff4/ is the same as the change folder at the head 8d08977 (each file compared).

Render diff

The branch changes no k8s/ path, so there is no render diff.

After the merge

A release is necessary: the fix-plan Job runs the code of the runner image. The fix commit makes release-please propose a patch release. Acceptance criterion 2 (a fix-plan Job on #5390 reaches the review of the head) can be checked only after the release.

@dan-petty
dan-petty marked this pull request as ready for review November 13, 2026 11:09
@devops-cli-service

Copy link
Copy Markdown
Contributor

Pull request #5400 has merge conflicts with main at commit c5613830fbd8. GitHub cannot merge it. Rebase the branch onto the current main, resolve the conflicts and push the branch.

dan-petty added a commit that referenced this pull request Nov 13, 2026
PR #5387 and PR #5401 merged two minutes apart, and each added
`GitHubClient.get_compare_diff` to `src/devops_cli/github/client.py`
with the same body. Git merged both with no conflict, so `main` defines
the method twice: ruff F811 and mypy `no-redef` fail, the Static
Analysis check of `main` fails, and the pre-push hook refuses every
branch that holds this `main` (#5389 and #5400 wait for this fix). This
change keeps one method and names both callers (#5346, #5388) in its
docstring. The body does not change, so no behavior changes.

Closes #5404
Change:
`openspec/changes/archive/2026-11-13-5404-main-defines-get-compare-diff-twice/`
The step fix-plan failed at the trace gate on #5390 (3 gate returns, 2.4M
tokens). Two defects caused it:

- The repair had no trace of the run that wrote the head, so the gate
  judged each kept Feasibility sentence with the reads of the repair only.
  The gate now gets the sentences of the head as judged and does not judge
  them again. A sentence that a reply adds or changes is judged with the
  reads of the repair, so a citation of a file that no run read stays
  refused.
- The gate took `read_file <path> <start> <end>` as one path, so it
  refused the claim also when the run read the file. The gate now removes
  the line numbers after the path of a toolbox tool span.

Refs #5391.
The Job log of #5390 holds no tool arguments, so the tests do not say that the run read no file. The docstring of _citation names the forms in the order that the code reads them.
The specs roadmap-stage/trace-gate and roadmap-stage/fix-plan get the requirements of the change. Refs #5391.
@dan-petty
dan-petty force-pushed the fix/5391-fix-plan-stage-reads branch from c561383 to 003a389 Compare November 13, 2026 12:06
@dan-petty
dan-petty enabled auto-merge (squash) November 13, 2026 12:12
@dan-petty
dan-petty merged commit 7f4054f into main Nov 13, 2026
24 checks passed
@dan-petty
dan-petty deleted the fix/5391-fix-plan-stage-reads branch November 13, 2026 12:14
dan-petty pushed a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.128.0](v0.127.1...v0.128.0)
(2026-11-13)


### Features

* **roadmap:** extend stage gate returns while the plan improves
([#5389](#5389))
([6d3f954](6d3f954))


### Bug Fixes

* **roadmap:** fix-plan keeps the citations that the run of the head
read ([#5400](#5400))
([7f4054f](7f4054f)),
closes [#5391](#5391)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): fix-plan refuses a citation that the stage run read

1 participant