Skip to content

fix(roadmap): the removal scan misreads dropped before a code span #6884

Description

@dan-petty

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 the rewrite step.
  • THEN find_removed_names returns 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 drops tool_a from the registry.
  • THEN find_removed_names returns 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 the rewrite step. and tests/example_test.py holds rewrite
  • THEN scan_removal_references returns unhandled_tests == {} and has_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 deletes valkey_set. and tests/example_test.py calls valkey_set
  • THEN scan_removal_references returns unhandled_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 removes old_helper.
  • THEN find_removed_names returns {"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_bis removed fromactive_tools`.`
  • THEN find_removed_names returns {"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, deprecate and retire count, in the active and the passive form. drop, drops, dropped and dropping do 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 drop family from the removal words. It removes the false positive with the smallest change, because drop is the one word that also names a step, a rule or a behavior.
    • Rejected: Keep drop when 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 deprecate and retire as well. They name a code entity, and this issue names only dropped as the false positive.
  • Which callers reach the change?: _check_removal_references of stage calls find_removed_names through scan_removal_references, and the devops roadmap plan-recheck --base path from refactor(roadmap): the stage agent is stock Coder #6705 calls the same function. The fix in find_removed_names reaches 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 of find_removed_names and scan_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_verbs asserts that the sentence Another item drops tool_afromregistry. returns tool_a. The change takes tool_a out 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 of find_removed_names, and openspec archive writes 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.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. dan-petty commented on Nov 23, 2026

    @dan-petty
    OwnerAuthor
  2. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 23, 2026
  3. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  4. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

    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:

    • open source tool check documentation plan for references to deleted functions, results: 5
    • Python library detect removed code entity names in prose plan text removal verbs, results: 5

    Sources:

  5. added
    status/ready
    and removed
    status/new
    on Nov 23, 2026
  6. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  7. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 25, 2026
  8. removed
    status/in-review
    on Nov 25, 2026
  9. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 06:46 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions