wn-rack
wn-rack is a packageable test runner built on top of pytest.
It adds a suite model around ordinary pytest tests:
- ordered strata such as
L0_foundationandL1_parsing - TOML manifests for suite and subtest metadata
- durable JSON result artifacts
- HTML reporting
- declared source-to-test traceability through
code_under_test - lightweight scaffolding for new strata and subtests
The distribution name is wn-rack. The CLI command is rack.
Install
pip install wn-rack
For local package development:
uv sync --all-extras
uv run rack --version
uv run rack --help
uv run rack run --all
What Rack Does
Rack does not replace pytest authoring. Tests stay as normal test_*.py
files. Rack adds:
rack.tomlfor suite-wide configurationSTRATUM.tomlfor per-stratum manifests- subtest tracking at the test-file level
- persisted results in
rack_results/ - suite status and inventory views
- HTML reports that merge execution data and manifest metadata
Quick Start
Minimal suite layout:
my_suite/
rack.toml
L0_foundation/
STRATUM.toml
test_L0_001_smoke.py
cases/
L1_parsing/
STRATUM.toml
test_L1_001_parser.py
cases/
Minimal rack.toml:
[rack]
name = "Example Suite"
version = "1.0"
description = "Example Rack suite"
[strata]
order = ["L0_foundation", "L1_parsing"]
default_enabled = ["L0_foundation", "L1_parsing"]
Minimal L0_foundation/STRATUM.toml:
name = "Foundation"
order = 0
description = "Low-level tests"
enabled = true
concerns = ["core"]
objectives = ["Verify the basic behavior works"]
[[subtests]]
file = "test_L0_001_smoke.py"
name = "Smoke"
description = "Basic smoke coverage"
test_case_type = "algorithmic"
[subtests.code_under_test]
module = "example_module"
[subtests.test_functions]
test_smoke = "Basic sanity check"
Minimal test file:
def test_smoke():
assert True
Run the suite:
rack run
rack status
rack report
Suite Resolution
Rack resolves the active suite root in this order:
RACK_TESTS_DIRWN_RACK_TESTS_DIR- nearest parent of the current working directory containing
rack.toml - current working directory
This supports both package-first usage and legacy wrapper scripts.
Main Commands
rack listrack runrack statusrack reportrack refreshrack inventoryrack auditrack new stratumrack new subtestrack version
Examples:
rack --version
rack version
rack run
rack run L0
rack run L5_001
rack run L5_001::test_name
rack list --concern svg.text
rack inventory --orphans
rack audit --format json
Result Artifacts
Rack writes output under <tests_dir>/rack_results/:
summary.jsonsource_hashes.jsonreport.htmlsubtests/*.jsonstrata/<stratum>.jsonstrata/<stratum>_pytest.jsonoutput/*.json
Audit
rack audit checks Rack manifest drift without running tests. It exits nonzero
when the suite manifest and filesystem disagree.
It validates:
rack.tomlstrata entries against stratum directoriesSTRATUM.tomlpresence per stratum- discovered
test_*.pyfiles against[[subtests]].file - declared subtest files against the filesystem
- duplicate subtest ids and files
- conventional or configured signoff strata
Use rack audit --strict to promote missing inventory metadata such as
test_cases and test_case_type to failures.
rack audit --format json emits the versioned rack.audit_report a0
contract. The schema is committed at
docs/contracts/rack_audit_report.a0.schema.json.
Python API
Rack exports:
RackOutputaudit_suiteget_current_output()set_current_output()clear_current_output()
This is the structured-output side channel used by suites that want richer report data such as metrics, timings, comparisons, attachments, or SVG output.
See Python API.
Documentation
- Docs Index
- Setup
- Configuration Reference
- Command Reference
- CLI Design
- Architecture
- Architecture Contract
- Public API Design
- Python API
Development Standards
Rack uses the Wavenumber Python baseline in legacy-adoption mode:
- committed
uv.lock - Rack self-hosted tests
- Ruff and Pyright gates
- HTML design docs and JSON contracts
- date-based release version
2026.7.16 - GitHub Release published workflow with PyPI trusted publishing
- documented legacy exceptions for the current monolithic CLI module
Rack carries a dev-std.toml marker and a docs.cli command manifest so the
public CLI surface can be audited. Until the matching wn-dev-std release is
published, validate against a local dev-std checkout with Rack's src tree on
PYTHONPATH:
$env:PYTHONPATH = "$PWD\src"
uv run --project <dev-std-checkout> dev-std audit . --scope docs.cli
After the dev-std release is published, use the normal project environment instead of the local source checkout.
Current Behavior Notes
These are current implementation realities:
--allis parsed but does not yet override enabled filteringrack runcurrently accepts one positional target tokenrack statuscan suggest multiple short names in one command string even though the parser takes one positional targetvalidate_code_under_test()checkscode_under_test.moduledirectly, whilecmd_run()also supportsmodulesfor source-hash updates
License
MIT. See LICENSE.
Metadata
Release files for wn-rack 2026.7.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wn_rack-2026.7.16.tar.gz | 70.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wn_rack-2026.7.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 119.8 kB
Release files / wn_rack-2026.7.16.tar.gz
| Download URL | wn_rack-2026.7.16.tar.gz |
|---|---|
| Size | 70.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
282dd1032088a2178ccc413b9a4dfaf25cf11f1edf2fc19f4487dcde3b75beb7
|
|
BLAKE2b-256 checksum How to use checksums |
f6985ebb6c678b2668c68ce22a94acdb86994349510b6f9c52b053e481759f1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / wn_rack-2026.7.16-py3-none-any.whl
| Download URL | wn_rack-2026.7.16-py3-none-any.whl |
|---|---|
| Size | 49.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b785450c16d13762bc02ce3ea518d44343b120dd08aba26b0f560412ee0fd2b6
|
|
BLAKE2b-256 checksum How to use checksums |
dced87f1533ebd4e8735336191af352547e9d69c9b599e0eb4d9143f6c821c0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency log