Repository navigation
Description
Problem
Finding in src/devops_cli/roadmap/stage_verify.py defines findings from the model verification pass. Its type field is constrained to the DefectType enum in src/devops_cli/roadmap/stage_eval_cases.py.
tests/roadmap/test_roadmap_stage_verify.py::test_a_finding_with_a_type_outside_the_nine_is_refused enforces this strictly.
When planning changes to plan verification (such as #3264 / PR #3305), the planner hallucinated that Finding had a free-text kind field and proposed checking for kind: placeholder, which causes a Pydantic ValidationError because placeholder is not in DefectType.
The stage probe and planner do not currently check proposed defect types against DefectType during plan authoring.
Proposed change
- In
src/devops_cli/roadmap/stage_specs.pyorstage_eval_gates.py, add a probe that checks references to verification finding types againstDefectType. - When a plan specifies finding types or classifications that are not members of
DefectType, require the plan to either add the enum member or document mapping to existing members (DefectType.OTHER). - Add a test in
tests/roadmap/test_roadmap_stage_plan.pyasserting that plans proposing unknown defect types are caught during plan staging.
Acceptance criteria
- A test asserts that a plan proposing an unlisted finding defect type without updating
DefectTypeis refused. - A plan referencing valid
DefectTypemembers passes validation.
Source: #3305
Proposed design
Problem statement
The stage gates never read a plan's finding-type reference, and the model schema refuses a bad one only at validation. The earlier plan added a scan of the plan prose. That scan refuses the sound plan of #3328 and finds no true hit in the 695 recorded plans. This change keeps the plan of pull request #3305 in the golden set and proves that the gates accept a plan which names a DefectType member. No new gate is built, and the model verifier covers the claim as false_premise.
Acceptance criteria
Requirement: The golden set holds the incident plan
The golden set SHALL hold the plan of pull request #3305 as a case whose issue is 3264.
Scenario: The incident case loads
- WHEN
load_casesreadstests/fixtures/roadmap_eval/stageat the commit that holds the case - THEN the cases hold a case whose
issueis 3264 and whosepullis 3305
Requirement: The case records the claim
The case of pull request #3305 SHALL name the kind: placeholder claim of its authoring run in one note.
Scenario: The note names the claim
- WHEN the case of pull request docs(openspec): plan #3264 keep a plan with an open finding in draft #3305 is read
- THEN one note of the case holds the text
kind: placeholder
Requirement: The replay accepts the incident case
The replay SHALL accept the case of pull request #3305, so a gate that refuses the plan fails the replay.
Scenario: The incident case passes every gate
- WHEN
replay_allruns on the case of pull request docs(openspec): plan #3264 keep a plan with an open finding in draft #3305 - THEN
report.failuresis an empty list
Requirement: A plan that names a defect type member passes
check_proposal MUST NOT return a problem for a plan that names a DefectType member, including a member that the plan adds.
Scenario: A plan adds a member and names it
- WHEN
check_proposalruns on a valid plan whose group changessrc/devops_cli/roadmap/stage_eval_cases.pyand whose test text namesDefectType.PROMPT_KEY_MISSING - THEN
check_proposalreturns an empty list
Existing Tool Considered
No alternatives check has run. Pydantic is the open, maintained library that covers the runtime enum check of Finding.type in src/devops_cli/roadmap/stage_verify.py, and it lacks a check of a plan's prose during staging. The change builds no check: it records the incident plan in the golden set, which the existing replay uv run devops roadmap eval stage --replay reads. The work costs about 2,000 tokens to write the case and the test, and about 1 hour elapsed.
Key questions
- Which stage checks run on a plan today?:
check_proposalruns thirteen gates, and the replay runs four gates. No gate reads a finding type: the gates judge the spec delta, the content, a citation, the form, the eval replay, a path, a What Changes item, a move, a search, a criterion, a dependency and a created path. [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py] - Should the change add the scan of the plan prose, or record the incident plan in the golden set?: Record the incident plan in the golden set. The scan refuses the sound plan of feat(roadmap): gate a plan that adds a StageProposal field #3328 and finds no true hit in the 695 recorded plans. The verifier now names the claim
false_premise. (best practice) [sources: src/devops_cli/roadmap/stage_eval_cases.py, src/devops_cli/roadmap/stage_eval_gates.py, src/devops_cli/roadmap/stage_verify.py, openspec/changes/3328-the-stage-probe-checks-prompt-reply/design.md, openspec/changes/3343-the-stage-probe-checks-defecttype-membership/tasks.md]- Chosen: Record the incident plan in the golden set. It uses the existing replay, adds no hand-rolled text check, and keeps the incident on record.
- Rejected: Add the scan with an exemption for a plan that changes the enum file. It keeps a text check with no measured hit and adds a second rule to keep that check sound.
- Rejected: Add the scan as the earlier plan wrote it. It refuses the sound plan of feat(roadmap): gate a plan that adds a StageProposal field #3328, which adds a member of
DefectTypeand names it.
- Which defect type names a claim that the code contradicts?:
DefectType.FALSE_PREMISE. The verifier reads the repository with the read tools of the planner, so it can quote the code that contradicts the claim. [sources: src/devops_cli/roadmap/stage_eval_cases.py, src/devops_cli/roadmap/stage_verify.py, src/devops_cli/ai/tasks/roadmap_stage_verify.md] - Does the replay fail a case whose defect names the gate
none?: No._statusreturnsUNJUDGEDfor the gatenone, andCaseReplay.failureslists only a missed defect, a stale pending gate and a refusedgoodplan. [sources: src/devops_cli/roadmap/stage_eval_gates.py] - What does a case directory hold?:
case.json,issue.txt,plan.jsonandfacts.json.facts.jsonholds the tracked files that the gates need, the capabilities that have a spec, and the paths that each negative-search literal matched. [sources: src/devops_cli/roadmap/stage_eval_cases.py] - How does the case record the
kind: placeholderclaim of the authoring run?: In one note ofcase.json. The merged plan holds no wrong finding type, so the claim is no defect of the plan. A defect with the gatependingwould fail the replay, becausePENDING_GATESis empty. (best practice) [sources: src/devops_cli/roadmap/stage_eval_cases.py, src/devops_cli/roadmap/stage_eval_gates.py]- Chosen: One note of
case.json. The note keeps the incident on record, and the case judges only the plan that the repository holds. - Rejected: A defect with the gate
none. It marks a plan that merged as defective and adds an unjudged row for no code change. - Rejected: A defect with the gate
pending.PENDING_GATESis empty, so_statusreports the defect stale and the replay fails.
- Chosen: One note of
- Where do the two tests live?: The guard test goes in
tests/roadmap/test_roadmap_stage_plan.py, with the othercheck_proposaltests. The case test goes intests/roadmap/test_roadmap_stage_eval_gates.py, which replays the golden set. (best practice) [sources: tests/roadmap/test_roadmap_stage_plan.py, tests/roadmap/test_roadmap_stage_eval_gates.py, src/devops_cli/roadmap/stage_eval_gates.py]- Chosen: The existing modules. Each module already holds the tests of its check, and no new module needs a mirrored path.
- Rejected: A new test module. The project mirrors a new test module to its source path, and no source module changes.
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 prevents a Pydantic ValidationError from reaching users but does not block a critical path.It stops invalid plans from causing a crash, improving plan-stage reliability.It requires adding a probe, wiring it into staging, and writing one test, all within one module.Both add a plan-stage gate that refuses a plan, but #3321 checks for self-referential tasks and missing tests while the candidate checks for invalid DefectType members.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at ce4e327 (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
Staged: branch
feat/3343-the-stage-probe-checks-defecttype-membership, draft pull request #3349. 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 152892 input tokens and 6765 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, implementation: The rule needs a new problem text that names the value and lists the members. No existingMESSAGES.roadmapentry holds that text. The plan changes no lang file to add one. Evidence: "Use the existingMESSAGES.roadmapentries for the text"docs(openspec): plan #3343 Check finding defect types against DefectType
docs(openspec): plan #3343 Check finding defect types against DefectT…
3 remaining items
dan-petty commentedon Nov 6, 2026
Returned to New under AGENTS.md rule 2: the item cannot be built as written. Two reviewers read the code of origin/main on 2026-11-06 and agreed.
Evidence
The gap exists: stage_change.py has no DefectType check, and the incident is real (PR #3305 plan said Finding.kind: placeholder). But the fix as written cannot work. Its helper (tasks.md 1.2 of the merged plan) matches every
DefectType.reference in plan prose, and its problem text tells the planner to 'add the enum member'. The helper cannot see that a plan adds the member. Proof: openspec/changes/3328-the-stage-probe-checks-prompt-reply/tasks.md 1.2 addsPROMPT_KEY_MISSINGto DefectType, and design.md line 15-16 namesDefectType.PROMPT_KEY_MISSING. The new rule refuses that plan, which does what the rule asks. I measured all 695 plan folders of origin/main (50 open, 645 archived): there is no wrongkind:/DefectType.Xreference in any of them except this item's own text and the 3328 false refusal. So the true hits are 0 and the false refusals are 1. The cause of the incident is also gone: #3523 gave the planner its tools back, and #3710 (c1191e2) made the verifier read the repository, wherefalse_premisecovers a claim that the code contradicts (src/devops_cli/ai/tasks/roadmap_stage_verify.md).Re-scope for refinement
The rule is a regex over plan prose (hand-rolled string heuristic; owner direction: tools and libraries, not home-grown checks). As written it refuses a sound plan that follows its own advice (#3328), it has 0 true hits over 695 plans, and the model verifier now covers the incident class. Re-scope for a person to pick: drop the prose scan; add the #3305 plan as a golden case in tests/fixtures/roadmap_eval/stage so the replay shows what the verifier or gates miss; build a gate only if the replay shows a miss. If a person still wants the scan, exempt a plan whose group changes src/devops_cli/roadmap/stage_eval_cases.py. That is S work, but it carries no measured benefit.
devops-cli-service commentedon Nov 6, 2026
Status set to Ready at f1130d3 (see proposed design in issue body).
feat(roadmap): accept a plan referencing valid DefectType members
devops-cli-service commentedon Nov 8, 2026
Released in v0.90.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.90.0
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 15:26 UTC