Skip to content

Make CLI value flags strict and testable #5

Description

@amazon7737

Context

The CLI package owns argv parsing and side effects but currently has no test files. Some value flags can be omitted or followed by another flag without producing a clear usage error, which can silently fall back or skip configuration.

Acceptance criteria

  • Reject missing values for value-taking flags such as --store, --viewer, and --port with actionable English usage errors.
  • Reject unknown flags for the affected commands instead of silently ignoring them.
  • Validate arguments before filesystem, network, process, or server side effects begin.
  • Introduce the smallest test seam needed to exercise parsing and output with synthetic temporary roots and injected I/O or dependencies.
  • Cover representative init, serve, and pr-comment argument cases without publishing comments or opening network listeners.
  • Preserve documented valid command behavior.
  • Pass targeted race tests and the repository-wide validation suite.

First safe step

Extract or wrap pure argument validation and add table-driven tests for missing values and unknown flags.

Non-goals

  • Replacing the CLI framework wholesale.
  • Publishing PR comments, using credentials, or changing production configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority 2: normal priorityloopx-readyReady for autonomous LoopX intake

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions