@tdd_issue @tdd_issue_968 @mock_only
Feature: TDD Issue #968 — plan explain rejects plan_id, accepts only decision_id
  As a developer
  I want to verify that `plan explain <plan_id>` is rejected with rc=1
  So that the spec-compliant fix from issue #6325 is protected by a regression test

  # Originally written to capture bug #968: plan explain silently fell back to
  # treating the argument as a plan_id via list_decisions.  Issue #6325 fixed
  # this by removing the fallback and enforcing strict decision-only lookup.
  # These scenarios assert the fixed behaviour: rc=1 with a clear error message
  # when a non-decision identifier is passed to `plan explain`.

  Scenario: Plan explain rejects a plan_id with return code 1
    Given tdd968 a mock DecisionService where get_decision raises DecisionNotFoundError for a plan id
    When tdd968 I invoke plan explain with the plan id
    Then tdd968 the command should exit with return code 1
    And tdd968 the output should contain "not found"

  Scenario: Plan explain with plan_id does not output decision data
    Given tdd968 a mock DecisionService where get_decision raises DecisionNotFoundError for a plan id
    When tdd968 I invoke plan explain with the plan id
    Then tdd968 the command should exit with return code 1
    And tdd968 the output should not contain "decision_id"
