The cross-backend differential: each impl is the oracle for the other.
A conformance case pins its status and reason on one backend at a time,
and an output schema is often loose (a loose_object or a strip_object),
so an extra field from one spine — possibly a leak — passes, as
does any body difference on a case pinned by status alone.
describe_differential_conformance_tests sends every case to two backends,
normalizes both responses (normalize_differential_response), and asserts
they are equal: status, header names, and the whole body.
Each case runs on a fresh fixture per backend — each backend's own
setup_test, so separate databases and separate keepers, which is why the
normalization is positional. The principal resolves and the request is sent
through the table runner's own send_conformance_case, so a case means the
same thing here as in describe_conformance_table_tests. The per-case
expectations (expect.status, error_reason, …) are not asserted here —
each backend's conformance leg already holds them; the differential holds
the two answers to each other.
Every HTTP request asks for an uncompressed response
(DIFFERENTIAL_REQUEST_HEADERS): content negotiation is the transport's,
not the app's — a server may compress a response whose request accepts
gzip, as Node's fetch sends by default, while another sends it as is — so
letting a server choose would read as a content-encoding and vary
difference on every case.
A difference that is tracked and accepted goes in the known-divergence
ledger (KnownDivergence), matched by case names or by methods, naming
the paths that differ (what_differs), each optionally with the value each
side must show there. A case may match several entries and differ at any
of their paths, with the declared values, and nowhere else: any other
difference fails like any other. The ledger cleans itself, with the
xfail_until semantics — red when a divergence closes, naming the entry to
delete: a case an entry names by case_name must still show it, checked in
that case's own test, and an entry matched by method must still show it on
at least one of its cases, checked by a closing test once they have all run.
The closing test also fails an entry that matches no case, or that names
a case that doesn't exist, and leaves an entry whose cases didn't all run
(a -t filter, a send that threw) unjudged rather than calling it closed.
Use the backends' cross-process fixtures — the differential needs two live
backends, so it runs in a dual-spawn project. fuz_app's own wiring is the
cross_backend_parity project's differential.cross.test.ts.