Skip to content

HWI parity: define error exit-status contract #72

Description

@trevarj

Goal

Define and enforce the process exit-status contract for HWI-compatible JSON errors.

Current state

The focused harness compares reference and candidate error JSON exactly but intentionally ignores process status because pinned Python HWI 3.2.0 sometimes exits with status 0 after returning an error object.

Scope

  • Inventory exit statuses from pinned HWI 3.2.0 for every covered error class and command family.
  • Decide whether BHWI should reproduce command-specific upstream statuses or expose one documented, consistent compatibility rule.
  • Keep JSON error codes and messages unchanged unless the audit identifies a real mismatch.
  • Update the CLI runner and focused harness to assert the chosen contract.
  • Document any unavoidable divergence from HWI 3.2.0.

Acceptance criteria

  • Reference exit behavior is recorded for the covered error matrix.
  • BHWI has a documented exit-status contract for success, argument errors, unavailable actions, missing devices, and device failures.
  • The parity harness asserts exit status instead of ignoring it.
  • CLI unit/e2e tests cover representative status and JSON combinations.
  • All focused parity runners and upstream final gates remain green.
  • Required non-emulator checks pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions