Repository navigation
Description
Problem or Motivation
The plan in PR #3277 (for #3204) deletes the hand-written exclusion tuple of test_all_cli_commands_are_either_exposed_or_excluded in tests/ai/mcp/test_mcp.py, and it makes the hand-written class of CONST_DOCS_INVENTORY the complement of the other classes. Both changes remove a check that forces a person to decide: a new MCP command, and a new Markdown file with no class, each fail a test today and pass silently after the change. The issue asks for this, and each change is safe by default (a new command is unexposed). Still, AGENTS.md rule 5 says never lower a security or quality threshold, and only the owner can allow it. The plan does not say that it weakens a check, and the review found it by reading the tasks.
Proposed Solution & Architectural Design
- In the plan check, find a task or a decision that deletes a test or an entry of a guard list (
Delete,Remove,drops) undertests/or in aCONST_*inventory, and ask the plan for a## Weakened checksentry: the check, what it stopped, and the safeguard that replaces it or the person who allowed it. - Refuse a plan that deletes such a check and has no entry.
- Test with a plan that deletes
test_all_cli_commands_are_either_exposed_or_excludedand has no entry.
Target Subsystem
src/devops_cli/roadmap/stage_change.py (check_proposal), openspec/config.yaml proposal rules.
Source: #3277
Dependencies
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
Proposed design
Problem statement
check_proposal accepts a plan that deletes a guard check. PR #3277 deletes the hand-written exclusion tuple of test_all_cli_commands_are_either_exposed_or_excluded. It also makes the hand-written class of CONST_DOCS_INVENTORY the complement of the other classes. Each change removes a check that forces a person to decide, and AGENTS.md rule 5 lets only the owner lower a threshold. The plan did not say that it weakens a check, and a review found it by reading the tasks. The check must refuse such a plan unless it records the check, what it stopped and its safeguard.
Acceptance criteria
Requirement: A deleted guard check needs an entry
check_proposal SHALL refuse a plan whose work texts delete a test or a CONST_* entry when no weakened_checks entry names it.
Scenario: A plan deletes a guard test and records nothing
- WHEN A reply deletes
test_all_cli_commands_are_either_exposed_or_excludedin a task, andweakened_checksis empty. - THEN
check_proposalreturns one problem that namestest_all_cli_commands_are_either_exposed_or_excluded.
Requirement: An entry that names the check satisfies the rule
check_proposal MUST accept a plan whose weakened_checks entry names each guard check that the plan deletes.
Scenario: A plan deletes a guard test and records it
- WHEN The reply deletes the same test and gives an entry whose
checkholdstest_all_cli_commands_are_either_exposed_or_excluded. - THEN
check_proposalreturns no weakened-check problem.
Requirement: The proposal file shows each weakened check
render_change SHALL write a ## Weakened checks section that gives the check, what it stopped and the safeguard of each entry.
Scenario: A plan with one weakened check renders
- WHEN A reply gives one
weakened_checksentry. - THEN
proposal.mdholds## Weakened checkswith the check, what it stopped and the safeguard of the entry.
Requirement: A plan that weakens no check keeps its proposal file
check_proposal MUST report no weakened-check problem for a plan that deletes no guard check, and render_change MUST write no ## Weakened checks section for it.
Scenario: A plan that deletes no guard check
- WHEN A reply deletes no test and no
CONST_*entry, andweakened_checksis empty. - THEN
check_proposalreturns no weakened-check problem andproposal.mdhas no## Weakened checkssection.
Requirement: The proposal rules ask for the weakened check
The proposal rules in openspec/config.yaml SHALL ask a plan that deletes a guard check to give the ## Weakened checks entry.
Scenario: The proposal rules name the section
- WHEN A test reads the
proposalrules ofopenspec/config.yaml. - THEN One rule names
## Weakened checksand its three facts.
Existing Tool Considered
No alternatives check has run on this item. No open, maintained tool or library covers the need: the rule refuses a plan of this repository, so it lives in check_proposal. To build it instead costs about 40k tokens to write, about 5k tokens a month to keep and fix, and about 3 hours of elapsed time.
Key questions
- Where does the stage job check a plan, and which texts of a reply state its work?:
check_proposalinsrc/devops_cli/roadmap/stage_change.pyholds the rules ofopenspec/config.yamlthat a schema cannot say. The texts that state the work arewhat_changes, each group'simplementationanddocumentation, and each decision with its reason. [sources: src/devops_cli/roadmap/stage_change.py, openspec/config.yaml] - How does the check find a deleted guard check?: Scan the texts that state the work for a deletion verb and a guard target. Do not trust a flag that the model sets. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, src/devops_cli/roadmap/stage_change.py]
- Chosen: Scan the work texts for a deletion verb and a guard target. The check is deterministic and independent of the model's declaration, as ADR 0005 asks of a finding.
- Rejected: Require the model to set a
deletes_checkboolean. A model that forgets the flag passes the check, so the guard is no guard. - Rejected: Refuse every plan that lists a path under
tests/inchanges. A plan that edits a test without deleting it would be refused.
- Which words and targets count as a deletion of a guard check?: The verbs
delete,removeanddrop, with their-s,-edand-dforms, matched without case. The target is atests/path, atest_*name or aCONST_*name. (best practice) [sources: AGENTS.md, tests/ai/mcp/test_mcp.py, src/devops_cli/config/constants.py]- Chosen: The three verbs with their inflections, and the three target forms. The issue names these verbs and these targets, and the match stays bounded.
- Rejected: Any word that means a removal. A synonym list grows without bound and refuses plans that delete nothing.
- Rejected: Only the exact words
Delete,Removeanddrops. A task writesremovesorremoved, and the check would miss it.
- What does a
weakened_checksentry hold?: Three one-line texts:check, the name or path of the check;stopped, what the check stopped; andsafeguard, the replacement or the person who allowed the deletion. (best practice) [sources: AGENTS.md, src/devops_cli/roadmap/stage_change.py]- Chosen: Three required texts. The issue asks for the check, what it stopped and the safeguard, and a reviewer reads each as a separate fact.
- Rejected: One free text. A free text lets a plan name the check and skip the safeguard.
- Rejected: The check name and an optional reason. The safeguard is the fact that replaces the check, so it is required.
- How does an entry satisfy a detected deletion?: An entry satisfies a deletion when its
checktext holds the detected name or path. The check refuses a detected deletion with no such entry. (best practice) [sources: src/devops_cli/roadmap/stage_change.py]- Chosen: The entry names the check. A plan that deletes two checks needs two entries, and the match stays deterministic.
- Rejected: Any non-empty entry satisfies every deletion. One entry would cover an unrelated deletion.
- Rejected: The entry equals the check exactly. An entry that writes the check in a sentence would be refused.
- Where does the proposal file hold the weakened checks?: In
## Weakened checks, after## Impactand before## Feasibility. The section appears only when the list is not empty. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, openspec/config.yaml]- Chosen: A section of
proposal.mdafter Impact. The proposal states what the change does and what it gives up, and the check reads the reply, not the file. - Rejected: A section of
design.md. A design records a choice; a weakened threshold is a fact of the change that a reviewer must see. - Rejected: No section, only the check. The issue asks the plan for an entry that a person reads.
- Chosen: A section of
- Which message namespace holds the new problem and section texts?:
MESSAGES.roadmapinsrc/devops_cli/lang/en/messages.py, as every text ofstage_change.pyuses. [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/lang/en/messages.py] - Does the change carry a spec delta?: Yes.
check_proposaldecides whether the stage job accepts a plan, so a consumer observes the change. The delta adds one requirement toroadmap-stageand sets noskip_specs. (best practice) [sources: openspec/config.yaml, docs/ROADMAP_WORKFLOW.md]- Chosen: ADDED requirement in
roadmap-stage. The stage job's answer to a plan is observable, and the config asks for a delta. - Rejected:
skip_specs: true. The rule changes what the job does, so the change is no test, document or refactor.
- Chosen: ADDED requirement in
- Which test proves the check offline?: A new module
tests/roadmap/test_roadmap_stage_weakened_checks.pybuilds aStageProposalwhose task deletes a guard test. It callscheck_proposalwith a thin tree and no base specs. [sources: tests/roadmap/test_roadmap_stage_form.py, tests/roadmap/test_roadmap_stage_plan.py, tests/roadmap/test_roadmap_stage_prompt_rules.py] - Does the change need a replay case and a model score before and after?: Yes.
docs/ROADMAP_WORKFLOW.mdasks a change tocheck_proposalto set the new gate in the case files and to state the score of the same model before and after. The plan gives both as tasks, and the score goes in the pull request comment. (best practice) [sources: docs/ROADMAP_WORKFLOW.md]- Chosen: Add the replay case and state the score. The workflow document makes both a condition of a change to a stage gate.
- Rejected: Add the replay case only. The document asks for the model score too.
- Rejected: Neither. A gate change that states no count breaks the rule of the workflow document.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
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 closes a process gap that lets plans silently weaken guard checks, but it does not block a release or fix a live failure.It catches a specific class of silent guard weakening that a human review found by reading tasks manually.It needs pattern matching for deletion keywords in tests and inventories, a new required section check, and a test case.Both concern the plan-check system, but 3201 creates the overall plan-check command while the candidate adds one specific rule for deleted guard checks.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at 8e0a486 (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
Staged: branch
feat/3320-a-plan-that-deletes-a-guard, draft pull request #3333. 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:
The plan run made 2 model request(s), and used 149484 input tokens and 6135 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
otherat group 1: The plan adds theweakened_checksfield toStageProposalbut never edits the stage promptroadmap_stage_change.md. The existing prompt test then fails because the prompt keys no longer match the model fields. The model also never learns to give the entry. Evidence: "assert sorted(bullets) == sorted(StageProposal.model_fields)"otherat group 4: The plan adds the replay case by editing the loader modulestage_eval_cases.py. A case is a directory of fixtures, and the plan names no fixture path. It also does not touch the gate code that would refuse the new defect, andGateNamehas no gate for it. Evidence: "one directory of fixtures for each plan"otherat group 5: The plan records the model score indocs/ROADMAP_WORKFLOW.md. The plan's own design says the score goes in the pull request comment. A before and after score is also unknown when the plan is written. Evidence: "the score goes in the pull request comment"verify_format group 3: The scenario for the proposal rules needs a test that readsopenspec/config.yaml. The group has no test, anduv run devops openspec checkdoes not assert that the rule names## Weakened checks. The spec delta also leaves this requirement out. Evidence: "A test reads theproposalrules ofopenspec/config.yaml."docs(openspec): plan #3320 name the planner prompt key
docs(openspec): plan #3320 refuse a plan that deletes a guard check (#…
devops-cli-service commentedon Nov 5, 2026
Stopped at group 1.
Failure class:
plan_defect.Action taken: none.
Action left:
wait: wait for a person.Reason:
Last message of the agent (a claim that no check verified): I stopped before implementing. The plan renders the new section but no group reads it back, and the group I hold may not change the reader. What I found -
check_proposalruns on a change folder too, not only on the reply of the model:src/devops_cli/roadmap/implement.py:373,src/devops_cli/roadmap/plan_check.py:342andsrc/devops_cli/roadmap/plan_recheck.py:179call it on theStageProposalthatread_changebuilds. -read_changebuilds that proposal atsrc/devops_cli/roadmap/plan_read.py:439and passes noweakened_checks._proposal(plan_read.py:182) reads only Why, What Changes, Feasibility and Existing Tool Considered, so it drops a## Weakened checkssection. - No group of the change namessrc/devops_cli/roadmap/plan_read.py, andgit grep -n weakened_checks -- src/ tests/finds nothing. - Result of the plan as written: the stage job accepts a plan that records a weakened check,render_changewrites the section, and then the implement job,plan checkandplan recheckrefuse the same plan for the entry it already holds. A person cannot repair it by editingproposal.md, because the reader ignores the section. The plan of #3204 (PR #3277) hits this at once. What I changed: nothing. I wrote the first test of task 1.1, saw it fail on the base (AttributeError: 'RoadmapMessages' object has no attribute 'stage_problem_weakened_check'fromuv run devops ci test tests/roadmap/test_roadmap_stage_weakened_checks.py), and deleted that fileThe item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.devops-cli-service commentedon Nov 5, 2026
The runner Job devops-cli-runner-20261105-144608-e491 ended: succeeded.
Image digest: sha256:8db59b516837519d266dfa65de12581c242b8c7de3e2501820d66fb0fdab5e08
The last lines of its log:
docs(openspec): plan #3391 Refuse criteria entries not in the issue b…
dan-petty commentedon Nov 13, 2026
New case on 2026-11-13: plan PR #4917 (item #4472) stopped its implement run for this cause.
tests/commands/test_test_selection.py::test_a_selection_past_the_serial_limit_runs_on_the_capped_workerswith a new case, "because the file count no longer decides alone".## Weakened checksentry for that test.devops-cli-runner-20261113-135040-3720, v0.128.0) did what the task said, and the step guard stopped the run with classtests_lost: "The agent removed tests that existed at the start of the step. ... only when the plan on the default branch names it in## Weakened checks." The run spent 6.4 M tokens, and fix(ci): a narrowed ci test runs many slow tests serially #4472 is now Blocked.So the guard is right, and the plan is incomplete: a plan whose task replaces or removes a test must also record it under
## Weakened checks. This issue is the source fix. A stage check that refuses such a plan (or the plan writer adding the entry from the task text) would have stopped this before the push. The same cause needed plan correction #5310 for #3785.dan-petty commentedon Nov 13, 2026
Two more cases on 2026-11-13, so three in one day. Each plan passed
devops roadmap plan-checkand CI Plan Check.## Weakened checksentry. The implement step stopped withtests_lost. A correction PR (docs(openspec): plan #4472 name the replaced selection test #5463) added the entry.test_the_registry_refuses_a_catalogue_above_60_series... astest_the_registry_accepts_a_catalogue_at_the_bound_and_refuses_one_above_it". The plan has no## Weakened checksentry. The runner did groups 1 to 9 (about 28M tokens). At group 10 the step guard stopped it withtests_lostat 20:04Z (runnerdevops-cli-runner-20261113-182029-a051, 6,250 s, 32.6M tokens in total).The guard at implement time is correct. The gap is that no check before the merge sees a task that removes or renames a test with no entry. The stage gate or
plan-checkcan find this deterministically:path::nameor a baretest_*name thatgit grepfinds at the base) with a verb such as rewrite, replace, rename, remove or delete, and that names no new test of the same name, needs a## Weakened checksline for thatpath::name.weakened_check_missingand the test name, so that the planner adds the line.This costs one plan return, not a 30M-token implement run. A plan correction PR for #5272 follows.
dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.