Repository navigation
Description
Problem
The removal-reference scan (find_removed_names, used by _check_removal_references of stage and, from #6705, by devops roadmap plan-recheck --base) reads the word "dropped" before a code span as the removal of that name. Example: the merged plan of #6705 (openspec/changes/6705-stage-agent-stock-coder/) says that a step is "dropped" next to a code span such as rewrite. The recheck then reports removal-reference findings for names that the plan does not remove.
A test reference of such a name makes the scan refuse the plan. So a correct plan that uses this wording ends as plan_defect in stage, and from #6705 also in the agent's own check.
Change
Make find_removed_names take a name as removed only when the plan says that the code entity is removed or deleted. A plan that only says that a step, a rule or a behavior is dropped must not count.
Acceptance criteria
- A test with "dropped" before a code span that names no removed entity gets no removal-reference finding.
- A test of a plan that deletes a function that a test names still gets the finding.
Dependencies
None.
Source
Source: #6883
Alternatives check of 2026-11-23: none.
Tool: none found.
Reason: Searches found only prose linters and dead-code finders; none reads plan prose to tell a removal verb from "dropped" before a code span, so the fix belongs in the project's own find_removed_names.
Lacks:
- No verb-aware reading of plan prose around a code span
- No cross-check of test references against removed names
- No OpenSpec plan-defect finding of the removal-reference kind
Proposed design
Problem statement
The removal-reference scan reads the word dropped before a code span as the removal of that name. A correct plan that says a step is dropped then gets a removal-reference finding, and stage ends it as plan_defect; from #6705 the devops roadmap plan-recheck --base path does the same. The change makes find_removed_names ignore drop, drops and dropped as removal words, and keeps the removal and deletion words that name a code entity.
Acceptance criteria
Requirement: Dropped is not a removal word
find_removed_names SHALL NOT take dropped as a removal word before a code span.
Scenario: A dropped step before a code span
- WHEN the plan text reads
The plan dropped therewritestep. - THEN
find_removed_namesreturns an empty set.
Requirement: Drops is not a removal word
find_removed_names SHALL NOT take drops as a removal word before a code span.
Scenario: A drops sentence before a code span
- WHEN the plan text reads
Another item dropstool_afrom the registry. - THEN
find_removed_namesreturns an empty set.
Requirement: A dropped step gives no removal-reference finding
scan_removal_references SHALL report no removal-reference finding for a plan that drops a step beside a name that a test holds.
Scenario: A plan that drops a step beside a name that a test holds
- WHEN the proposal reads
The plan dropped therewritestep.andtests/example_test.pyholdsrewrite - THEN
scan_removal_referencesreturnsunhandled_tests == {}andhas_test_failures is False.
Requirement: A deleted function still gets a finding
scan_removal_references SHALL report the test reference of a name that the plan deletes.
Scenario: A test references a deleted function
- WHEN the proposal reads
The change deletesvalkey_set.andtests/example_test.pycallsvalkey_set - THEN
scan_removal_referencesreturnsunhandled_tests == {"valkey_set": ["tests/example_test.py"]}.
Requirement: A removed helper is still a removal
find_removed_names SHALL return a name that the plan says is removed.
Scenario: A removed helper
- WHEN the plan text reads
The change removesold_helper. - THEN
find_removed_namesreturns{"old_helper"}.
Requirement: The passive form still names a removal
find_removed_names SHALL return a name in the passive removal form.
Scenario: A name that is removed
- WHEN the plan text reads ``tool_b
is removed fromactive_tools`.` - THEN
find_removed_namesreturns{"tool_b"}.
Existing Tool Considered
The alternatives check of 2026-11-23 records the verdict none and names no tool: no open, maintained tool reads plan prose to tell a removal word from dropped before a code span. The alternatives block in the issue body names the tools it considered and what they lack. The change edits the existing find_removed_names in src/devops_cli/roadmap/stage/stage_removal_references.py and adds tests to the existing scan; it keeps no new code. The written cost is about 10k tokens and under 1 hour.
Key questions
- Which removal words count as the removal of a code entity?:
remove,delete,deprecateandretirecount, in the active and the passive form.drop,drops,droppedanddroppingdo not count. (best practice) [sources: src/devops_cli/roadmap/stage/stage_removal_references.py, openspec/specs/roadmap-stage/references/spec.md, tests/roadmap/stage/test_roadmap_stage_removal_references.py]- Chosen: Remove the
dropfamily from the removal words. It removes the false positive with the smallest change, becausedropis the one word that also names a step, a rule or a behavior. - Rejected: Keep
dropwhen a code-entity noun follows it. The plan may omit the noun, and the scan has no entity classifier, so the false positive stays. - Rejected: Require a test reference before a removal counts. This misses a removed source name that no test references.
- Rejected: Remove
deprecateandretireas well. They name a code entity, and this issue names onlydroppedas the false positive.
- Chosen: Remove the
- Which callers reach the change?:
_check_removal_referencesof stage callsfind_removed_namesthroughscan_removal_references, and thedevops roadmap plan-recheck --basepath from refactor(roadmap): the stage agent is stock Coder #6705 calls the same function. The fix infind_removed_namesreaches both callers. [sources: src/devops_cli/roadmap/stage/stage.py:1296, src/devops_cli/roadmap/stage/stage_removal_references.py] - Where does the regression test go?: In
tests/roadmap/stage/test_roadmap_stage_removal_references.py, beside the tests offind_removed_namesandscan_removal_references. [sources: tests/roadmap/stage/test_roadmap_stage_removal_references.py] - Which existing test changes with the new removal words?:
test_find_removed_names_handles_multiple_identifiers_and_verbsasserts that the sentenceAnother item dropstool_afromregistry.returnstool_a. The change takestool_aout of that expected set. [sources: tests/roadmap/stage/test_roadmap_stage_removal_references.py] - Does the change need a spec delta for
roadmap-stage?: Yes. The change folder carries a spec delta that states the removal words offind_removed_names, andopenspec archivewrites it into the spec with the code change. (best practice) [sources: openspec/specs/roadmap-stage/references/spec.md, CONTEXT.md]- Chosen: Update the spec with the code change. The spec states the behavior of
find_removed_names, and OpenSpec requires the spec delta to match the behavior change. - Rejected: Leave the spec unchanged. The spec would still state a removal word that the scan no longer reads.
- Chosen: Update the spec with the code change. The spec states the behavior of
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 23, 2026
Both fix false positives in find_removed_names, but #6328 skips Python keywords while this candidate skips the word "dropped" used for steps or rules.devops-cli-service commentedon Nov 23, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 23, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (2)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 23, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
chore(main): release 0.217.0 (#7098)
devops-cli-service commentedon Nov 25, 2026
Released in v0.217.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.217.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 06:46 UTC