Skip to content

fix: reject missing nox policy option values cleanly #1100

Description

@doublewhy

Problem

_split_policy_session_args and _parse_hygiene_posargs index posargs[index + 1] for --base-rev and --requirement-uid. A missing value raises an unhelpful IndexError inside canonical verification instead of a stable configuration diagnostic.

Requirement: GOV-901.

Acceptance

  • Both parsers share one guarded value reader.
  • Missing values and another option in value position fail with an actionable ValueError naming the option.
  • Valid policy/hygiene forwarding behavior remains unchanged.
  • Table-driven tests cover both options and both parsers.
  • Lint and targeted policy tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions