Repository navigation
Description
Problem
read_change raises a raw pydantic ValidationError for many plans, and devops roadmap plan-check then ends in a traceback with no problem list. openspec/specs/roadmap-plan-check/spec.md:123 says that the command reports the file and goes on.
src/devops_cli/roadmap/plan_read.py:372calls_groupbefore thetryat:379.- A run over the 59 change folders at
origin/maingives 24 read, 24ValidationErrorand 11PlanReadError. Of the 53 items that were Planned at 2026-11-04T15:06Z, 21 giveValidationErrorand 7 givePlanReadError. - In the window 2026-11-03T15:05Z to 2026-11-04T15:05Z, plan-check on PR 3322 and PR 3329 gives rc 1 and a pydantic error in stderr.
Today the crash reaches only the command (plan_check.py:437 is the only caller). The round is at risk when #3393 merges, because its design names only PlanReadError and GitOperationError. So this issue must merge before #3393.
The skip_specs line has more effect. openspec validate --strict --json gives rc 0 and one INFO issue: skip_specs is set in .openspec.yaml: change declares no spec-level behavior changes, zero deltas accepted. stage_validate.py counts every issue as a problem, and _settle (stage.py:906-908) returns _Refused on it. So the stage job refuses each skip_specs plan. This is inferred from a read of the code, and nobody ran the job. It fits #3368: Service commit 0eb6f3a has no skip_specs, and correction commit 5c28a20 adds it. 14 of the 59 folders set skip_specs, and #3429 would leave them out too.
The reader also judges too little. _task reads task.verification[0] (plan_read.py:273), and _group keeps the verify of the first task only, but the step runs every span of every task (step_files.py:84). So plan-check accepts the helm template span of #2441. verification_problem refuses 16 of 193 spans, in 3 folders (#2441, #2610, #3187).
Expected
The reader returns a problem for each form that it cannot read. validate_change exempts only the skip_specs message. Other INFO issues stay problems, because one can be a delta that openspec archive refuses. The reader judges each span of each task with verification_problem.
Sample paths are not part of this item. stage_paths.py:13-14 says that a word with no folder is no path, so a plan can write test_sample.py, and another mark is an escape. The stage prompt tells the planner to use a bare name. The 4 plans with sample paths (#3295, #3318, #3321, #3427) go to the rewrite of #3492.
Acceptance criteria
- A test:
read_changeruns over each change folder of the tree, and no error other thanPlanReadErrorappears. - A test: plan-check on the forms of refactor(roadmap): group the job modules in subpackages #3187 and feat(roadmap): check a plan number against its constant #3308 reports a problem with rc 1 and no traceback.
devops roadmap plan-check 3322anddevops roadmap plan-check 3329each report areadproblem.devops roadmap plan-check 3350still reports itsbody-lengthandstageproblems, anddevops roadmap plan-check 3339still reports itsstageproblem.- A test:
validate_changeon askip_specschange gives no problem, and on a delta INFO issue it gives a problem. - A test: the reader reports the refused span of a later task (the fix(k8s): name the Loki deployment mode Monolithic #2441 form).
- A test: the stage prompt names the bare form for a sample file.
Existing tool considered
The existing PlanReadError and verification_problem, and pydantic.
Related
Related: #3393, #3429, #3417, #3449, #3321, #3295, #3318, #3427, #3368, #3492
Proposed design
Problem statement
The plan reader raises a raw pydantic ValidationError for many plans. The plan-check command then ends in a traceback and reports no problem list, contrary to the spec. The reader also treats every OpenSpec INFO issue as a problem, including skip_specs. It judges only the first verification span of the first task. The fix converts every bad plan form to PlanReadError, exempts only skip_specs, and checks every verification span.
Acceptance criteria
Requirement: Tree-wide read
read_change SHALL raise only PlanReadError when it reads every change folder in the tree.
Scenario: All change folders
- WHEN the test runs
read_changeover each change folder in the tree - THEN no exception other than
PlanReadErrorappears
Requirement: Reader normalizes plan errors
read_change SHALL raise PlanReadError with the change folder for every plan that it cannot read, and SHALL NOT let a pydantic ValidationError escape.
Scenario: Bad task group
- WHEN
read_changereads a change folder whose task group fails pydantic validation - THEN it raises
PlanReadErrorthat names the folder, and noValidationErrorescapes
Requirement: Plan check reports a bad plan
devops roadmap plan-check SHALL report a read problem for each unreadable plan and SHALL exit 1 without a traceback.
Scenario: Plan check on #3187 and #3308 forms
- WHEN plan-check runs on the stored change forms of refactor(roadmap): group the job modules in subpackages #3187 and feat(roadmap): check a plan number against its constant #3308
- THEN it reports a problem and exits 1, and stderr contains no traceback
Requirement: Read problem for PR 3322 and 3329
devops roadmap plan-check SHALL report a read problem for the plans of PR 3322 and PR 3329.
Scenario: Plan check on the two PR plans
- WHEN plan-check runs on the recorded plans of PR 3322 and PR 3329
- THEN each run reports a
readproblem and exits 1
Requirement: Existing problems remain
devops roadmap plan-check MUST still report the body-length and stage problems of #3350 and the stage problem of #3339.
Scenario: Regression plans
- WHEN plan-check runs on the recorded plans of docs(openspec): plan #3344 Refuse a plan that reads an absent model field #3350 and docs(openspec): plan #3331 Refuse plans without a stage eval replay task #3339
- THEN docs(openspec): plan #3344 Refuse a plan that reads an absent model field #3350 reports
body-lengthandstage, and docs(openspec): plan #3331 Refuse plans without a stage eval replay task #3339 reportsstage
Requirement: Skip specs is exempt
validate_change SHALL report no problem for the skip_specs INFO message and SHALL keep every other OpenSpec INFO issue as a problem.
Scenario: Skip specs and delta INFO
- WHEN
validate_changereads askip_specschange and a change with a delta INFO issue - THEN the first gives no problem and the second gives a problem
Requirement: Every verification span is judged
The plan reader SHALL apply verification_problem to every span of every task, not only the first task's first span.
Scenario: Refused later span
- WHEN a later task has a verification span that
verification_problemrefuses - THEN the reader reports that span as a problem
Requirement: Stage prompt uses bare sample name
The stage prompt SHALL name a sample test file with a bare name and SHALL NOT present a path as a sample.
Scenario: Prompt sample file
- WHEN the stage prompt shows a sample test file
- THEN it uses a bare name such as
test_sample.py
Existing Tool Considered
No alternatives check has run. The existing pydantic library covers schema validation but lacks a plan-specific problem list and raises a raw ValidationError. PlanReadError and verification_problem are project code, not external tools. The fix wraps pydantic and reuses verification_problem.
Key questions
- Where should the reader convert a pydantic
ValidationErrorinto aPlanReadError?: At the boundary ofread_change, before any validation call that can raise. The command must see onlyPlanReadError. (best practice) [sources: src/devops_cli/roadmap/plan_read.py:372, src/devops_cli/roadmap/plan_read.py:379, src/devops_cli/roadmap/plan_check.py:437]- Chosen: Catch in
read_changearound parsing and_group. The call at line 372 is outside the try at line 379. A boundary inread_changecovers every plan form. - Rejected: Catch in
plan_checkonly. The command is the only caller today, but fix(roadmap): the implement job refuses a plan that fails the plan check #3393 will use the reader, and the reader must own its error type. - Rejected: Catch only inside
_group. A pydantic error can arise outside_group, and the group call itself is outside the try.
- Chosen: Catch in
- Should
plan_checkcatch pydanticValidationErrordirectly?: No. The reader SHALL normalize it, andplan_checkSHALL catch onlyPlanReadErrorandGitOperationError. (best practice) [sources: src/devops_cli/roadmap/plan_check.py:438, openspec/changes/3393-the-implement-job-refuses-a-plan/design.md:10]- Chosen: Normalize in the reader. It keeps pydantic knowledge in one module and gives future callers one error type.
- Rejected: Catch both in the command. It spreads pydantic knowledge and misses callers such as fix(roadmap): the implement job refuses a plan that fails the plan check #3393.
- Which OpenSpec INFO issues should
validate_changeexempt?: Only theskip_specsINFO message. All other INFO issues stay problems, because one can be a delta thatopenspec archiverefuses. (best practice) [sources: src/devops_cli/roadmap/stage_validate.py, src/devops_cli/roadmap/stage.py:906-908, openspec/specs/roadmap-plan-check/spec.md:123]- Chosen: Exempt only
skip_specs. Askip_specsplan is valid, but another INFO issue can make archive refuse the change. - Rejected: Exempt all INFO issues. A delta INFO issue can make
openspec archiverefuse the change. - Rejected: Exempt no INFO issue. The stage job refuses each valid
skip_specsplan today.
- Chosen: Exempt only
- Should the reader judge every verification span or only the first?: Every span of every task.
step_files.pyruns every span, so a later refused span must be a problem. (best practice) [sources: src/devops_cli/roadmap/plan_read.py:273, src/devops_cli/roadmap/step_files.py:84]- Chosen: Judge every span of every task. The step runs every span, so the reader must report each refused span.
- Rejected: Judge the first span of the first task only. It accepts refused spans that the step runs.
- Does this item handle sample paths in plans?: No. Sample-path parsing and rejection go to feat(roadmap): one pass re-checks each merged plan against main #3492. This item only changes the stage prompt to show a bare sample name. (best practice) [sources: src/devops_cli/roadmap/stage_paths.py:13-14]
- Chosen: Leave sample paths to feat(roadmap): one pass re-checks each merged plan against main #3492. A bare name has no folder, and feat(roadmap): one pass re-checks each merged plan against main #3492 rewrites that rule.
- Rejected: Reject sample paths here. It needs the path rule rewrite that feat(roadmap): one pass re-checks each merged plan against main #3492 owns.
- Does this item depend on fix(roadmap): the implement job refuses a plan that fails the plan check #3393?: No. This item must merge before fix(roadmap): the implement job refuses a plan that fails the plan check #3393, because fix(roadmap): the implement job refuses a plan that fails the plan check #3393 names only
PlanReadErrorandGitOperationError. [sources: openspec/changes/3393-the-implement-job-refuses-a-plan/design.md:10, openspec/changes/3393-the-implement-job-refuses-a-plan/design.md:20]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.The command crashes on 45 percent of plans and must merge before 3393, blocking a dependent item.The plan-check command is unusable for 24 of 59 plans because it prints a traceback instead of a problem list.The fix touches error handling in the reader, the validate_change exemption, and the verification span loop, plus tests.Both items work on read_change in plan_read.py, but 3428 names the reader in the stage context while this item fixes the reader's crash and span judgment.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 67d3f47 (see proposed design in issue body).
devops-cli-service commentedon Nov 4, 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
Released in v0.57.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.57.2
devops-cli-service commentedon Nov 5, 2026
Live since 2026-11-05 01:03 UTC