Skip to content

Define a stable CLI exit-code contract #90

Closed

Description

@LunaStev

Problem

Usage errors exit with code 1 in some commands and 2 in others. Compiler, resolver, environment, and executed-program failures are also collapsed inconsistently. Scripts cannot reliably distinguish incorrect invocation from build failure or unavailable tooling.

Acceptance criteria

  • Define documented exit categories for success, usage, resolution, compiler, environment, and executed-program outcomes.
  • Apply the contract consistently to every command.
  • Preserve or explicitly translate child program exit status for vex run.
  • Keep requested help and version at zero.
  • Include the category in machine-readable build messages.
  • Add process-level tests for every error family on Unix and Windows.

Activity

  1. added
    enhancement
    ui/ux
    tooling
    stability
    on Sep 18, 2026
  2. LunaStev commented on Oct 2, 2026

    @LunaStev
    MemberAuthor

    Verified completed against master 67797f6415f640e8c33f9a072879124b83934f84.

    The approved 0/1/2/3/4/5/124/130 exit contract is implemented, preserving user-program exits. Separate JSONL files distinguish vex/program origins without mixing JSON into program stdio. Process tests cover error families and reporting failures.

    Evidence: diagnostic/src/lib.rs, tests/cli_contract.rs, tests/project_state.rs, docs/cli-contract-design.md.

    Master CI run 36963423149 passed all eight jobs, including native Windows, macOS, and Linux tests. Closing as completed.

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

    enhancementstabilitytoolingui/ux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions