diff --git a/antithesis/AGENTS.md b/antithesis/AGENTS.md new file mode 100644 index 0000000000000..62574c2604f73 --- /dev/null +++ b/antithesis/AGENTS.md @@ -0,0 +1,104 @@ +This directory contains files relevant to running tests in Antithesis. + +Use the `antithesis-setup` skill to scaffold and manage this directory. Use +the `antithesis-research` skill to analyze the system and build a property +catalog. Use the `antithesis-workload` skill to implement assertions and test +commands. Use the `antithesis-launch` skill to build, validate, and submit +Antithesis runs — do not run `snouty run` directly. + +## Scenarios + +Antithesis runs are organized as **N narrow scenarios**, each with its own +compose file under `configs//`. The split rule and rationale live in +`scratchbook/scenario-strategy.md`. Each scenario is launched separately via +`snouty launch -c antithesis/configs/ --source `. + +Available scenarios: + +| Scenario | Topology | Status | +| --- | --- | --- | +| `base` | materialized + redpanda + driver | active | + +When adding a scenario: + +1. Drop a new `configs//mzcompose.py` defining its `SERVICES`. +2. Run `bin/pyactivate antithesis/bin/render-compose-yaml.py --scenario ` + to produce `configs//docker-compose.yaml`. +3. Add an entry to the table above. + +## snouty validate + +Validate a scenario locally: + + snouty validate antithesis/configs/ + +The validator runs Docker Compose, watches for the `setup_complete` event, +and inspects discovered Test Composer commands. Run `bin/mzcompose --find + build` (or `bin/mzimage acquire --arch x86_64 antithesis-test-driver`) +first to make sure the local images are present. + +> **Apple Silicon caveat.** The compose configs pin every service to +> `platform: linux/amd64` because the Antithesis platform is amd64-only. On +> macOS / Apple Silicon, Docker runs amd64 containers under Rosetta, and the +> `clusterd` subprocess that `materialized` spawns segfaults during lgalloc +> initialization (`ExitStatus(unix_wait_status(11))` → container `Exited (139)`). +> This is a host-side emulation limitation, not a harness bug. Run +> `snouty validate` on Linux/amd64 (CI, an x86 dev box, or a remote runner) +> to exercise the full bring-up. + +## snouty launch + +Once validation passes, use the `antithesis-launch` skill to submit a run. + +## Directory layout + +**configs/** +One subdirectory per scenario. Each contains: +* `mzcompose.py` — source-of-truth composition for the scenario. +* `docker-compose.yaml` — generated artifact consumed by snouty / Antithesis. + +**bin/** +Helpers that operate on this directory: + +* `render-compose-yaml.py` — regenerates `configs//docker-compose.yaml` + from `configs//mzcompose.py` while layering in the + Antithesis-required attributes mzcompose does not emit + (`platform: linux/amd64`, matching `container_name`/`hostname`, + `NO_COLOR=1`, no host port bindings): + + bin/pyactivate antithesis/bin/render-compose-yaml.py --scenario + +**test/** +Shared Test Composer command tree. A test template is a directory under +`test/v1/