Repository navigation
Description
Problem or Motivation
When a plan removes or deprecates an exposed entity (such as an MCP tool, a CLI command, a parameter, or a configuration constant), existing tests and contract checks often reference that entity directly.
In plan #3230 (pull request #3283), the planner removed valkey_set from CONST_MCP_EXPOSURE_TABLE and _PATH_PARAM_RESTRICTIONS. The planner did not check downstream test references to valkey_set. It omitted four contract tests in tests/ai/mcp/test_fastmcp_contracts.py and two tests in tests/ai/mcp/test_mcp.py (test_export_schemas_command and mcp_command_exclusions). When implemented, these omitted tests fail immediately.
Proposed Solution & Architectural Design
Add a probe during plan staging (devops roadmap stage) that detects deletions from registries, exposure tables, or command sets:
- When a plan proposes removing a public entity, search
tests/and source files for references to the symbol. - Require the proposal, design, and task list to account for each reference (by migrating tests, updating coverage exclusions, or deleting obsolete assertions).
- Emit a validation failure if unhandled downstream references exist in tests.
Target Subsystem
SDLC, Git & PR Governance
Existing Tool Considered
git grep and pytest find broken references only after code changes are implemented. The planning stage currently lacks a reference scan for deleted entities. Cost to build: about 15k tokens and 1 hour.
Source: #3283
Proposed design
Problem statement
A plan that removes a public entity can leave tests that name that entity. The stage job does not check those references now. The stage job must find each reference and make the plan account for it. The reported case is plan #3230.
Acceptance criteria
Requirement: removal-reference scan
The stage job SHALL scan tests/ and src/ for each name that the change folder declares as removed, before the draft pull request opens.
Scenario: a test file references a removed name
- WHEN a temporary repository holds a change folder that names
valkey_setas removed andtests/example_test.pyreferences it - THEN the scan reports
tests/example_test.pyas an unhandled reference tovalkey_set.
Requirement: removed names come from a removal verb
The scan SHALL take each backticked identifier that a removal verb governs in proposal.md or design.md as a removed name.
Scenario: a removal sentence names two identifiers
- WHEN a fixture
proposal.mdholds the sentenceremovesvalkey_setfromCONST_MCP_EXPOSURE_TABLE`` - THEN the scan searches for
valkey_setand does not search forCONST_MCP_EXPOSURE_TABLE.
Requirement: a task that names the file accounts for the reference
The scan SHALL treat a reference as accounted for only when the change's tasks.md names the file that holds it.
Scenario: tasks.md names the test file
- WHEN a fixture
tasks.mdnamestests/example_test.pyand that file references the removed name - THEN the scan reports no unhandled reference for
tests/example_test.py.
Requirement: stage fails on an unhandled test reference
devops roadmap stage MUST exit non-zero with each unhandled test reference and MUST open no draft pull request.
Scenario: an unhandled test reference stops the stage
- WHEN the scan finds an unhandled reference in
tests/ - THEN the command exits non-zero, the message names the file and the removed name, and the stage opens no draft pull request.
Requirement: a source reference is a warning
The scan SHALL report an unhandled reference in src/ as a warning and SHALL NOT fail the stage for it.
Scenario: only a source file references the removed name
- WHEN a fixture
src/example.pyreferences the removed name andtasks.mddoes not name it - THEN the stage succeeds and its comment names
src/example.pyas a warning.
Requirement: a change with no removal passes
A change folder that names no removed entity SHALL pass the scan with no finding.
Scenario: a plan removes nothing
- WHEN no sentence in
proposal.mdordesign.mdhas a removal verb and a backticked identifier - THEN the scan reports no finding and the stage proceeds.
Existing Tool Considered
No alternatives check has run. The closest open, maintained tools are git grep (Git, GPL-2.0) and vulture (MIT). git grep finds each reference to a name. vulture finds dead code. Neither reads an OpenSpec change folder. Neither knows which names a plan removes. Neither fails devops roadmap stage. The written cost to build, keep and fix the probe is about 15,000 tokens and 1 hour.
Key questions
- Which files reference
valkey_setat the staging commit?:tests/ai/mcp/test_fastmcp_contracts.py,tests/ai/mcp/test_mcp.py,src/devops_cli/config/constants.pyand the generateddocs/MCP_TOOLS.mdreferencevalkey_set.CONST_MCP_EXPOSURE_TABLEstill exposes it. [sources: tests/ai/mcp/test_fastmcp_contracts.py, tests/ai/mcp/test_mcp.py, src/devops_cli/config/constants.py, docs/MCP_TOOLS.md] - Should the stage job check removed-entity references with a deterministic scan or with an instruction to the planner model?: A deterministic scan in the stage job. The stage job runs the scan on the written change folder and fails on an unhandled test reference. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, CONTEXT.md]
- Chosen: deterministic scan in the stage job. ADR 0005 keeps a model to explanation and planning. A check must give the same result on equal input.
- Rejected: planner-prompt instruction. A model forgets a name. Its result differs between runs, so a missed reference passes.
- Rejected: CI check after implementation. It fails after the code exists. The fix then costs a new change, and the item asks for the check at staging.
- Which names does the probe treat as removed?: Each backticked identifier that a removal verb governs in
proposal.mdordesign.md. (best practice) [sources: openspec/changes/3230-decide-the-free-text-mcp-parameters/proposal.md, openspec/changes/3230-decide-the-free-text-mcp-parameters/design.md]- Chosen: a removal verb plus a backticked identifier. Current plans already state a removal in this form. The probe reads text that exists.
- Rejected: a new machine-readable
## Removalssection. It is a new convention that a planner can omit. No current plan has it. - Rejected: the
REMOVED Requirementsof the spec delta. An exposure-table row is no spec requirement. The feat(security): decide the free-text MCP parameters that can carry a secret #3230 change would list nothing.
- What makes a reference accounted for?: The change's
tasks.mdnames the file that holds the reference. (best practice) [sources: openspec/changes/3230-decide-the-free-text-mcp-parameters/tasks.md, openspec/changes/3230-decide-the-free-text-mcp-parameters/design.md]- Chosen: tasks.md names the file. The task list is the work the implement job runs. A file it does not name is a file the plan forgot.
- Rejected: any change file names the removed name.
proposal.mdalways names the removed name, so no reference would ever be unhandled. - Rejected: a per-reference exclusion list in the change. It is a second list to keep in step with
tasks.md.
- Does an unhandled reference in
src/fail the stage?: No. An unhandled reference intests/fails the stage. An unhandled reference insrc/is a warning in the stage comment. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/ai/mcp/generator.py]- Chosen: fail on tests, warn on source. The registry row and the generator are source references. A failure there would stop each correct removal.
- Rejected: fail on both. A correct removal always leaves a source reference that the plan must edit.
- Rejected: warn on both. The item asks for a failure, because a failing test is the cost that it removes.
- Where does the stage job run the scan?: In the stage job, after the planner writes the change folder and before the draft pull request opens. (best practice) [sources: CONTEXT.md]
- Chosen: in the stage job, before the draft pull request opens. Staging writes the change folder and the draft pull request. The plan can still change.
- Rejected: in the implement job, before the first step. The plan has merged by then. A failure costs a second change.
- Rejected: in
devops roadmap refine. The change folder does not exist yet at refinement.
- Does the scan run on every stage?: Yes. A change folder that names no removal passes at once, and the check has one path. (best practice) [sources: CONTEXT.md]
- Chosen: run on every stage. The gate that decides whether to run is the same parse. A condition saves no work and adds a path.
- Rejected: run only when the change names a removal. It adds a branch to test. The parse must run to find the removal anyway.
- How does the probe test a removal when the item's own change folder removes nothing?: Use a fixture change folder and fixture files in a temporary repository. Do not require the item's change folder to name a removal. (best practice) [sources: src/devops_cli/config/constants.py, tests/ai/mcp/test_mcp.py]
- Chosen: a fixture change folder.
CONST_MCP_EXPOSURE_TABLEstill exposesvalkey_setat the staging commit. A fixture makes the test independent of the current table. - Rejected: the feat(security): decide the free-text MCP parameters that can carry a secret #3230 change folder. The stage job returned the item because that premise does not hold at the staging commit.
- Rejected: the item's own change folder. The item adds a probe and removes no entity. It cannot declare a removal.
- Chosen: a fixture change folder.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-06: partly.
Tool: git/git (https://github.com/git/git), NOASSERTION, last activity 2026-11-06, maintained.
Activity
dan-petty commentedon Nov 3, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It prevents a known class of test failures at planning time but does not block a release or fix a live defect.It catches a recurring class of omissions in plans that remove exposed entities.The body estimates about 15k tokens and 1 hour of work.Both add a validation probe during plan staging that checks references, but #3307 checks callers of a changed signature while the candidate checks test references of a removed entity.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at b46b6bd (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
placeholder
devops-cli-service commentedon Nov 5, 2026
Status set to Ready at d254410 (see proposed design in issue body).
devops-cli-service commentedon Nov 6, 2026
Alternatives check: partly
Tool: git/git (https://github.com/git/git)
Covers:
tests/andsrc/deterministically, which is the reference scan the stage probe needsLacks:
proposal.mdordesign.mdtasks.mdnames the filedevops roadmap stage, block the draft pull request, or separate atests/failure from asrc/warningSearches run:
Sources:
Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.
[-]feat(roadmap): the stage probe checks downstream test references of an entity a plan removes[/-][+]feat(roadmap): Check test references to entities a plan removes[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 77 characters, and the limit is 60. The type and the scope stay.
feat(roadmap): the stage probe checks downstream test references of an entity a plan removesfeat(roadmap): Check test references to entities a plan removesdevops-cli-service commentedon Nov 9, 2026
Released in v0.97.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.97.0
devops-cli-service commentedon Nov 9, 2026
Live since 2026-11-09 01:02 UTC