Skip to content

fix(roadmap): paths gate couples check_proposal to criteria gate #4081

Closed

Description

@dan-petty

Problem Description

In src/devops_cli/roadmap/stage/stage_eval_gates.py, _path_gate calls check_proposal without passing issue_body.
check_proposal executes check_gates, which evaluates every gate in ProposalGate including ProposalGate.CRITERIA.
When issue_body is empty, criterion_problems cannot verify whether criteria entries come from person-written issue text.
Any rule that rejects unknown criteria then fails in _path_gate for plans that have criteria.
The evaluation system defines separate gates for PATHS and CRITERIA.
_path_gate couples paths evaluation to criteria checking and creates false failures.

Reproduction Steps

  1. Add an unknown-criterion check to criterion_problems.
  2. Run _path_gate on a plan with valid criteria and an issue body.
  3. Observe _path_gate failing on criteria problems because it passed an empty issue_body string.

Expected vs Actual Behavior

Expected: _path_gate verifies repository paths and delta rules, or passes the case issue body to check_proposal.
Actual: _path_gate runs criteria checks with an empty issue body and rejects plans with valid criteria.

Environment Diagnostics

  • DevOps CLI Version: 0.83.2
  • Python Version: 3.14.10
  • OS & Architecture: Linux x86_64
  • Execution Environment: Local Workstation / CI

Logs, Traces, or Terminal Output

def _path_gate(plan: PlanUnderTest) -> list[str]:
    return check_proposal(
        plan.proposal,
        plan.known,
        plan.tree,
        requirements=plan.requirements,
        search_evidence=plan.search_evidence or None,
    )

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Proposed design

Problem statement

The _path_gate function calls check_proposal without the issue body. check_proposal runs the criteria rule, so the PATHS gate can refuse a plan that has valid criteria. The fix passes the issue body for a plan that has a criteria list, and an empty body for a recorded plan that has none.

Acceptance criteria

Requirement: Paths gate passes the issue body

The _path_gate function SHALL pass the issue body of a mapped plan to check_proposal.

Scenario: Mapped plan with a criteria list

  • WHEN _path_gate runs on a PlanUnderTest whose mapped flag is true and whose issue_body holds the issue text.
  • THEN check_proposal receives that issue body and the gate returns no problem for a valid criterion.

Requirement: Paths gate uses an empty body for a recorded plan

The _path_gate function MUST pass an empty issue body to check_proposal when the plan has no criteria list.

Scenario: Recorded plan without a criteria list

  • WHEN _path_gate runs on a PlanUnderTest whose mapped flag is false.
  • THEN check_proposal receives an empty issue body and the gate does not refuse the plan for a missing criterion source.

Requirement: Regression test covers the paths gate

The change SHALL add a test that proves the paths gate passes the issue body of a mapped plan.

Scenario: Unit test for the paths gate

  • WHEN The test suite runs tests/roadmap/stage/test_roadmap_stage_eval_gates.py.
  • THEN The test asserts that _path_gate returns no problem for a mapped plan with a valid criterion and a non-empty issue body.

Requirement: Criteria gate stays separate

The GATES table SHALL keep GateName.PATHS and GateName.CRITERIA as separate entries.

Scenario: Gate table

  • WHEN The stage gates load.
  • THEN GATES holds one PATHS entry and one CRITERIA entry.

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers this need: the defect is in the project's own _path_gate call. The change edits one call argument and adds one test. It builds no new tool or library.

Key questions

  • How should _path_gate avoid the false criteria failure?: Pass issue_body=plan.issue_body if plan.mapped else "" to check_proposal, and keep the criteria rule in check_proposal. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_gates.py, openspec/changes/3391-refuse-criteria-entries-not-in-the/design.md]
    • Chosen: Pass the issue body for a mapped plan. The criteria rule needs the issue text to tell a person-written criterion from an unknown one.
    • Rejected: Remove the criteria rule from check_proposal. The job needs the criteria check, and a separate CRITERIA gate already exists for it.
    • Rejected: Pass the issue body for every plan. A recorded plan has no criteria list, so the rule would refuse a plan that was never asked for one.
  • Which test file proves the paths gate passes the issue body?: Add the regression test to tests/roadmap/stage/test_roadmap_stage_eval_gates.py, the test module for the stage gates. [sources: tests/roadmap/stage/test_roadmap_stage_eval_gates.py, src/devops_cli/roadmap/stage/stage_eval_gates.py]
  • Should the change add a new replay gate for this defect?: No. The defect is a false failure in the existing PATHS gate, so the fix changes _path_gate and adds no gate. (best practice) [sources: src/devops_cli/roadmap/stage/stage_eval_gates.py]
    • Chosen: Reuse the PATHS gate. The gate already owns the check_proposal call, and the defect is a wrong argument in that call.
    • Rejected: Add a new gate. A new gate would duplicate the PATHS gate and add a defect type for a bug that has no new defect type.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

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

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 7, 2026
  2. dan-petty commented on Nov 7, 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/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The bug causes incorrect rejections of valid plans in the evaluation pipeline but does not block the system entirely.
    • Value: Medium. Correct evaluation results matter for trust in the gate system, but the impact is limited to plans with criteria.
    • Effort: Low. The fix is to pass issue_body or restrict the gate set in one function call.
    • Related: fix(roadmap): Refuse criteria entries not in the issue body #3391, which asks for a different change. Both touch criteria validation in check_proposal, but #3391 adds a rule to refuse unknown criteria while the candidate removes the paths gate's incorrect call into criteria checks.
  3. added
    priority/p2-medium
    on Nov 7, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 8, 2026
  5. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

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

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

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: The issue is a bug in the project's own _path_gate call, where it passes no issue_body to check_proposal. The one search returned only generic input-validation pages. No external tool or library can fix an internal argument in one function, so none applies.

    Tool: none found

    Lacks:

    • No external tool addresses the project-specific _path_gate and check_proposal coupling

    Searches run:

    • Python gate evaluation function passes empty argument couples validation checks bug fix, results: 5

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

  7. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 15, 2026
  8. removed
    status/in-review
    on Nov 15, 2026
  9. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 23:51 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/lowpriority/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