Repository navigation
Description
Problem
The stage job probes each path that an issue cites at the staging commit (stage_probe, #3011). A citation can be a bare file name with no folder, such as stage_specs.py. The probe checks that name literally at the repository root (git cat-file -e <sha>:stage_specs.py), finds no file there, and reports that the path is no file of the staging commit.
The report is true for the root, but it misleads the planner: a file with that name can exist under a folder. The plan of #3328 (PR #3336) shows the cost. Issue #3328 says "In src/devops_cli/roadmap/stage_eval_gates.py or stage_specs.py". The probe reported stage_specs.py missing at the root, and the plan concluded that "stage_specs.py ... is no file of the commit". But src/devops_cli/roadmap/stage_specs.py exists and reads the base specs, so the plan dismissed a file that exists.
The path check already lists the files of the same name when a path is missing (StagedTree.same_name and path_problems of src/devops_cli/roadmap/stage_paths.py), and the prompt tells the model to use one of them. The probe does not resolve a bare name this way.
Proposed change
When a cited path is no file of the staging commit and its name has files under a folder, the probe names those files, as the path check does. Then the planner reads a file that exists and does not dismiss it. Add a test of the probe for a cited bare name with a file under a folder.
Acceptance criteria
- A cited bare name with a file under a folder makes the probe name that file, and the probe gives the file as the candidate.
- A test asserts that the probe names the file of a cited bare name that has no root file.
Source: #3336
Proposed design
Problem statement
The stage probe checks each cited path at the repository root only. A bare file name such as stage_specs.py fails even when a file with that name exists under src/devops_cli/roadmap/. The planner then dismisses a file that exists. The fix makes the probe name files of the same name under a folder, as the path check already does.
Acceptance criteria
Requirement: Probe names a same-name file under a folder
When a cited path is no file at the staging commit root and the staged tree holds files with the same name under a folder, the stage probe SHALL name those files and give the existing file as the candidate.
Scenario: Cited bare name with a file under a folder
- WHEN The issue cites
stage_specs.py, the staging commit has no rootstage_specs.py, andsrc/devops_cli/roadmap/stage_specs.pyexists. - THEN The probe output names
src/devops_cli/roadmap/stage_specs.pyas the candidate and does not report the bare name as a missing file of the commit.
Requirement: Probe test covers a cited bare name
The probe test suite MUST assert that a cited bare name with no root file gets the matching file under a folder as its candidate.
Scenario: Test of a cited bare name
- WHEN The test runs the probe on a body that cites
stage_specs.pyagainst a staging commit withsrc/devops_cli/roadmap/stage_specs.pyand no rootstage_specs.py. - THEN The test asserts that the probe output names
src/devops_cli/roadmap/stage_specs.py.
Requirement: Probe keeps a root file result
When a cited path exists at the staging commit root, the stage probe MUST keep its current result and MUST NOT list same-name files.
Scenario: Cited root file still passes
- WHEN The issue cites
README.mdand the staging commit holdsREADME.mdat the root. - THEN The probe reports
README.mdas a file of the staging commit and lists no other file.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need. The change extends the repository's own stage_probe path check. Estimated written cost: 400 to 800 tokens to change src/devops_cli/roadmap/stage_probe.py and add one test, and under one hour of elapsed time to implement and review. The project keeps this code.
Key questions
- How should the stage probe find a cited bare name that is no root file?: Use the existing
StagedTree.same_namemethod to list files of the same name under a folder, aspath_problemsdoes. Do not add a second name search. (best practice) [sources: src/devops_cli/roadmap/stage_paths.py, src/devops_cli/roadmap/stage_probe.py]- Chosen: Call
StagedTree.same_name. The path check and the probe then use one rule for same-name files. - Rejected: Add a name search inside
stage_probe.py. It duplicates the rule and can drift from the path check. - Rejected: Read
git ls-filesagain in the probe. It repeats the tree read and ignores the existing limit.
- Chosen: Call
- How many same-name files should the probe name?: Name at most
SAME_NAME_MAXfiles, which is five, in sorted order. This matchesStagedTree.same_nameandpath_problems. (best practice) [sources: src/devops_cli/roadmap/stage_paths.py]- Chosen: Use
SAME_NAME_MAXfromstage_paths.py. The probe keeps the same bound as the path check. - Rejected: Name every same-name file. A large tree can flood the probe output and the planner context.
- Rejected: Name one file only. The planner can miss the correct file when several files have the same name.
- Chosen: Use
- What should the probe output when a cited bare name has a matching file under a folder?: The probe must name the matching path and give it as the candidate. The planner then reads a file that exists. (best practice) [sources: src/devops_cli/roadmap/stage_probe.py, src/devops_cli/roadmap/stage_paths.py]
- Chosen: Name the matching path as the candidate. It follows the path check and removes the false missing-file report.
- Rejected: Report the bare name as missing at the root. The report is true for the root but misleads the planner.
- Rejected: Report the bare name with no candidate. The planner cannot resolve the file and may dismiss a file that exists.
- Which test module should hold the new probe test?:
tests/roadmap/test_roadmap_stage_probe.pyholds the tests ofstage_probe, so the new case joins it. [sources: tests/roadmap/test_roadmap_stage_probe.py, src/devops_cli/roadmap/stage_probe.py] - Does the change need a new dependency or a new module?: No. The change uses
StagedTree.same_namein the existingstage_probemodule and adds one test. [sources: src/devops_cli/roadmap/stage_paths.py, src/devops_cli/roadmap/stage_probe.py, tests/roadmap/test_roadmap_stage_probe.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 4, 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.The probe misleads the planner into dismissing existing files, but the project still stages plans.Preventing false dismissals of existing files improves plan accuracy for every issue that cites a bare name.The same_name lookup already exists in path_problems; the fix wires it into the probe and adds one test.Both fix the probe reporting a file as missing when it exists, but #3301 fixes a wrong commit reference while the candidate fixes bare-name resolution to a subfolder path.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at c6274f7 (see proposed design in issue body).
devops-cli-service commentedon Nov 4, 2026
Staged: branch
fix/3415-the-stage-probe-names-the-files, draft pull request #3437. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
A model review of the plan found these points. They stop no draft, and a person judges them:
otherat group 1, tests: The plan adds anls-treecommand to the probe. An existing test asserts that the probe runs onlycat-file,grepandlog, and the plan does not update it. The tree read also takes one command from the budget, so the bound tests that assert exact command counts and skipped items would change. Evidence: "assert {args[0] for args in ran} == {"cat-file", "grep", "log"}"otherat group 1, implementation: The implementation adds a message text undersrc/devops_cli/lang/, but the group lists no file there inchangesorreads. The step that edits files will not know the file to change. Evidence: "add a candidate text to the roadmap messages ofsrc/devops_cli/lang/"The plan run made 2 model request(s), and used 149161 input tokens and 5462 output tokens. The model made no tool call.
The stage job read the open pull requests and their files in 1 GraphQL request(s).
docs(openspec): make the #3415 probe plan name the updated test
docs(openspec): plan #3415 resolve a cited bare name in the stage pro…
devops-cli-service commentedon Nov 4, 2026
Released in v0.55.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.55.2
devops-cli-service commentedon Nov 4, 2026
Live since 2026-11-04 14:17 UTC
docs(openspec): plan #3443 Name the test case that a change invalidat…