Run with Browser AI · Chapter 16

Run Chapter 16: Structured Output Firewall Laboratory

Compare constrained and unconstrained model JSON, then test parse, schema, domain, policy, human authority and dry-run execution as separate gates.

← Read Structured Output Is Still Model Output
Execution Not inspected
Secure contextUnknown
Top-level pageUnknown
Prompt APIUnknown
AvailabilityNot inspected

Chapter experiment

Structured Output Is Still Model Output

Metrics-only trace

Loading the chapter experiment…

No model output yet.
Inspect the context supplied by this chapter

What this experience knows

This experience is grounded in Chapter 16 and treats every model result as an untrusted proposal.

Generation boundary

A JSON Schema response constraint can improve output shape when the browser supports it. Constraint support is capability evidence, not proof that a fixture exists or an action is allowed.

Parse boundary

The laboratory calls JSON.parse() on the complete candidate. It does not strip fences, extract a convenient substring or silently repair malformed output.

Schema boundary

The candidate must contain exactly operation, fixtureId, workerTags, repetitions and captureMode. Additional properties and executable fields are rejected.

Domain boundary

Fixture IDs and worker tags are resolved against authoritative registries. A model cannot create a fixture, worker or authority merely by naming one.

Policy boundary

The schema permits a wider shape than the local policy. The policy limits repetitions to three and capture to metrics only, making schema-valid policy failures visible.

Authority boundary

Validation produces an admissible proposal. A separate human action authorizes the exact candidate fingerprint. Editing or replacing the candidate revokes that authority.

Execution boundary

Execution is a dry run. It constructs a versioned browser-ai-observatory.job/1 preview in page memory and records externalEffect: false. It does not contact the Chapter 15 coordinator, a directory watcher or a remote service.

Evidence boundary

The trace records character counts, stage outcomes and fingerprints in metrics-only mode. It does not place candidate text or page content in observatory events.

This laboratory puts a deterministic firewall between model-produced JSON and the Chapter 15 job contract. Run live constrained or unconstrained Prompt API generation when supported, or load a specimen that isolates one failure stage.

Nothing here executes an external job. A candidate can reach only an in-memory dry-run preview after it passes every deterministic gate and you explicitly authorize its exact fingerprint.