Jev optimistic rejection recovery

Review what happens when an optimistic update is rejected

Show the optimistic state, authoritative state and rejection path. Check whether the interface restores truthful state and explains the failure, or leaves an unconfirmed change visible.

Does rejection restore the authoritative state?Live API
Try an example

Both state restoration and feedback are supplied.

Source: API-collected workflow inspiration; original demonstration below

Source and example scope

The API-collected roundup links the cited project. Its pinned source defines the decision adapted here. These synthetic inputs and explicit missing-context outcomes are original to this demonstration. The window returns a label; it does not run the linked application, execute its downstream actions or verify its performance claims.

Inspect the optimistic state, authoritative state and complete rejection path.

Decision rules and labels
Recovered with feedbackState unrecoveredFeedback missingNot optimisticNeed failure path
A real response from the Jev API

Edit any input to explore a different decision. No request is sent until you run it.

Your next decision

Not run yet

Choose an example or write your own input, then run it to see the ranked choices.

Results are not stored by this site. Your submitted text is processed by the API provider.

The decision

An error message can appear while the rejected change remains on screen.

The error-without-rollback preset displays a failure but keeps the unconfirmed title. The restore-and-explain preset instead returns to the server value and tells the user that saving failed. These are separate responsibilities.

A framework or query library can own recovery. The provider preset supplies that implementation behavior, so it can establish restoration and feedback. Naming a library without showing its failure path cannot establish the same result.

The linked rule is review-only and calls for a forced-failure check of the real interface. This original window classifies the supplied behavior description. It does not send a mutation, execute a framework action or prove that an application recovers correctly.

The API-collected roundup links the cited project. Its pinned source defines the decision adapted here. These synthetic inputs and explicit missing-context outcomes are original to this demonstration. The window returns a label; it does not run the linked application, execute its downstream actions or verify its performance claims.

Illustration of checking a code change and reviewing a flagged line
Illustration of the decision flow.
How it works

Try the example in four steps

Use the sample to understand the rule, then test your own input for optimistic update recovery.

  1. Illustration of adding the text or evidence for a decision

    Add the information to check

    Show the optimistic state, authoritative state and rejection path.

  2. Illustration of defining a question and its allowed choices

    Confirm the question and labels

    Open the decision rules and keep the intended distinction between Recovered with feedback, State unrecovered, Feedback missing, Not optimistic, Need failure path. Edit the choices only when testing your own rule.

  3. Illustration of sending one input and comparing the returned choices

    Run the decision

    Use a sample first, then try your own input. Compare the selected label with the other returned probabilities.

  4. Illustration of reviewing a result and an uncertain item before using it

    Review the next step

    Review Feedback missing, Need failure path before using a result. The label is a decision about the supplied information, not an executed action.

Our API test

Recorded API observations

Recorded API observations
Original inputObserved labelLeading probability
Restore and explainRecovered with feedback100%
Error without rollbackState unrecovered100%
Silent rollbackFeedback missing97.0%
Wait for successNot optimistic71.0%
Framework owner shownRecovered with feedback99.0%
Library name onlyNeed failure path100%

These are six original synthetic inputs, tested once per request revision. The percentage is the leading option probability, not measured accuracy. Authored expectations and any disagreements remain in the downloadable evidence. 6 of 6 results matched the authored fixture expectations.Verified

Understand the results

Replay the saved synthetic requests to inspect each recorded decision

Replay the saved synthetic requests to inspect each recorded decision. Authored expectations and model disagreements remain available; these examples are not a production accuracy benchmark.

Using the result in your application

The single-request SDK runner uses your private TYPESAFE_API_KEY. The offline consumer reads saved observations, checks request hashes and prints a pending output. It does not call the model or change any external system.

Runnable offline example

Run one sample, then inspect the local packet

View the code example
Single-request replay
npm install @typesafe-ai/sdk@0.6.0
# Set TYPESAFE_API_KEY privately in your shell.
node run-choice-sample.mjs samples.json case-1
python preview_choice_workflow.py samples.json saved-api-results.json
Scope of this demo

Where this decision fits

Useful scope

  • Separating rollback from failure messaging
  • Reviewing explicit framework-owned recovery
  • Finding omitted rejection paths

Outside this demonstration

  • Executing a mutation
  • Assuming library imports prove rollback
  • Replacing a real forced-failure UI test
Example FAQ

Questions about optimistic rejection recovery.

Input scope and downstream handling determine what this judgment means.

Must rollback be implemented in the component itself?

No. A provider can own it. The supplied evidence still needs to show how the temporary state ends and what failure feedback appears.

Does an error banner prove the state recovered?

No. The banner and displayed data can disagree. The State unrecovered preset shows exactly that distinction.

Is the leading probability an accuracy measurement?

No. It is one value in the returned distribution over this request’s choices. The six synthetic fixtures have authored expectations; they do not measure production accuracy.

What happens on an API failure?

The window displays an error without a fresh judgment. An incomplete-input outcome describes the supplied evidence and is not used as a fallback for provider failure.

Try your own optimistic rejection recovery input

Edit the input above, or open the Playground to explore another decision.