Skip to content

fix(roadmap): count a command as removed only when MUST NOT governs it - #4985

Merged
dan-petty merged 6 commits into
mainfrom
fix/4954-count-a-command-as-removed-only
Nov 12, 2026
Merged

dan-petty merged 6 commits into
mainfrom
fix/4954-count-a-command-as-removed-only

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

The stale-command check (#3287) read an ADDED requirement with MUST NOT anywhere as the removal of each devops or -- code span in it. So the plan of #2530, which keeps devops pr check-readiness and forbids one act of it, was refused.

A name is now removed only when MUST NOT or SHALL NOT governs it. The name is in the subject of exist, be available or a passive such as be registered, or in the object of an offer verb such as register, list, support or keep. The subject and the object are whole clause phrases, so adjectives, nouns and closed parentheses can be in them. A name after a preposition, as in "the --old option of devops x", is not removed.

The stage prompt tells the planner to write a removal as "<old name> MUST NOT exist.".

The delta restores the two #3287 requirements that the archive of #4047 dropped.

Closes #4954

Change: openspec/changes/archive/2026-11-12-4954-count-a-command-as-removed-only/

@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 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence

fail-to-pass (uv run devops ci fail-to-pass --base origin/main, base d64c897e2): 7 failed on base, 16 passed, 0 errored in tests/roadmap/stage/test_roadmap_stage_removal_references.py. The cases that fail on base:

  • test_a_requirement_that_forbids_one_act_of_a_command_removes_nothing[2530-must-not-request]
  • test_a_requirement_that_forbids_one_act_of_a_command_removes_nothing[2530-must-not-report]
  • test_a_requirement_that_forbids_one_act_of_a_command_removes_nothing[shall-not-read]
  • test_an_added_requirement_removes_the_name_that_must_not_governs[second-clause]
  • test_an_added_requirement_removes_the_name_that_must_not_governs[in-parentheses]
  • test_an_added_requirement_removes_the_name_that_must_not_governs[option-of-a-command]
  • test_an_added_requirement_removes_the_name_that_must_not_governs[must-not-accept]

The removal cases subject, bare-subject, be-available, subject-list, 3185-must-not-register and 3185-must-not-list pass on base and on the change: the check still refuses each real removal.

Stage replay (uv run devops roadmap eval stage --replay --json), base and change give the same report:

base d64c897e2 change
cases 58 58
judged / known defects 82 / 319 82 / 319
paths (#3010) known / caught / missed 53 / 53 / 0 53 / 53 / 0
kind (#3005) 25 / 25 / 0 25 / 25 / 0
criteria (#3019) 0 / 0 / 0 0 / 0 / 0
content (#3200) 3 / 3 / 0 3 / 3 / 0
prompt_keys (#3328) 1 / 1 / 0 1 / 1 / 0
good plans passed 5 / 5 5 / 5
failures none none

The replay set holds no #2530 case, so a scratch replay ran the stale-command check on the refused #2530 reply (r0) with the base texts of pr-merge-readiness: the old rule removes devops pr check-readiness, devops pr check-readiness --dry-run and devops pr monitor --format markdown and gives 3 problems; the change removes nothing and gives 0 problems.

Spec scan: each spec.md line under openspec/ that the old rule reads as a removal (83 lines on main). The new rule reads one of them as a removal: the #3185 line "MUST NOT register devops roadmap intake-eval as a command or as an alias". A search of the other 82 lines for removal verbs found no removal of a command or an option.

Local checks:

  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-tree: all 7 rows pass.
  • uv run pytest tests/roadmap/stage/test_roadmap_stage_removal_references.py tests/roadmap/stage/test_roadmap_stage_content.py tests/roadmap/stage/test_roadmap_stage_specs.py and the stage-job removal test of test_roadmap_stage_plan.py: 116 passed.
  • uv run mypy on the two changed files: no error in them (18 errors in unchanged tests/support/fakes/* modules come from the partial run).

This is Service code: it waits for the owner's "safe and vetted" call before the merge.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 08:58
@dan-petty
dan-petty marked this pull request as draft November 12, 2026 09:28
@dan-petty

Copy link
Copy Markdown
Owner Author

Review fix: a removal with other words in its subject or its object

Finding (blocking), confirmed. On e4c002b67, _removed_names returned () for each of the 13 removal sentences of the review, for example "The old devops roadmap intake-eval command MUST NOT exist.", "devops roadmap intake-eval MUST NOT be registered as a command.", "devops x MUST NOT support --old." and "The CLI MUST NOT keep devops roadmap intake-eval as an alias.". The old rule caught each of them.

Fix (953928367).

  • The subject is the text from the start of its clause to the verb (exist, be available, or the passive of an offer verb). The clause starts at the line start, after a sentence mark, or after a parenthesis that does not close before the verb. After a modal verb of an earlier clause, the subject starts after the first comma, and, or or but.
  • The object is the text to the end of its clause. The verbs are register, offer, list, accept, expose, provide, support, have and keep, also as a list ("register or list").
  • A span after a preposition or a subordinating word (of, for, between, when, that and the like) is not removed.
  • The stage prompt tells the planner to write the removal as "<old name> MUST NOT exist.". A prompt-rule test reads that sentence from the prompt and sends it through check_proposal.

Evidence.

  • uv run devops ci fail-to-pass --base origin/main (base 87ae9eefa): 15 failed on base, 137 passed, 0 errored, in tests/roadmap/stage/test_roadmap_stage_prompt_rules.py and tests/roadmap/stage/test_roadmap_stage_removal_references.py.
  • On e4c002b67, 13 of the new removal cases and the prompt test fail. On the head, all pass.
  • uv run devops ci test of the removal-references, prompt-rules, content, eval-gates and eval-cases test files: 370 passed.
  • Scan of the 714 lines of every spec.md under openspec/ that hold MUST NOT or SHALL NOT. Lines read as a removal: base rule 157, first version 5, this rule 3. The 3 lines are the refactor(roadmap): move intake-eval under roadmap eval #3185 removal (archive and living spec) and a scenario of this change. The fix(github): Fix check-readiness base and monitor merged state #2530 cases stay green.
  • uv run devops roadmap eval stage --replay: 58 cases, 82 judged defects, each gate catches each known defect, 5 of 5 good plans pass (the same as the first version).
  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-tree: all pass.
  • mypy on the changed files: no error in a changed file (18 errors come from the unchanged tests/support/fakes/ modules that mypy follows).

This is Service code: it waits for the owner's "safe and vetted" call before a merge.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 10:17
@dan-petty
dan-petty enabled auto-merge (squash) November 12, 2026 12:40
The stale-command check read an ADDED requirement as the removal of each
`devops ` or `--` code span when its text held MUST NOT or SHALL NOT
anywhere. A requirement that keeps a command and forbids one act of it,
as the #2530 plan wrote, became a removal. The check now reads a removal
only when the span is the subject of MUST NOT or SHALL NOT with exist or
be available, or the object of register, offer, list, accept, expose or
provide.

Refs #4954
…hrases

The first version of the #4954 rule read only "The" or "Each", a noun and the span before MUST NOT exist. It missed removals that the old rule caught, such as "The old `x` command MUST NOT exist.", "`x` MUST NOT be registered as a command." and "`devops x` MUST NOT support `--old`.".

The subject is now the text from the start of its clause to the verb, and the object is the text to the end of its clause. A span after a preposition or a subordinating word is not removed. The verbs support, have and keep and the passives of the offer verbs count. The stage prompt gives the planner the sentence "`<old name>` MUST NOT exist.", and a test sends that sentence through check_proposal.
…stage/spec-delta

#4981 split roadmap-stage into nested capabilities. The stale-command
check is a check of the spec delta, so its two ADDED requirements go to
roadmap-stage/spec-delta.
@dan-petty
dan-petty force-pushed the fix/4954-count-a-command-as-removed-only branch from 819a1cf to 52e1a7d Compare November 12, 2026 12:48
@dan-petty

Copy link
Copy Markdown
Owner Author

Rebase onto main (head 52e1a7d8f, base b734eb331).

What changed:

  • refactor(openspec): split big capabilities into nested ones #4981 split openspec/specs/roadmap-stage/spec.md into nested capabilities and deleted the flat file. The branch keeps that deletion.
  • The archive and reopen commits that wrote to the flat file are dropped (they cancelled each other). The fix commits replay unchanged: the src/ and tests/ diff is line for line the same as the old head 819a1cfa6.
  • The two ADDED requirements of the stale-command check ("A base requirement that names a removed command is updated", "The stale-command check reads the base requirement texts of its caller") move to specs/roadmap-stage/spec-delta/spec.md. That nested capability holds the checks of the spec delta and the related requirement "The stage prompt requires a modified requirement for a removed command". proposal.md names roadmap-stage/spec-delta.
  • src/devops_cli/ai/tasks/roadmap_stage_change.md: the conflict keeps both sides. The removal rule keeps the sentence "<old name> MUST NOT exist." of this pull request, and the capability rule keeps the nested-capability sentence of main.
  • The archive is the last commit again: openspec/changes/archive/2026-11-12-4954-count-a-command-as-removed-only/, appended to openspec/specs/roadmap-stage/spec-delta/spec.md.

Results:

  • uv run pytest tests/roadmap/stage/test_roadmap_stage_removal_references.py tests/roadmap/stage/test_roadmap_stage_prompt_rules.py: 152 passed.
  • uv run pytest tests/roadmap/stage/: 2508 passed, 1 skipped.
  • uv run pytest tests/openspec tests/invariants/test_living_specs.py: 52 passed.
  • uv run devops roadmap eval stage --replay: good plans that every gate accepts 5 of 5; every gate refuses what it must refuse; defects that a gate judges 82 of 319.
  • uv run devops openspec check: passed.

@dan-petty
dan-petty merged commit 2e6f407 into main Nov 12, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/4954-count-a-command-as-removed-only branch November 12, 2026 12:59
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.119.0](v0.118.0...v0.119.0)
(2026-11-12)


### Features

* **repos:** the claim sets In Progress
([#5111](#5111))
([06ef1c6](06ef1c6))
* **roadmap:** a fix-plan step repairs a plan PR with open findings
([#5104](#5104))
([ca5b16d](ca5b16d))
* **roadmap:** extend stage review rounds while open findings drop
([#5090](#5090))
([bacf713](bacf713))
* **roadmap:** re-anchor a stale citation that matches one line
([#5040](#5040))
([16356d8](16356d8))


### Bug Fixes

* **ci:** keep failed test IDs in the service image shard summary
([#5106](#5106))
([88589ef](88589ef))
* **github:** count each page of a paginated GitHub read
([#5070](#5070))
([908e24a](908e24a))
* **github:** keep the metrics permissions out of the runner Job token
([#5064](#5064))
([fb549ff](fb549ff))
* **github:** pace mutations through the clock seam
([#5063](#5063))
([2bd87bc](2bd87bc))
* **k8s:** delete the CoreDNS files that k3s never applies
([#5055](#5055))
([463f601](463f601))
* **monitoring:** tidy LLM stack windows, units and lines
([#5052](#5052))
([375d724](375d724))
* **roadmap:** a refused kept plan uses no stage gate return
([#4983](#4983))
([b8adbca](b8adbca))
* **roadmap:** count a command as removed only when MUST NOT governs it
([#4985](#4985))
([2e6f407](2e6f407))
* **roadmap:** cut prose after a cited stage command
([#4982](#4982))
([a172563](a172563))
* **roadmap:** name every module of a group with no named test
([#5089](#5089))
([27a0e79](27a0e79))
* **roadmap:** stage returns every open review finding to the planner
([#5067](#5067))
([21b116e](21b116e))
* **roadmap:** the alternatives check reads the tools in use
([#5062](#5062))
([8903233](8903233))
* **roadmap:** the constants gate reads 6_500 and no new value
([#5080](#5080))
([8a7b113](8a7b113))
* **roadmap:** the constants gate reads only a stated value
([#5042](#5042))
([cf4733e](cf4733e))
* **telemetry:** read repository traffic as the GitHub App
([#4932](#4932))
([7c42823](7c42823))
* **tests:** close the UDP, DNS and git gaps of the network floor
([#5101](#5101))
([047ee48](047ee48))
* **tests:** repair the bwrap contract suite and gate it
([#5110](#5110))
([9a0659d](9a0659d)),
closes [#4715](#4715)


### Performance Improvements

* **ci:** build the Service image once for its test shards
([#5079](#5079))
([dcf5bd5](dcf5bd5))
* **ci:** run only the required checks on the release PR
([#5057](#5057))
([8174071](8174071))
* **ci:** stop the cache export of pull request image builds
([#5113](#5113))
([ba30820](ba30820))
* **roadmap:** consolidate keeps its vectors in the shared tiers
([#5099](#5099))
([2a8bf1a](2a8bf1a))


### Code Refactoring

* **roadmap:** one Status writer for every job
([#5109](#5109))
([24cfedc](24cfedc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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): count a command as removed only when MUST NOT governs it

1 participant