Skip to content

blackbull.client.scenario_oracle

blackbull.client.scenario_oracle

Deprecation shim — moved to blackbull.fault_injection.

Groups the HTTP/1.1 differential oracle alongside the scenario model under blackbull.fault_injection. Import from there going forward::

from blackbull.fault_injection import Category, run_scenario  # ...

This shim re-exports the names that used to live here (BBD003).

Category

Bases: str, Enum

Why a differential example was (not) accepted.

Subclassing str makes the values JSON-serialisable directly and keeps assert ctx.category == 'OK'-style sites readable.

SideOutcome dataclass

One side's observation in a differential pair.

categorize(ng, bb)

Bucket a differential example into a Category.

Only outcomes both sides confirmed alike are accepted: a timeout, an unmet premise or a harness failure is never a rejection.

normalize_response(resp)

Drop volatile / framing-only headers; preserve status + body.

run_scenario(host, port, scenario) async

Execute scenario against (host, port) and return (outcome, wire_bytes).

Returns the captured wire bytes (both servers receive identical bytes, so a single capture is enough for failure diagnostics).