Run with Browser AI · Chapter 15

Run Chapter 15: Fallback Router and Local Worker Coordinator

Classify local capability failure, choose an explicit data route, validate declarative JSON jobs and simulate idempotent leasing across labelled Chrome workers.

← Read When Local Is Not Available
Execution Not inspected
Secure contextUnknown
Top-level pageUnknown
Prompt APIUnknown
AvailabilityNot inspected

Chapter experiment

When Local Is Not Available

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 15 and treats local availability as a runtime condition.

State boundary

API absence, unavailable assets, downloadable assets, rejected creation, runtime failure and rejected output are distinct observations. They do not share one generic fallback response.

Data-route boundary

A remote route is a system change. Private content never leaves through this laboratory. Public or internal content requires route-specific consent, purpose and retention scope before the policy can select a simulated remote service.

Worker boundary

Workers must satisfy every hard requires tag. Preferences only rank compatible workers. A worker that lacks an experimental tag cannot silently execute an experiment requiring it.

Identity boundary

Worker model labels are operator-supplied and remain browserAttested: false. Registered specimen workers demonstrate routing metadata; they are not live browser attestations.

Job boundary

Jobs are declarative. Operations, keys, fixture IDs, capture modes and repetition counts are allowlisted and bounded. Fields such as javascript, script and code are rejected.

Idempotency boundary

Submitting the same idempotency key returns the existing job rather than creating duplicate execution. Every lease has an attempt ID, worker ID and expiry.

Filesystem boundary

The Hugo page does not monitor a directory. A future localhost process owns inbox/*.json, reads only atomically renamed files and sends both file and HTTP submissions through this same validator.

Security boundary

Localhost is not automatically trusted. The future coordinator must bind to loopback, authenticate extensions, restrict origins, cap sizes and retain an append-only audit record without exporting secrets.

This experience separates product fallback from experimental job routing. The first half chooses a route without silently moving protected content across a network. The second half demonstrates the validated contract a localhost coordinator can share between POST /v1/jobs and an atomic inbox/*.json directory workflow.

The worker pool and queue are an in-page simulation. The page neither watches an arbitrary directory nor contacts a remote AI service. Its output is the versioned job, routing and lease evidence needed to build that local service honestly.