Skip to content

feat(roadmap): the stage job verifies its plan with a model - #3182

Merged
dan-petty merged 5 commits into
mainfrom
feat/3153-the-stage-job-verifies-its-plan
Nov 2, 2026
Merged

dan-petty merged 5 commits into
mainfrom
feat/3153-the-stage-job-verifies-its-plan

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

After the gates pass and before the draft opens, the stage job asks the model of the verification task to review the plan. The input is the issue, the plan and the capped start of each cited file. A finding has one of the nine defect types of the golden set; an unknown type stops the item and no draft opens.

A missing_path, false_premise or ignores_existing_code finding whose quote is in the input returns the plan to the planner once. Every other finding goes into the comment of the job, and the draft opens. The pass never merges and never marks a pull request ready.

devops roadmap eval verify scores the pass on the golden set by recall of the labeled defects and by findings on the good plans, and stores the score under .data/.

Closes #3153

Change: openspec/changes/archive/2026-11-02-3153-the-stage-job-verifies-its-plan/


Generated by Claude Code

After the gates pass, the stage job sends the issue, the plan and the
capped start of each cited file to the model of the verification task.
A finding of the type missing_path, false_premise or
ignores_existing_code that quotes its evidence returns the plan to the
planner once. Other findings go into the comment of the job, and the
draft still opens.

Add devops roadmap eval verify, which scores the pass on the golden set
by recall of the labeled defects and by findings on the good plans.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

Copy link
Copy Markdown
Owner Author

Evidence for the reviewer.

  • New tests: 35 in test_roadmap_stage_verify.py, test_roadmap_stage_verification.py, test_roadmap_stage_verify_eval.py; they pass. 6 existing tests that use the model fake now answer the verification request.
  • tests/roadmap, tests/invariants, tests/docs, tests/lang and tests/commands pass except tests that need kubectl, which this container lacks (not caused by this change).
  • ruff check, ruff format and mypy on the changed source files pass; devops docs check and devops openspec check pass.
  • devops ci fail-to-pass --base origin/main could not run: the base lacks the new modules, so pytest cannot collect the harness. The check applies to fix pull requests only; this one is a feat.
  • Not run: the live devops roadmap eval verify on the full set (no model, and the container clone has 50 commits, so the staging commits are missing).

Generated by Claude Code

… asserts

The bandit scan refused two asserts, and the ast-grep scan refused a
pytest.raises without a match. The planner now hands the verifier to the
review step, the recall evaluator reads its case by name, and the
credentials test checks the message.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

Copy link
Copy Markdown
Owner Author

The Static Analysis check failed on bdbcce16. Both failures were in this PR's own code, and c90a06be fixes them:

  • bandit B101: two assert lines, stage.py:705 (assert self._verifier is not None) and stage_verify_eval.py:189 (assert ctx.metadata is not None). The planner now passes the verifier to _verified and _review. The recall evaluator reads its case by name.
  • ast-grep test-pytest-raises-checks-error: tests/roadmap/test_roadmap_stage_verify_eval.py:189 now has match="rejected".

Before the push I ran ruff, mypy, bandit and the ast-grep scan on the changed files. All passed. I also ran tests/roadmap -k "stage or verify": 502 passed. The full Static Analysis job runs again on the new head. The earlier checks on bdbcce16 came from the merge of main, which fixed the conflict in openspec/specs/roadmap-stage/spec.md by keeping both requirement blocks.


Generated by Claude Code

The check that every command is exposed or excluded failed on the new
command. Like the other roadmap eval commands, it is a local run that
needs a model, so it is excluded.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

dan-petty commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner Author

Tests & Coverage failed on c90a06be with one test out of 16,618: tests/ai/mcp/test_mcp.py::test_all_cli_commands_are_either_exposed_or_excluded. The new devops roadmap eval verify was in neither the exposed nor the excluded list. This PR caused it, and the earlier local runs did not include tests/ai. I added ("roadmap", "eval", "verify") to the excluded list, next to eval stage and eval implement, because it is a local run that needs a model. Pushed as a728bf9a. tests/ai/mcp/test_mcp.py gives 172 passed, and ruff and devops docs check pass. Coverage was 94.38% against the 85% bar. The checks run again on the new head.


Generated by Claude Code

@dan-petty
dan-petty marked this pull request as ready for review November 2, 2026 13:21
@dan-petty
dan-petty merged commit fd0cc2f into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the feat/3153-the-stage-job-verifies-its-plan branch November 2, 2026 13:21
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.42.0](v0.41.0...v0.42.0)
(2026-11-02)


### Features

* **roadmap:** add tests and callers of cited symbols to context
([#3178](#3178))
([6f648d5](6f648d5))
* **roadmap:** the stage job verifies its plan with a model
([#3182](#3182))
([fd0cc2f](fd0cc2f))


### Bug Fixes

* **roadmap:** the stage job refuses an unneeded spec delta
([#3177](#3177))
([0c09a3a](0c09a3a))

---
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>
dan-petty added a commit that referenced this pull request Nov 3, 2026
…test (#3277)

Plans #3204

Agents that add a devops command or a test edit places that no document
lists together, and a missed place breaks CI: a command absent from the
MCP list failed Tests & Coverage in #3182, and a new docs page needed an
inventory entry in #3190. This change adds `devops new command` and
`devops new test`. They write the command function, the help and message
entries, and a mirror-path test with a failing first test and `match=`,
and print the steps that stay manual. They refuse to overwrite a file,
and `--dry-run` lists the targets and writes nothing. The MCP coverage
test derives its excluded commands from the command tree, and the
hand-written class of the docs inventory becomes the complement of its
other classes. `docs/TESTING.md` states the mirror path as the one rule.

Change: `openspec/changes/3204-scaffold-a-command-and-a-test/`

---------

Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com>
Co-authored-by: Daniel Petty <[email protected]>
dan-petty added a commit that referenced this pull request Nov 3, 2026
…es (#3322)

Plans #3187

Move the 47 job modules of `src/devops_cli/roadmap/` into `intake/`,
`refine/`, `stage/` and `implement/`, and the three store modules into
`stores/`, with no behavior change. The package holds 79 modules in one
flat folder. The change moves every module whose name starts with a job
prefix, so the layout test can forbid such a name at the top level. It
rewrites every import and every string target that names a moved module,
moves the roadmap tests and their snapshots into the mirror directories,
and adds invariant tests that hold the layout. It starts after #3182,
#3011, #3015, #3017 and #3019 merge.

Change: `openspec/changes/3187-group-the-job-modules-in-subpackages/`

Follow-ups from this review: #3372 and #3373.

---------

Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com>
Co-authored-by: Daniel Petty <[email protected]>
dan-petty added a commit that referenced this pull request Nov 6, 2026
A new `devops` command or a new test touches several places whose rules
are scattered, and an agent that misses one breaks CI, as #3182 and
#3190 record. #3204 asks for a scaffold that writes those places in
project form, refuses to overwrite, prints the remaining manual steps,
and computes the shared lists that need no hand edit.

Closes #3204

Change:
`openspec/changes/archive/2026-11-06-3204-scaffold-a-command-and-a-test/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): the stage job verifies its plan with a model after the gates

2 participants