Repository navigation
Closed
Labels
effort/mediumEffort Mediumpriority/p1-highPriority P1: high-impact work for the next planned milestonescope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/highValue High: the delivery of the item matters much
Description
Problem or Motivation
The stage job pushes plans that its own plan reader refuses.
- feat(roadmap): add a test-first manifest kind to the stage plan #3981 (8476163, 2026-11-07) added the kind
manifestto the stage writer. It changed no line of the reader (git show --stat 847616309). - The writer renders a
manifestgroup with the same tasks as abehaviorgroup, and it writes noKind:line (_task_textsandgroup_text,src/devops_cli/roadmap/stage/stage_change.py:2655-2730;stage_group_filesinsrc/devops_cli/lang/en/messages.py). - The reader gives only
behaviororother(_kind,src/devops_cli/roadmap/plan_read.py:348-352)._grouphas nomanifestbranch (plan_read.py:371-421). So the reader reads eachmanifestgroup asbehavior. - A
manifestgroup that changes no path undersrc/then breaks the fix(roadmap): a stage group has a kind with its own tasks #3035 rulestage_kind_no_source(stage_change.py:552-565), andread_changeraisesPlanReadError. The fix(roadmap): a stage group has a kind with its own tasks #3035 rule is correct. The missing reader change is the cause. - Live cases: docs(openspec): plan #2968 Emit inbox gauges and add the inbox panel #4963 group 3 (head 9c4b2cf) and docs(openspec): plan #4697 Keep one metric stream per workload #5032 groups 3 and 4 (head 7fd165f). The Plan Check job reported the error on both heads (jobs 131044430778 and 131118707993). fix-plan, plan-recheck and implement cannot read these plans.
- The reader also drops
## Unchanged referencesofdesign.md(plan_read.py:480-514), which the writer writes (stage_change.py:2638-2643). fix-plan gates the read plan again with the moved-module references (src/devops_cli/roadmap/stage/stage.py:1924, 1942), so a valid move plan fails after the round trip (stage_change.py:1142-1158). No open plan has this problem today. - The text of
stage_kind_no_sourcetells the planner to use the kindother. That is wrong for a test-first manifest group, because anothergroup has no test (stage_change.py:579-591). docs/TESTING.md:63,k8s/README.mditem 15 and the living spec 'A task group has a kind' (openspec/specs/roadmap-stage/task-groups/spec.md:98-99) name onlybehaviorandother.- The one round-trip test uses one
behaviorgroup (tests/roadmap/test_roadmap_plan_read.py:39). The golden set (tests/fixtures/roadmap_eval/stage/) has 145behaviorgroups, 21othergroups and nomanifestgroup.
Proposed Solution & Architectural Design
Write-then-read keeps each fact that the plan files hold.
- Writer.
stage_group_filesbecomesKind: {kind}. Reads: {reads}. Changes: {changes}.. Hand-written plans use this form already (openspec/changes/2742-bound-the-number-of-prewarm-model/tasks.md).KIND_LINE(src/devops_cli/roadmap/step_files.py:36, start of line) and_READS(plan_read.py:68-70, a search) parse it.TaskGroup.is_behaviorgives the same value as before for each group that the writer makes. - Reader, explicit kind. A
Kind:line sets the kind, for each value ofGroupKind. An unknown word raisesPlanReadError, and the reason names the word and the known kinds._groupgets amanifestbranch that keeps the case task astest. A change of_kindalone is not sufficient: the group then reads asotherwith no test. - Reader, no
Kind:line (a plan written before this change). A case-first group reads asbehaviorwhen it changes a path undersrc/, else asmanifest. Each other group reads asother. This is the only old-form path. Its end is refactor(roadmap): end the kind inference of the plan reader #5218 (refactor(roadmap): end the kind inference of the plan reader): a form edit ofplan_rewrite.pywrites theKind:line into each old plan, whatever its gate result, and the inference goes. The module docstring and the spec name that end. - Reader, references. Read
## Unchanged referencesintoreferences. - Contract.
plan_read.FIELDS_NOT_IN_FILESnames the fields that no file holds:summary,pull_request_body,builds_own,creates_linesandweakened_checks(a person writes these, feat(roadmap): the step guard allows a test removal that the plan records #3490).plan_read.file_facts(proposal)givesproposalwith these fields at the values that the reader gives, with only the references whoseunchangedis true, with the specs in path order, and with eachdocumentationin the form that the writer renders. A changed reference is no fact of the files: the writer writes only the unchanged references (stage_change.py:2638-2643), and the gate of moved modules reads only those (stage_change.py:1142-1158). The property tests usefile_facts, and fix(roadmap): stage reads each plan back before the push #5214 uses it at run time. fix(roadmap): plan files keep the cost mark and line estimates #5217 removesbuilds_ownandcreates_linesfrom the set. This is the documented contract of the reader, not a list of skipped checks, and tests hold it. - Text.
stage_kind_no_sourcenamesmanifestfor a group that changes only a rule, a dashboard or a case file, andotherfor a group with no test. - Callers. The implement split renders its new groups with
group_text(src/devops_cli/roadmap/implement/implement_run.py:1060), so they get theKind:line too.measure_groups(stage_change.py:2905) counts the new line. - A model text that holds a mark of the reader (an inline 'verify that
<command>passes' at the end of aprocess, or the process mark in animplementation) is outside this contract. The property generator does not make such texts. fix(roadmap): stage reads each plan back before the push #5214 sends such a text back to the model.
Target Subsystem
Roadmap: the stage writer (src/devops_cli/roadmap/stage/stage_change.py) and the plan reader (src/devops_cli/roadmap/plan_read.py, src/devops_cli/roadmap/step_files.py).
Existing Tool Considered
- OpenSpec has no field for the kind of a task group.
openspec validatechecks only the spec deltas, sotasks.mdis the format of this project. - A serialized plan (pydantic JSON in
.openspec.yamlor in a file beside it) gives an exact round trip. Rejected: persons and the implement agent read and edit the Markdown, so a hand edit makes two sources disagree, and the active plans on main have no JSON. - Hypothesis (pinned at
pyproject.toml:117) generates the group shapes for the property tests. syrupy holds the snapshots. - Cost to build (estimate): 1.5 M tokens and 4 hours elapsed. Keep: the new tests add about 30 s to CI. Fix: about 0.3 M tokens for each reader defect that a property test finds.
Acceptance Criteria
-
uv run pytest tests/roadmap/test_roadmap_plan_read.py::test_each_group_kind_reads_backpasses forbehavior,manifestandother. -
uv run pytest tests/roadmap/test_roadmap_plan_read.py::test_no_fact_is_lost(Hypothesis): the generator makes each kind, created paths, and unchanged and changed references. For each generated valid proposalp,read_change(render_change(p)) == file_facts(p). -
uv run pytest tests/roadmap/test_roadmap_plan_read.py::test_a_read_plan_is_a_fixed_point(Hypothesis): withq = read_change(render_change(p)),read_change(render_change(q)) == q. -
uv run pytest tests/roadmap/test_roadmap_plan_read.py::test_the_fields_that_no_file_holdsholdsFIELDS_NOT_IN_FILESto the five names. -
uv run pytest tests/roadmap/test_roadmap_plan_read.py::test_a_changed_reference_is_no_fact_of_the_files: a proposal with one changed and one unchanged reference reads back with only the unchanged one, andfile_factsgives the same. -
uv run pytest tests/roadmap/test_roadmap_plan_read.py::test_each_golden_plan_reads_backpasses for each goldenplan.jsonthat validates and for a newmanifestcase intests/fixtures/roadmap_eval/stage/. -
uv run pytest tests/roadmap/test_roadmap_plan_read.py::test_a_plan_head_reads_with_its_kindsreads the change folders intests/fixtures/roadmap/plan_heads/(docs(openspec): plan #2968 Emit inbox gauges and add the inbox panel #4963 at 9c4b2cf, docs(openspec): plan #4697 Keep one metric stream per workload #5032 at 7fd165f, and docs(openspec): plan #3785 Remove the profiler exclusion of the hawk node #5182 at its head, which reads today) with noPlanReadError. It givesmanifestfor docs(openspec): plan #2968 Emit inbox gauges and add the inbox panel #4963 group 3 and docs(openspec): plan #4697 Keep one metric stream per workload #5032 groups 3 and 4, andbehaviorfor the other case-first groups. -
uv run pytest tests/roadmap/test_roadmap_plan_read.py -k 'explicit_kind_line_sets_the_kind or unknown_kind_is_a_read_error or unchanged_references_read_back'passes. -
uv run devops ci test tests/roadmap/stage tests/roadmap/implement/test_roadmap_implement_resplit.pypasses, withtests/roadmap/stage/__snapshots__/test_roadmap_stage_plan.ambrupdated for theKind:line. -
uv run devops ci fail-to-pass --base origin/mainshows that these tests fail on the base and pass on the head: themanifestcase oftest_each_group_kind_reads_back,test_a_plan_head_reads_with_its_kinds, themanifestandothercases oftest_explicit_kind_line_sets_the_kind,test_unknown_kind_is_a_read_errorandtest_unchanged_references_read_back. Thebehaviorandothercases oftest_each_group_kind_reads_backare guards that pass on both. Each new test imports a new name inside its body, so the module collects on the base (a file that does not collect on the base is an error, not a fail:src/devops_cli/ci/fail_to_pass.py). The PR cites the run. - Validation table in a PR comment, over each open plan PR head and each plan PR closed in the last 14 days (no cap): the read on origin/main and on the branch (OK, or the reason) and the kinds read.
uv run devops roadmap plan-check <n> --jsongives the open rows. No head that origin/main reads is refused on the branch, no head is refused withstage_kind_no_source, and docs(openspec): plan #2968 Emit inbox gauges and add the inbox panel #4963 and docs(openspec): plan #4697 Keep one metric stream per workload #5032 read. -
uv run devops docs checkpasses.
Files
- src/devops_cli/roadmap/stage/stage_change.py
- src/devops_cli/roadmap/plan_read.py
- src/devops_cli/roadmap/step_files.py
- src/devops_cli/lang/en/messages.py
- tests/roadmap/test_roadmap_plan_read.py
- tests/roadmap/stage/test_roadmap_stage_plan.py
- tests/roadmap/stage/snapshots/test_roadmap_stage_plan.ambr
- tests/roadmap/implement/test_roadmap_implement_resplit.py
- tests/fixtures/roadmap/plan_heads/ (new: three real heads)
- tests/fixtures/roadmap_eval/stage/ (one new manifest case)
- the other test and fixture files that hold a rendered files line (about 30)
- docs/TESTING.md
- docs/roadmap/plan-check.md
- k8s/README.md (item 15, the kinds)
- openspec/specs/roadmap-stage/task-groups/spec.md
- openspec/specs/roadmap-plan-check/spec.md
Dependencies
None. This item is the first of its set.
Related
#3981, #3035, #3425, #3602, #3912, #3556, #4963, #5032, #2968, #4697. #5213, #5214, #5215, #5216, #5217 and #5218 of this set (tracker #5211) change the same files, so each one starts after the one before it merges.
Source: #5104
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p1-highPriority P1: high-impact work for the next planned milestonescope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/highValue High: the delivery of the item matters much
Activity
dan-petty commentedon Nov 12, 2026
Live plans #4963 and #5032 cannot be read by fix-plan, plan-recheck, or implement, blocking ongoing work.The failed run 131044430778 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.Both fix a defect in the plan reader in plan_read.py, but #3591 fixes a group-0 criterion escaping as an uncaught error while this candidate adds recognition of the manifest kind and the Unchanged references section.devops-cli-service commentedon Nov 12, 2026
Released in v0.123.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.123.1
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 21:56 UTC