Skip to content

fix(roadmap): the trace gate reads the path of each citation form - #4500

Merged
dan-petty merged 2 commits into
mainfrom
fix/4463-trace-gate-citation-forms
Nov 11, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/4463-trace-gate-citation-forms

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The Feasibility trace gate of the stage job refused plans that cite a file that the run read. It took the path of a code span only from path:N:text and path:def name, so a path:N-M, a path:N, a toolbox tool name before the path and a directory with a trailing / did not match the read paths. It also read a claim from a probe line that the plan quotes, which the content gate asks for. Now _claimed_path takes the path of each of these forms, with the tool names of the toolbox, _was_read ignores a trailing /, and _trace_problems removes the quoted probe sentences before it reads the claim. A path that the run did not read stays refused in each form.

Closes #4463

Change: openspec/changes/archive/2026-11-11-4463-the-trace-gate-refuses-valid-citation/

The trace gate takes the path of a path:N and a path:N-M citation, removes a toolbox tool name before the path and a trailing slash, and removes a quoted probe line before it reads the claim. A path that the run did not read stays refused.

Refs #4463
@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 11, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 05:09
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 05:09
@dan-petty
dan-petty merged commit dac1cb9 into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the fix/4463-trace-gate-citation-forms branch November 11, 2026 05:27
@dan-petty

dan-petty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner Author

Evidence and measurements

Fail-to-pass

uv run devops ci fail-to-pass --base origin/main (exit 0): 25 failed on base (25 failed and 23 passed in tests/roadmap/stage/test_roadmap_stage_trace_spans.py; 0 errored). All pass on the head. The tests that pass on the base are the old cases and the new cases that must stay refused (an unread path in each form, a word that is no toolbox tool).

Golden replay

uv run devops roadmap eval stage --replay on the base and on the change gives the same report: 57 cases, 81 of 318 defects caught by a gate, 0 missed, and 5 of 5 good plans accepted. No caught defect is lost.

Cause count on the stored refusals

The Service keeps the refused replies of the last run of each item (<n>.refused.json). On 2026-11-11 it held 19 records. 11 replies of 9 items hold 32 trace refusals:

Form of the refused span Count
path:N-M 14
path:N 1
toolbox tool name before the path 3
path:def name (a run before #4299) 1
bare path 13

18 of 32 use a form that _claimed_path cannot match. This confirms the study (13 + 2 + 3 = 18; my split puts one of its path:N cases in path:N-M). 6 of the 13 bare paths come from a quoted probe line.

The Service log (Loki, 2026-11-09 00:00 UTC to 2026-11-11 03:00 UTC) holds 78 trace refusals of the last replies of 32 items. 35 are path:N:text or path:def name, all in runs up to 2026-11-10 01:51 UTC, which #4299 handles. 12 are path:N-M and 2 are a directory with a trailing / (tests/telemetry/ of #3532, src/devops_cli/ai/tasks/ of #3599).

What the change clears

The stored records hold no trace, so I replayed the gate with the known part of the trace: a path that the base gate claimed in a reply and did not refuse was read. With that trace the base gate gives 31 of the 32 stored refusals again (the other one is the path:def name refusal from before #4299).

On the same 31 refusals, the change:

In one sentence of #3049, the removed probe quote leaves src/devops_cli/roadmap/implement/implement_pull.py as the first path of the sentence. The known trace does not hold it, so the replay counts 1 refusal that the base did not give. The plan quotes three lines of that file, so the run probably read it.

The 62 refusals of the 48-hour review count the trace and citation refusals of all runs. The Service keeps only the last run of each item, so the earlier replies cannot be replayed.

Checks run here

  • uv run pytest tests/roadmap/stage tests/roadmap/test_roadmap_plan_check.py: 2239 passed, 1 skipped.
  • uv run mypy on the two changed files: no issues.
  • The full local devops ci was not run: .data/agent/ci.lock was held by other agents. All GitHub checks of this pull request pass (29 pass, 3 skip by their trigger).

Test speed

The new tests pass registry=[], so the registry gate does not parse each test file of the repository (about 6 s for each check_proposal call). Other stage test files still pay this cost: #4509.

Out of scope, filed

No change to the live cluster, ConfigMap or Secrets is needed. The Service gets the fix with its next image.

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): the trace gate refuses valid citation forms

1 participant