Skip to content

fix(roadmap): The scenario check misses a config read by name #6140

Not planned

Description

@dan-petty

Problem

The scenario check of the stage plan (#6091, _scenario_problem in src/devops_cli/roadmap/stage/stage_change.py) asks a scenario for a command proof only when a code span names a file outside src/ and tests/ that a group changes. Plan PR #6138 (#2407, staged on 0.169.4) passed it with the scenario "WHEN the dcgm-exporter Helm values are loaded THEN arguments is absent, customMetrics names each family ...". The span dcgm-exporter is not a path, so the check did not judge it, and the scenario asked the implement step for a test of a config value, which the guard of #6075 refuses. An agent fixed that plan by hand (commit 35869cc).

Expected behavior

  • A new scenario whose when or then reads the values, the manifest or the config of a file that a group of the plan changes, by its name or its kind ("the Helm values", "the values", "the manifest"), names a validator command or a live check, as a scenario that names the path does.
  • The check gives the problem with the scenario name, so the model fixes it in the one retry.
  • A test builds the docs(openspec): plan #2407 Add SM activity and occupancy to the GPU row #6138 scenario from text and shows the refusal.

Related

Dependencies

Alternatives check of 2026-11-27: none.
Tool: none found.
Reason: Searches turned up only general linters: Semgrep matches code patterns, Vale checks prose, and pytest-bdd parses steps. None reads a plan group's changed files or demands a validator command for a config read.

Lacks:

  • No link between scenario text and a group's changed files
  • No rule that a config read names a validator command
  • Pattern and prose linters judge text, not plan semantics
  • No problem message carrying the scenario name for a retry

Proposed design

Problem statement

The stage check asks a scenario for a command proof only when a code span names a changed file as a path. A scenario that reads a changed config by its name or kind, such as the dcgm-exporter Helm values or the values, passes with no proof. The implement step cannot test a config value, so a person repairs the plan by hand. The change extends the check to treat that read as a read of the changed file and to refuse it unless the scenario names a validator command or a live check.

Acceptance criteria

Requirement: A config read by a name word needs a proof

The stage check MUST refuse a scenario that reads a changed file outside src/ and tests/ by a word of its file name of four or more letters, unless the scenario names a validator command or a live check.

Scenario: The dcgm-exporter read by name alone

  • WHEN A test builds a StageProposal whose group changes k8s/monitoring/dcgm-exporter-values.yaml and whose scenario The dcgm-exporter is loaded says WHEN the dcgm-exporter is loaded and THEN it runs
  • THEN check_proposal returns a problem whose text holds The dcgm-exporter is loaded.

Requirement: The #6138 scenario is refused

The stage check MUST refuse the #6138 scenario that reads the dcgm-exporter Helm values by name and kind and names no validator command or live check.

Scenario: The dcgm-exporter Helm values read by name and kind

  • WHEN A test builds the scenario The dcgm-exporter arguments with WHEN the dcgm-exporter Helm values are loaded and THEN arguments is absent for a group that changes k8s/monitoring/dcgm-exporter-values.yaml
  • THEN check_proposal returns a problem whose text holds The dcgm-exporter arguments.

Requirement: A config read by kind needs a proof

The stage check MUST refuse a scenario that reads the values, the manifest, the workflow or the config of a changed file, unless the scenario names a validator command or a live check.

Scenario: The values, the manifest, the workflow and the config read by kind

  • WHEN A test builds four StageProposal cases for changed k8s/monitoring/dcgm-exporter-values.yaml, k8s/devops/cronjob-runner.yaml, .github/workflows/ci.yml and pyproject.toml, with scenarios that read the values, the manifest, the workflow and the config
  • THEN check_proposal returns a problem for each of the four scenarios that holds that scenario's name.

Requirement: A command proof accepts the config read

The stage check SHALL accept a scenario that reads a changed config and names a validator command or a live check.

Scenario: The ci check as the proof

  • WHEN A test builds a StageProposal whose group changes k8s/monitoring/dcgm-exporter-values.yaml and whose scenario reads the values and names uv run devops ci --check --only k8s in its then
  • THEN No problem names that scenario.

Requirement: A source scenario is not refused

The stage check MUST judge no scenario that reads no changed file outside src/ and tests/.

Scenario: A scenario about a function

  • WHEN A test builds a StageProposal whose group changes src/devops_cli/roadmap/stage/stage_change.py and whose scenario The check on a function says WHEN the check runs and THEN the check passes
  • THEN No problem names that scenario.

Requirement: The change holds a test of its own plan

The change MUST add a group test that builds a StageProposal for the change and asserts that content_problems returns no problem for it.

Scenario: The change's own proposal in the content check

  • WHEN A test builds a StageProposal for the change's groups and calls content_problems
  • THEN The call returns no problem.

Requirement: The stage eval replay before and after

The change MUST state the score and the per-gate counts of uv run devops roadmap eval stage --replay before and after it.

Scenario: The replay on the base commit and on the change

  • WHEN uv run devops roadmap eval stage --replay runs on the base commit and on the change
  • THEN Each run prints a score and the per-gate counts, and a group task of the change states them before and after.

Existing Tool Considered

The alternatives check of 2026-11-27 records verdict none with Tool: none found. No open, maintained tool covers the need. The block lists the work that no tool does. The change extends the project's own check in src/devops_cli/roadmap/stage/stage_change.py. Written cost to build, keep and fix that code until it matches the need: about 25k tokens and 4 hours.

Key questions

  • Which function holds the config proof rule, and where?: The issue names _scenario_problem in src/devops_cli/roadmap/stage/stage_change.py as the rule. The change extends the config path selection in that module and keeps the problem text that carries the scenario name. [sources: src/devops_cli/roadmap/stage/stage_change.py]
  • How does the check tell that a scenario reads a changed config by name or by kind?: The check matches a word of the file stem of four or more letters, or a kind word tied to the file, in the scenario's when or then, case-insensitively. It selects no .md document. A validator command or a live check accepts the read, and a test command or no command refuses it. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]
    • Chosen: Name words and kind words. It covers the name-only read of the issue and the kind reads the values, the manifest, the workflow and the config, with no model call.
    • Rejected: Name words only. It misses the values and the manifest, which name no file.
    • Rejected: Kind words only. It misses the dcgm-exporter is loaded, which names no kind.
    • Rejected: A model call. It makes the gate nondeterministic and costs tokens on each plan.
  • Which kind words does the check accept?: The check accepts values, manifest, workflow and config. It ties each kind word to the file: values when the file name holds values, workflow under .github/workflows/, manifest for a .yaml, .yml or .json file, and config otherwise. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]
    • Chosen: The four words values, manifest, workflow and config. They cover the kinds of the issue and the workflow that the stage prompt names.
    • Rejected: Only the three words of the issue: values, manifest and config. It misses the workflow, which the stage prompt and the same rule cover.
    • Rejected: A wider set with chart, dashboard and rule. A chart and a dashboard are YAML or JSON files, so manifest already covers them.
  • Where does the name and kind read go: the config path selection, the proof rule or a new function?: It extends the config path selection in src/devops_cli/roadmap/stage/stage_change.py. The proof rule and the caller stay unchanged, and the message in src/devops_cli/lang/en/messages.py keeps the scenario name, so the model fixes the scenario in the one retry. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/lang/en/messages.py]
    • Chosen: Extend the config path selection. The path selection, the proof rule and the caller stay in one place, and the message keeps the scenario name.
    • Rejected: Put the detection in the proof rule. It receives only the selected paths, so it would need the changed set and would split selection from proof.
    • Rejected: A new function. It splits the path selection over two functions and needs a second caller.
  • Does the stage prompt change to state the new rule?: No. src/devops_cli/ai/tasks/roadmap_stage_change.md already states that a scenario of a manifest, a workflow or a config file names a validator command or a live check as its proof. The problem text and the one retry correct the model. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, docs/ROADMAP_WORKFLOW.md]
    • Chosen: No prompt change. The prompt already states the rule, and the retry carries the correction.
    • Rejected: State the rule in the stage prompt. It repeats a rule that the prompt holds and moves the live score, which needs its own eval measure.
  • Where does the test of the new rule live?: In tests/roadmap/stage/test_roadmap_stage_scenario_evidence.py, beside the config proof tests of fix(roadmap): Stop plan rules that ask for config value tests #6080. The parametrized test covers the changed manifest, workflow and config paths. (best practice) [sources: tests/roadmap/stage/test_roadmap_stage_scenario_evidence.py]
    • Chosen: The scenario evidence module. It already holds the config proof tests of fix(roadmap): Stop plan rules that ask for config value tests #6080, so the new cases sit beside them.
    • Rejected: A new module that mirrors the source path. It duplicates the fixtures and splits one rule over two modules.
    • Rejected: The prompt-rule test. That test judges the prompt text, not the gate.
  • Does the plan need a self-acceptance test?: Yes. The change edits _PLAN_CHECK_FILE, so _self_acceptance_problems requires a group test that holds StageProposal, content_problems and no problem from _SELF_ACCEPTANCE_MARKS. [sources: src/devops_cli/roadmap/stage/stage_change.py]
  • Does the plan need the stage eval replay?: Yes. stage_change.py is in STAGE_EVAL_GATE_PATHS, so eval_replay_problems requires a group task with uv run devops roadmap eval stage --replay and the words score, before and after from _STAGE_EVAL_SCORE_WORDS. [sources: src/devops_cli/roadmap/stage/stage_change.py]
  • Should the golden set hold the docs(openspec): plan #2407 Add SM activity and occupancy to the GPU row #6138 case in this change?: No. The issue asks for a test that builds the docs(openspec): plan #2407 Add SM activity and occupancy to the GPU row #6138 scenario from text. A golden case is a recorded plan with a base commit, and the repository holds no recorded plan of docs(openspec): plan #2407 Add SM activity and occupancy to the GPU row #6138. (best practice) [sources: docs/ROADMAP_WORKFLOW.md]
    • Chosen: No new golden case in this change. The issue asks for a test from text, and the repository holds no recorded plan of docs(openspec): plan #2407 Add SM activity and occupancy to the GPU row #6138.
    • Rejected: Build the case from the issue text. A golden case is a recorded plan with a base commit, and a synthetic plan is no replay of the defect.
    • Rejected: Drop the replay measure. The project's rule for a gate change asks for the replay, which the existing set gives.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6521

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    on Nov 17, 2026
  2. dan-petty commented on Nov 17, 2026

    @dan-petty
    OwnerAuthor
  3. added
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 17, 2026
  4. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  5. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.

  6. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • OpenSpec validate scenario requirements against changed files, results: 5
    • tool that validates spec scenarios reference changed config files paths, results: 5
    • openspec CLI spec-driven development change proposal validation, results: 5
    • vale prose linter check that a document mentions a file path, results: 5
    • github Fission-AI OpenSpec, results: 5
    • gherkin scenario linter check scenario steps mention changed files, results: 5
    • "openspec" spec deltas archive change proposals npm tool, results: 5
    • custom policy check prose references files in pull request changed paths tool, results: 5
    • continuous integration check spec scenarios cover changed configuration files linter, results: 5
    • vale prose linter rule require file reference documentation, results: 5

    Sources:

  7. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  8. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  9. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor

    Triage under #6519 (owner instruction of 2026-11-30), before the hold #6521 closes. This item adds or extends a gate, refusal, screen, cap, limit, retry, result line, shell allowlist, tool catalog or plan-shape rule of the stage, implement or fix-checks job. #6519 found that 263 of about 900 issues in four weeks added such rules and none replaced the engine. Stage now runs on stock Coder (grade 60 on 30 graded attempts), where the agent reads the repository, runs the checks in its loop and has a real shell; implement follows (#6527). The code paths that this item names have also moved. If the failure class still shows in graded attempts, file a new item from that evidence. Closed as not planned; a person may reopen it.

  10. removed
    status/new
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions