Skip to content

fix(roadmap): name the same-name file of a stale test path - #4591

Merged
dan-petty merged 2 commits into
mainfrom
fix/4498-same-name-test-path
Nov 11, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/4498-same-name-test-path

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The problem of a test path that names no file of the staged commit now ends with the same hint as the missing-path problem: the files of the staged tree with that file name, or a statement that no file has the name. Before, the problem named only the wrong path, and in 3 of 3 refused Service records the second reply repeated it. same_name_hint in stage_paths.py makes the hint for the path gate and the test-path gate, so the two texts cannot drift apart.

Closes #4498

Change: openspec/changes/archive/2026-11-11-4498-name-the-same-name-file-of/

@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

Copy link
Copy Markdown
Owner Author

Measurements

fail-to-pass (uv run devops ci fail-to-pass --base origin/main, base 5f75d25):

  • failed on base: tests/roadmap/stage/test_roadmap_stage_form.py::test_a_missing_test_path_names_the_file_of_the_same_name (AssertionError)
  • failed on base: tests/roadmap/stage/test_roadmap_stage_form.py::test_a_missing_test_path_with_no_file_of_the_same_name_says_so (AssertionError)
  • 2 failed and 70 passed on base. On the change, uv run devops ci test tests/roadmap/stage/test_roadmap_stage_form.py tests/roadmap/stage/test_roadmap_stage_paths.py gives 193 passed.

Stage replay (uv run devops roadmap eval stage --replay --json), base 5f75d25 and change:

Report field Base Change
cases 57 57
known defects / judged 318 / 81 318 / 81
good plans passed 5 of 5 5 of 5
failures 0 0

Every field of the two JSON reports is equal. The change alters only the text of the problem, not which plan the gate refuses.

Premise: git ls-files at the base finds exactly one file with the name of each wrong path of the issue: tests/github/test_item_grounding.py, tests/support/keyring_isolation.py and tests/prometheus/test_k8s_monitoring_alerting.py. With this change, the problem of each of the three refused items names that file.

Overlap with open pull requests: #4544 changes stage_change.py only at lines 1691-1900 (trace gate). #4548 changes stage_paths.py at line 34 and from line 337. This change touches _stale_test_path_problems, _problem and one import line, so the diffs do not overlap.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 10:44
@dan-petty
dan-petty force-pushed the fix/4498-same-name-test-path branch from 5e30ec7 to 88f9a74 Compare November 11, 2026 12:41
The problem of a test path that names no file of the staged commit now
ends with the same hint as the missing-path problem. The hint names the
files of the staged tree with that file name, or states that no file has
the name. The planner can then correct the path in its next reply.

same_name_hint in stage_paths.py makes the hint for both gates.
@dan-petty
dan-petty force-pushed the fix/4498-same-name-test-path branch from 88f9a74 to 042fde5 Compare November 11, 2026 12:56
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 12:57
@dan-petty
dan-petty merged commit 2e0be77 into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the fix/4498-same-name-test-path branch November 11, 2026 13:16
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): name the same-name file of a missing test path

1 participant