Documentation contents

Local report inspector

Inspect a report locally

./faultline ui [--report FILE] [--port PORT] [--open]

Open the printed http://127.0.0.1:PORT/ address, then choose or drop a Faultline JSON report. To load a report at launch, use ./faultline ui --report run.json. The default port is 0, which asks the OS to choose an available port. Pass --open to request browser launch. Press Ctrl+C to stop.

The inspector shows execution and verification separately, with an interactive timeline of client observations, a delivery table, assertion results, the plan, and copyable JSON. Use arrow keys to move between tabs and between timeline intervals. The browser can validate reports up to 2 MiB. It can only read a startup report that you explicitly supplied and validate the files you select. The UI stays on loopback, makes no external requests, and cannot run or replay a scenario.

Inspector architecture

internal/ui embeds its HTML, CSS, and JavaScript in the binary. It binds to literal IPv4 loopback and accepts the exact Host printed by the CLI. The server rejects foreign browser origins and sends no CORS headers. Its CSP permits same-origin assets and validation requests and blocks framing and inline scripts. Static paths are exact and have no filesystem mapping.

The browser reads an optional startup report that the CLI validated once. File selection and drag-and-drop send JSON to a same-origin validation endpoint. The endpoint uses the same 2 MiB report reader and validator as replay, limits concurrent validations, and returns validated JSON or a fixed error. The listener has header, read, write, and idle timeouts. No endpoint accepts a filename, executes a scenario, or writes a report. The page renders report strings as text and derives its views from the validated JSON.

The trace table plots observed client intervals from the report's monotonic offsets. A point marks an interval narrower than one CSS pixel, including zero-duration intervals. The table shows a scroll hint when columns overflow. Exact timings remain in interval details and raw JSON. Planned batch delays appear separately. The page holds the selected report in memory and makes no external requests.