Run the conformance suite
The contract has three conformance surfaces: the backend contract with two hosts, and the creator contract with one suite that every creator — builtin or external — runs the same way.
Backend contract
The backend contract has two hosts — the Python reference host and the Rust
runner inside the desktop creator — and one suite of cases they both must
pass. The cases live in conformance/host/:
tiny Python backends in backends/, each misbehaving in exactly one way,
and one JSON expectation per backend in cases/.
Against the Python host
The suite is an ordinary pytest tree:
$ uv run pytest tests/conformance -q
Every case builds a throwaway project around one backend, runs one probe session, and asserts the report fields the case pins: started, ready, health status, token handshake, stop kind, survivors, writes, stdout lines, browser opens.
Against the Rust runner
The runner carries the same cases in
creators/desktop/runner/tests/conformance.rs.
Each case is executed by the runner binary in --aa-probe-case mode, which
replays the Python host's probe semantics: chosen port, health poll, token
handshake, stdin close, tree termination, survivor accounting.
$ cargo test --manifest-path creators/desktop/runner/Cargo.toml
Add a case
- Write a backend that misbehaves in one new way —
conformance/host/backends/<name>.py, stdlib only, exiting on stdin EOF unless the misbehavior is precisely "does not exit". - Pin the expectation in
conformance/host/cases/<name>.json. Use exact values for statuses and booleans,_min/_maxfor counts.
Creator contract
Every creator runs the same sample suite through the pytest plugin shipped
in app_anything.sdk.testing:
$ uv run pytest tests/conformance/test_creators.py --aa-creator=web --aa-target=web
The samples live in conformance/creators/
and each covers one capability profile: static only, static plus a process
backend, a process backend with a user folder, a wasm backend, and file
associations. A sample runs against a creator when the creator offers the
capabilities the sample requires: the suite packs the sample, calls
create, asserts the artifacts exist, and runs smoke when the creator
implements the Smokeable protocol.
An external creator joins with no Python at all —
tests/fixtures/creators/app-anything-create-fixture
is a shell script that passes the same suite:
$ uv run pytest tests/conformance/test_creators.py --aa-creator=fixture --aa-target=web
Skip the --aa-target option to run every target the creator declares.
3. Run both suites. If the hosts disagree, the case is right and a host is
wrong — fix the host, never the case.
A case file names its backend script, so a missing script fails collection in both hosts. Language neutrality is the rule: the runner knows processes and HTTP, not Python — keep cases free of host-specific hooks.
Rendered from docs/how-to/run-the-conformance-suite.md on main.