Rack CLI Design

Rack's command line is the public control surface for suite discovery, execution, reporting, manifest audit, runtime progress helper export, and scaffolding. The parser is built by a deterministic helper so standards tooling can inspect the visible command inventory without running an arbitrary Rack command.

rack list

Lists configured strata or subtests inside one stratum. Optional concern filtering narrows the visible subtests without running tests. Unknown strata fail with a nonzero exit code.

rack run

Runs enabled strata by default, or one stratum, subtest, or pytest test selector when a target is provided. It writes Rack result artifacts, updates source-hash tracking for passing subtests, optionally tails Rack progress events, and regenerates the HTML report. A failed selected suite returns a nonzero exit code.

rack status

Reads existing Rack result artifacts and reports the current aggregate state, stale subtests, never-run strata, and suggested recovery command. It does not execute tests or mutate suite manifests.

rack report

Rebuilds the human-readable HTML report from existing JSON artifacts. It is a rendering command, not a test execution command, and it preserves the current result state.

rack refresh

Reconstructs stratum summaries from raw pytest JSON reports, then refreshes the HTML report. It is intended for repair and migration cases where raw pytest data exists but Rack aggregate summaries need rebuilding.

rack inventory

Reports declared test-case paths, test-case type distribution, and orphaned case directories. Missing inventory metadata is informational in this command; rack audit --strict is the failing enforcement mode.

rack progress

Exports Rack-owned runtime progress helpers for native projects. The command writes helper assets such as rack_progress.hpp so native suites can emit the same JSONL progress schema as Python suites.

rack audit

Audits suite manifests against the filesystem without running tests. It validates rack.toml, stratum directories, STRATUM.toml files, discovered test_*.py files, declared subtest files, duplicate strata, duplicate subtest ids and files, and required signoff strata. --strict promotes missing test_cases and test_case_type metadata to failures. --format json emits the rack.audit_report a0 output contract.

rack new

Creates Rack scaffolding for new strata and subtests. It updates the suite manifest for strata and appends matching [[subtests]] metadata for generated subtest files. The top-level command owns scaffolding behavior; nested stratum and subtest parser branches remain part of that public surface.

rack version

Reports Rack, Python, pytest, pytest-json-report, and tomli-w versions in text or JSON form. The root --version shortcut prints the same version report.