# cache-conformance — HTTP caches under http-delivery §9 Checks the cache rules of [http-delivery](../extensions/http-delivery.md) §9 against an HTTP cache that fronts an origin serving the objects of [`http-conformance/`](../http-conformance/), and reports, per cache label and version, whether the configuration meets each rule. **Provenance.** Written here: the tests, the driver and the controls are the code in this directory, and the objects a run fetches are `http-conformance`'s (see its provenance). No media of its own. | file | what | |---|---| | `tests.json` | the tests: id, rule, level (MUST or informative) and what each checks | | `driver.py` | stages the origin's files and runs the tests against a cache; standard library only, with `../claim-conformance/_blake3.py` to check each object against its content hash | | `mutators.py` | four proxies that each break §9 in one way: the negative controls | | `run.sh` | stages, starts `wai http origin`, and runs the driver against the origin, each control and each labelled cache | ## What runs 1. **The origin, directly** (`origin-direct`): the reference origin (`wai http origin`) must pass every MUST test. It answers byte ranges and `If-Range`, serves a live-edge alias with a shorter `max-age`, sends §8.4's `Cache-Control` for the key log, and counts the requests it receives (`--count-hits`) so the informative tests can tell whether a cache answered from its store. 2. **The negative controls** (`control-flip`, `control-gzip`, `control-truncate`, `control-vary`): the driver must fail, and must name the tests each defect reaches — `flip` C1, C3 and C11; `gzip` C7; `truncate` C1 and C2; `vary` C13. A control the driver passes is a defect in the driver. 3. **Labelled caches.** An environment that provides them lists their labels in `/opt/wai-cache/labels`; each `/opt/wai-cache/