Skip to content

fix(roadmap): write the Verification line under a staged task - #3268

Merged
dan-petty merged 3 commits into
mainfrom
fix/3262-stage-verify-line
Nov 2, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/3262-stage-verify-line

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The stage job wrote each task as ", and verify that <command> passes". The implement step reads a verification command only from a Verification: line under a task, so TaskGroup.verification_commands was empty for every staged plan, and the step never ran the command of a group.

The stage job now writes the command on a Verification: line under the task, the form that openspec/config.yaml documents and that the parser reads. A round trip test goes from StageGroup through the rendered tasks.md to TaskGroup.verification_commands, on 60 groups of the golden set, among them the five groups of the plan of #2175. The change folders that exist already are not rewritten.

Closes #3262

Change: openspec/changes/archive/2026-11-02-3262-stage-verify-line/


Generated by Claude Code

The stage job wrote each task as "<work>, and verify that `<command>` passes". The implement
step reads a verification command only from a `Verification:` line under a task, so
`TaskGroup.verification_commands` was empty for a staged plan and the step never ran the
command of a group. The tasks now hold the command on that line, the form that
`openspec/config.yaml` documents.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty
dan-petty marked this pull request as ready for review November 2, 2026 19:16
@dan-petty
dan-petty merged commit acaf455 into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the fix/3262-stage-verify-line branch November 2, 2026 19:17
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.48.1](v0.48.0...v0.48.1)
(2026-11-02)


### Bug Fixes

* **roadmap:** make the plan summary fit its title
([#3267](#3267))
([758b7a8](758b7a8))
* **roadmap:** run a negative search verify in the step
([#3269](#3269))
([42bc835](42bc835))
* **roadmap:** write the Verification line under a staged task
([#3268](#3268))
([acaf455](acaf455))

---
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>

Copy link
Copy Markdown
Owner Author

Adversarial review of #3268 (round 1).

Head 44724e21, base 3f3103ab. Verdict: FIX. The round trip is correct for every valid group of the golden set and for all four kinds. But the new line opens a path from free text to the commands that the step runs, and one merge-order hazard remains. Counts: 0 blocker, 2 major, 3 minor.

Findings

  1. major: a line break in any free-text field of a group adds Verification: lines, and they skip _valid_verify.
    test, implementation and documentation are Sentence, and verify is Text. Only process is folded to one line. Before this PR, a line break in a text only broke the list. Now it can add a command that the step reads and runs. The step allowlist holds git, uv, ruff, mypy, grep, cat, find, openspec and devops, so git push origin HEAD and uv run python -c ... pass it. form_problems checks only group.verify, so it reports nothing.
    Reproduction (StageGroup.model_validate with implementation="Do it\n - Verification: uv run python -c 'print(1)'", then form_problems and parse_task_groups(group_text(...))):

    form_problems: []
    cmds: ('uv run devops ci test tests/roadmap/test_x.py', "uv run python -c 'print(1)'", 'git push origin HEAD', ...)
    

    I did not run the step end to end. The parse and the allowlist check are shown. The text comes from the stage model, which reads the issue body. A person reads the plan pull request, but the plan gate is the place to stop it.
    Fix: fold test, implementation, documentation, verify and title to one line with the existing _one_line (as Process does), or refuse a control character with _is_plain. Add a round-trip test with a line break in each field: verification_commands must hold at most the verify of the group and the documents check.

  2. major: merge order with fix(roadmap): run a negative search verify in the step #3269. After this PR, 4 of the 60 golden groups stop the step.
    The groups 1 to 4 of the plan of refactor(cli): the five functions and properties that nothing calls and that #1910 does not list leave src #2175 have ! git grep -n -w <name> src/ tests/ docs/ as verify. The gate accepts it. commands_failure refuses it, because ! is not in IMPLEMENT_ALLOWED_PROGRAMS, and _exit_failure returns a _Failure with no repair.

    $ python cnt.py          # 60 valid groups, rendered, parsed, first word checked against the allowlist
    60 4
    $ commands_failure(Path("."), ["! git grep -n -w thinking_detected src/ tests/ docs/"])
    The verification command ! git grep ... is not allowed. ! is not one of: git, uv, ruff, mypy, grep, cat, ls, head, tail, find, openspec, devops.
    

    Before the PR the step ran nothing, so it did not stop. The proposal names fix(roadmap): the stage form admits a negative search verify that the implement step refuses #3263 under Dependencies, but says the two changes "do not touch the same lines". They do not conflict in code, but the order matters. fix(roadmap): run a negative search verify in the step #3269 is still open.
    Fix: merge fix(roadmap): run a negative search verify in the step #3269 first, or write "Depends on fix(roadmap): run a negative search verify in the step #3269" in the PR body and keep this PR a draft until then.

  3. minor: a backtick in verify gives half commands.
    The gate (_valid_verify) checks only the prefix, and verify has no _is_plain check as paths do.

    verify="! git grep -n '`foo`' src/"  ->  verification_commands = ("! git grep -n '", "' src/")
    verify="uv run devops ci test ``x``" ->  verification_commands = ()   (no code span; the group has no command)
    

    Fix: refuse a backtick in verify in form_problems (one sentence for the model), or write the span with a fence longer than the longest backtick run.

  4. minor: a claim in the PR text is wrong. The PR body and the proposal say openspec/config.yaml documents the Verification: line. grep -n "Verification:" openspec/config.yaml finds nothing. It says "name each task's verification command". Only step_files.py and the spec roadmap-implement-step name the line. Fix the sentence, or add the line form to config.yaml so that a person who writes tasks.md by hand gets it.

  5. minor: the spec delta drops a sentence without a note. The old requirement said "An other group SHALL render no test and no words "fails on the base"". The delta removes it, and the proposal does not say so. The behavior is still tested (test_an_other_group_renders_no_test_and_no_failure_on_the_base). Keep the sentence, or state the removal in the proposal. The delta text is 491 characters, under the 500 limit.

Attacks tried that did not break it

  • New test file on the base messages.py: 67 failed, 2 passed, as the PR says. The failures are assert () == (cmd,), not import errors.
  • Round trip on the real refactor(cli): the five functions and properties that nothing calls and that #1910 does not list leave src #2175 fixture and on the 60 valid golden groups, and by hand on all kinds: behavior (test and implementation), other with verify, other with process, a documents task, several groups. The commands are exact, in order, with none extra and none missing. A manual check gives ().
  • Ten mutations of messages.py (rename the word, indent 0, 3 and 4 spaces, same paragraph, drop or change the documents check, swap passes/fails, add a line to the process task): each fails 3 to 10 tests.
  • openspec validate --strict (1.14.3, from tools_lock) on 16 change folders rendered by render_change from the golden set: all valid. The nested line is not counted as a task, and [ ] detection and named_files do not change.
  • tests/roadmap whole folder at the head: 2729 passed, 5 skipped. Check runs on the head: 22, all success or skipped.
  • Edge inputs: pipe, *, <b>, #, trailing backslash, inner and trailing spaces, unicode, a 40 KB command: each parses to the same string.
  • git grep of the repo for "and verify that" and the old forms: no document, prompt or config.yaml holds the old text. The stage prompt and the prompt test (test(roadmap): check the planner prompt against its rules #3210) do not pin it. Only the five edited tests did.
  • Old plan folders are not rewritten, and the parser is not in the diff, so they read as before (()).

Not verified

  • A live stage run, and a full implement step run with the new lines. The reach of finding 1 is shown by parse and allowlist only.
  • uv sync fails here (needs Python 3.14.10). I ran with the 3.14.6 environment of the main checkout and PYTHONPATH on the clone, so devops ci as a whole did not run. Static checks were read from the CI runs.
  • ASD-STE100 of the proposal prose (some sentences in the Impact section are long).

Generated by Claude Code

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.

fix(roadmap): the stage renders a verify command that the implement step does not read

2 participants