Stateful applications
Incident Triage Agent
A Cloudflare Worker combines structured model output with Durable Object state. A separate provider-free fixture makes the interface, validation and failure paths inspectable without a model account.
Separate the provider from the contract
The Worker supplies the actual model and Durable Object adapters to a shared request handler. Both the browser preview and local fixture use that handler with predetermined output and in-memory state. Run a fixed sample, simulate a failure or switch incident IDs directly in the browser. Entered text stays in tab memory and reload clears it; the preview makes no backend or model calls.
The delayed-response race
Generation starts from a snapshot, while another request may change status or append a turn. Saving rereads current state inside a transaction and appends the successful conversation pair. Status and other committed turns survive; summary and hypotheses follow successful commit order. Concurrent requests may still generate from the same older context.
Keep the interface in the right session
Switching incident IDs invalidates pending view updates. Late replies, status responses and errors from an earlier visit cannot render into the new incident. Already submitted server work can still complete in its original session. Keyboard controls and labeled input support the local walkthrough.
What the fixture does not prove
A fixed response demonstrates application behavior, not model quality or root-cause accuracy. Local Durable Object checks exercise storage transactions without establishing deployed-service durability. The project has no authentication, sensitive-data redaction or history-retention policy. Demonstrations use synthetic incidents.