Skip to content
C.W.K.
Stream
Lesson 01 of 05 · published

Return the Original First

~11 min · original-first, latency, transaction, api

Level 0Dry Nib
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"Durability opens the hand; enrichment may follow."

Name the protected result

The meaningful result is the passage a hand can copy. Once that original and its provenance are committed, the request can return; translation and later review have no right to hold the page hostage; read-along voice remains an on-demand sibling call.

Put the promise in state

Create the entry and initial job rows in one transaction, then return an entry representation whose adornment states are visibly pending. Fast response is not optimistic fiction because the durable original already exists.

The quiet failure

Waiting for every downstream service couples handwriting to the slowest sibling and turns a voice outage into a writing outage. Returning before the entry commits has the opposite defect: the screen may display a passage that restart recovery cannot find.

Invariant. Durability opens the hand; enrichment may follow.

Trace five moments

To test “Return the Original First,” inspect the moment before creation, after commit, when a worker claims the job, when output returns, and on the next-day reload. At each point record entry state, job state, captured source text, and visible copy. A promise that survives only the successful request is conditional sovereignty.

Do the work

Draw a request timeline and mark the earliest honest response point. Add source editing, entry deletion, worker restart, and external-service failure to the same table. Mark when dropping an output is integrity preservation rather than data loss.

The final question

Does the screen keep the original visible while telling the truth about work around it? Then adornment serves. If a spinner hides failure or a late result overwrites current text, the adornment has stolen the throne.

Landing condition

Deliberately compare a response before commit with one after commit. The first can leave a sentence visible but unrecoverable; the second lets the original return tomorrow even when translation is late. Fast means the meaningful result has begun to endure, not that every optional path has finished.

Speed and correctness are not opposites here. Commit the original first, then make later work re-read current state before it lands.

Code

Return a durable original with pending adornments·python
def create_draw(store, *, entry_date, origin_lang, length_class,
                brain, soul_id, review_brain, original_text,
                keywords, translate_langs):
    entry = store.add_entry(
        entry_date=entry_date,
        origin_lang=origin_lang,
        length_class=length_class,
        brain=brain,
        soul_id=soul_id,
        review_brain=review_brain,
        original_text=original_text,
        keywords=keywords,
        translate_langs=translate_langs,
    )
    return {
        "id": entry["id"],
        "original_text": entry["original_text"],
        "jobs": entry["jobs"],
    }

External links

Exercise

Draw a request timeline and mark the earliest honest response point.
Hint
Distrust any completion path that never re-reads current state.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.