Skip to content

feat(roadmap): a plan that adds a gate quotes the defect the gate refuses #3386

Closed

Description

@dan-petty

Problem or Motivation

A plan that adds a gate can claim it refuses a defect that the gate does not refuse. The plan for #3308 is an example. Its Feasibility said the plan of PR #3260 claimed 40 while SUMMARY_MAX_CHARS is 60. The actual plan of PR #3260 gave PLAN_SUMMARY_MAX_CHARS = 47 and said that the issue text says 40 and the schema says 60. The planned check skips a constant name that the staged tree does not define, so it cannot refuse that plan. The Feasibility quoted the staged constant and did not quote the defective plan text or test the rule against it.

A plan that quotes only the staged value can therefore pass every gate and still add a check that misses its own example.

Proposed Solution & Architectural Design

  • In the plan check of src/devops_cli/roadmap/stage_change.py, when a plan adds or changes a gate in src/devops_cli/roadmap/stage_eval_gates.py or src/devops_cli/roadmap/stage_change.py, require its Feasibility to quote the defective text that the gate must refuse.
  • Require one task group task to assert that the new check refuses that text and fails on the base.
  • When the rule skips a case, as a new constant name does, require the plan to state that non-goal in the design or the spec delta.
  • Add a test in tests/roadmap/test_roadmap_stage_plan.py that refuses a plan with the new gate and no quoted defective text, and one that accepts a plan with the quote and the failing test task.
  • Reuse the check of check_proposal and the messages in src/devops_cli/lang/en/messages.py.

Target Subsystem

SDLC, Git & PR Governance

Existing Tool Considered

No open tool checks a plan against its own motivating example. The change uses the existing plan check and needs no dependency. Estimated cost: 8,000 tokens to build, 2,000 tokens per month to keep and fix, and 1 elapsed day.

Source: #3329

Proposed design

Problem statement

The plan check does not tie a new gate to the defect that the gate refuses. The historical example in the issue is not at the staging commit, but the code gap remains. A plan can quote only a staged constant and add a check that misses its own example. The check also accepts a test task with no failing-base assertion and a skipped case with no stated non-goal.

Acceptance criteria

Requirement: Gate plan quotes the refused defect

A plan that changes a gate file SHALL quote the defective text that the gate must refuse in its Feasibility.

Scenario: A gate plan without the defect quote

  • WHEN A plan changes src/devops_cli/roadmap/stage_eval_gates.py, and its Feasibility holds no code span.
  • THEN content_problems returns the message that the Feasibility must quote the defective text.

Requirement: Gate plan tests the defect on the base

A plan that changes a gate file SHALL give a test task that holds the quoted text and the phrase fails on the base.

Scenario: A gate plan with the quote and the failing test

  • WHEN A plan changes a gate file, its Feasibility quotes the defective text, and its test task holds that text and the phrase fails on the base.
  • THEN content_problems returns no gate defect problem.

Requirement: Gate plan without the failing test is refused

A plan that changes a gate file and gives a test task with no fails on the base phrase SHALL be refused.

Scenario: A gate plan with the quote and no failing test

  • WHEN A plan changes a gate file and quotes the defective text, and its test task omits fails on the base.
  • THEN content_problems returns the message that the test task must fail on the base.

Requirement: Gate plan states a skipped case as a non-goal

A plan whose gate test says that the rule skips a case SHALL state that non-goal in its design decisions, its rejected alternatives or its spec delta.

Scenario: A gate plan that skips a case without a non-goal

  • WHEN A plan changes a gate file, its test text holds skip, and no decision, rejected alternative or spec delta text holds non-goal.
  • THEN content_problems returns the message that the plan must state the skipped case as a non-goal.

Requirement: Gate plan accepts a stated non-goal

A plan that states the non-goal for a skipped gate case MUST pass the non-goal rule.

Scenario: A gate plan with the non-goal

  • WHEN A plan changes a gate file, its test text holds skip, and a decision text holds non-goal.
  • THEN content_problems returns no non-goal problem.

Requirement: The gate quote rule runs in the shared check

The gate quote rule MUST run from content_problems, which check_proposal and the replay call.

Scenario: The stage job and the replay report the same message

  • WHEN A plan changes a gate file and quotes no defective text.
  • THEN check_proposal and _content_gate both return the same RoadmapMessages text.

Requirement: The gate quote rule has offline tests

tests/roadmap/test_roadmap_stage_plan.py SHALL hold one test that refuses a gate plan with no defect quote and one test that accepts a gate plan with the quote and the failing test task.

Scenario: The gate quote tests run

  • WHEN The test module runs.
  • THEN The refusing test and the accepting test both pass.

Requirement: A plan with no gate change is not refused

A plan that changes no gate file MUST pass the gate defect quote rule.

Scenario: A plan with no gate change

  • WHEN A plan changes only src/devops_cli/sample.py.
  • THEN content_problems returns no gate quote problem.

Existing Tool Considered

No alternatives check has run. No open, maintained tool checks a plan against its own motivating example. The change reuses the existing plan check and builds its own rule. Cost: 8,000 tokens to build, 2,000 tokens per month to keep and fix, and 1 elapsed day.

Key questions

  • Does content_problems already enforce the gate defect quote?: No. It checks text length, placeholders, message file coverage, probe quotes, and build cost. It has no rule for a gate defect quote, a failing-base test task or a skipped-case non-goal. [sources: src/devops_cli/roadmap/stage_change.py]
  • Does the issue still depend on the plan of PR docs(openspec): plan #3200 Refuse placeholder and cut plan text #3260?: No. The staging commit has STAGE_SUMMARY_MAX_CHARS, not PLAN_SUMMARY_MAX_CHARS, in src/devops_cli/roadmap/stage_change.py. The rule can test a plan that the test writes, so it needs no historical plan. [sources: src/devops_cli/roadmap/stage_change.py]
  • Which paths make the gate defect quote rule apply?: The rule applies when any group changes or creates src/devops_cli/roadmap/stage_eval_gates.py or src/devops_cli/roadmap/stage_change.py. (best practice) [sources: src/devops_cli/roadmap/stage_eval_gates.py, src/devops_cli/roadmap/stage_change.py]
    • Chosen: Both gate files. The body names both files, and they hold the gate definitions and the plan content checks.
    • Rejected: Only stage_eval_gates.py. A gate can also change in stage_change.py, as the existing content rule shows.
    • Rejected: Every source file. The rule would refuse plans that add no gate.
  • Where does the gate defect quote rule run?: The rule runs in content_problems. check_proposal and _content_gate call this function. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py]
    • Chosen: content_problems. The stage job and the replay already share this function.
    • Rejected: A new function in check_proposal. The replay would not judge the rule.
    • Rejected: stage_eval_gates.py only. The stage job would not refuse the plan.
  • How does the rule recognize the defective text and its failing test?: The rule reads each code span in feasibility. It requires one gate group's test text to hold the same code span and the phrase fails on the base. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_plan.py]
    • Chosen: Code span match. A code span is the existing plan form for quoted text, and a test can check it offline.
    • Rejected: Free text match. Whitespace and wording changes make the check brittle.
    • Rejected: A new schema field. The plan schema already has feasibility and test, so a new field adds no value.
  • How does the rule require a non-goal for a skipped case?: The rule applies when a gate group's test text holds skip or skips. It requires a decision, a rejected alternative or a spec delta text that holds non-goal. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_plan.py]
    • Chosen: Trigger on the test text. The plan has no rule code. Its test text is the only signal that the rule skips a case.
    • Rejected: Always require a non-goal. A gate plan that skips no case would get a false refusal.
    • Rejected: No automatic check. The body asks the plan check to require the non-goal statement.
  • Where does the new message go?: The rule adds RoadmapMessages fields in src/devops_cli/lang/en/messages.py. content_problems uses these fields. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage_change.py]
    • Chosen: RoadmapMessages. Every roadmap plan message is in this catalog.
    • Rejected: Inline text. The project keeps user-facing text in the catalog.
    • Rejected: A new message module. The existing catalog already holds the plan messages.
  • Which tests cover the rule?: tests/roadmap/test_roadmap_stage_plan.py holds one test that refuses a gate plan with no defect quote. It holds one test that accepts a gate plan with the quote and the failing test task. (best practice) [sources: tests/roadmap/test_roadmap_stage_plan.py]
    • Chosen: test_roadmap_stage_plan.py. The file already tests check_proposal and the plan content rules.
    • Rejected: A new test module. The existing module holds the nearest tests.
    • Rejected: test_roadmap_stage_content.py. The issue names the plan test module.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-06: none.
Tool: none found.

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 3, 2026
  2. dan-petty commented on Nov 3, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It prevents a class of plan defects but does not block current delivery.
    • Value: Medium. It stops plans that add a gate from passing without proving the gate works on its own example.
    • Effort: Medium. The body estimates one elapsed day and about 8000 tokens to build plus tests.
    • Related: feat(roadmap): check a plan number against its constant #3308, which asks for a different change. Both add checks to the plan validation in stage_change.py and reference the PR #3260 example, but #3308 compares a number to a constant while the candidate requires a quoted defective text.
  3. added
    priority/p2-medium
    on Nov 3, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 3, 2026
  5. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 7d07054 (see proposed design in issue body).

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

    @devops-cli-service
    Contributor

    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:

    none

  7. added
    status/new
    status/ready
    and removed
    status/ready
    status/new
    on Nov 3, 2026
  8. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at d254410 (see proposed design in issue body).

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

    @devops-cli-service
    Contributor

    Alternatives check: none

    Tool: none found

    Lacks:

    • No open, maintained tool checks a change plan against its own motivating example: that a plan adding a gate quotes the defective text the gate must refuse.
    • No tool ties a quoted defect to a test task asserting the new check fails on the base commit.
    • No tool requires a plan to state a skipped gate case as a non-goal in its design decisions, rejected alternatives or spec delta.
    • The issue asks for no dependency: the rules belong in the project's own plan check (content_problems in src/devops_cli/roadmap/stage_change.py) and its message catalog, with offline tests in tests/roadmap/test_roadmap_stage_plan.py.

    Searches run:

    • tool that verifies a new test fails on the base commit before the fix
    • linter for change proposals requiring a reproduction example in the plan
    • verify new test fails on base commit mutation testing tool
    • plan validation tool reproduction example
    • openspec validate change proposal prose check

    Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.

  10. added 3 commits that reference this issue on Nov 9, 2026
    eb445e2
    d08013b
    294b7d8
  11. added
    status/in-review
    and removed
    status/ready
    on Nov 9, 2026
  12. removed
    status/in-review
    on Nov 9, 2026
  13. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-09 03:15 UTC

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/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions