Recovering from TinyRustLM boundary errors without unnecessary reloads

A practical failure-classification guide for transfer, UTF-8, sampling, context, model, and generation errors.

Capture the numeric code, stable result text, diagnostics JSON, model identity, sampling configuration, prompt policy, browser, and UTC time before resetting state.

Preserve accepted state

Invalid UTF-8, invalid lengths, invalid sampling, context, and many execution failures do not require a model reload. A later valid generate call begins from a cleared generation state.

Reload only when necessary

Reload when the artifact identity changes, model admission failed, or model-owned state is suspected. Quarantine rejected bytes rather than changing only their manifest.