glass-browser 0.2.0

Lightweight local browser control for Chrome and Chromium via raw CDP
Documentation
# Reliability laboratory

The reliability laboratory is a local release-checking tool. It stores scenario
definitions, fixture controls, independent side-effect oracles, and replay
evidence with the source code.

Supported release targets are Linux x86-64, Linux arm64, macOS x86-64, and
macOS arm64.
Windows is unsupported.

## Contracts

| Contract | Purpose |
|---|---|
| Scenario v1 | Define fixtures, operations, expected state, counters, forbidden outcomes, and budgets. |
| Fixture v1 | Define deterministic controls, faults, and independent oracles. |
| Replay v1 | Bind redacted events and observations to one scenario and environment. |
| Capability suite v1 | Group scenarios for matrix validation. |

The schemas are in [docs/schema](schema/reliability-scenario-v1.schema.json).

The checked-in fixtures are:

- `tests/fixtures/reliability-scenario-v1.json`;
- `tests/fixtures/reliability-fixture-v1.json`;
- `tests/fixtures/reliability-lab.html`; and
- `tests/fixtures/reliability-submit.json`.

The fixture tests target replacement, renaming, duplication, reordering,
movement, overlays, frame detachment, delayed effects, and counted submit
effects. The fixture does not use Glass decision logic.

## Run a scenario

Set up a local fixture server. Then run:

```console
glass certify run \
  --scenario scenario.json \
  --fixture tests/fixtures/reliability-fixture-v1.json \
  --url http://127.0.0.1:8000/fixture.html \
  --workflow-root tests/fixtures \
  --output evidence.json
```

The runner:

1. validates the manifest;
2. navigates to the local fixture;
3. runs only allowlisted fixture controls;
4. writes redacted evidence; and
5. reports the independent oracle result.

The runner rejects workflow sources outside `--workflow-root`.

Renderer and browser disconnect probes are unsupported for release
certification when the browser cannot provide a complete post-fault oracle.
A denied raw-CDP path is also non-certifying.

Run the browser smoke tests:

```console
GLASS_E2E=1 cargo test --test browser_smoke reliability_lab_controls
GLASS_E2E=1 cargo test --test browser_smoke reliability_runner_generates_live_fixture_evidence
```

## Offline commands

Inspect a plan without Chrome:

```console
glass certify plan \
  --scenario tests/fixtures/reliability-scenario-v1.json \
  --fixture tests/fixtures/reliability-fixture-v1.json
```

Validate a replay:

```console
glass certify replay \
  --scenario tests/fixtures/reliability-scenario-v1.json \
  --input replay.json
```

Compare two replays:

```console
glass certify replay-diff \
  --scenario tests/fixtures/reliability-scenario-v1.json \
  --before baseline.json --after candidate.json
```

Evaluate release evidence:

```console
glass certify release \
  --version 0.2.0 \
  --scenarios scenarios.json \
  --observations observations.json \
  --replays replays.json
```

The release command fails closed when:

- a scenario is missing;
- a hash does not match;
- oracle or artifact evidence is incomplete;
- a budget is invalid;
- a forbidden outcome is present;
- a run fails, is indeterminate, or is unsupported; or
- a replay does not match its observation.

A safe refusal passes only when the declared terminal state and independent
oracle agree.

## Limits

The laboratory uses local deterministic fixtures. It does not discover public
sites. It does not publish a scorecard.

Use the [read-only real-site procedure](reliability-real-site.md) for manual
read-only evidence. Do not put credentials, cookies, page values, or
unredacted traces in evidence bundles.