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

Failure Keeps the Entry

~11 min · failure, retry, original-sovereignty, ui-state

Level 0Dry Nib
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"An adornment may fail without downgrading the existence of the original."

Name the protected result

If translation or audio fails, the hand still has a passage. Deleting or hiding the entry would let an optional service revoke the meaningful result after it was honestly delivered.

Put the promise in state

Store the compact error on the failed job and each attempt in job_attempts. Retryability is derived from failed status; it is not a second persisted truth. The entry remains queryable and its adornment slot reports failed instead of pretending empty means never requested.

The quiet failure

A cheerful spinner that runs forever is less honest than a visible failure. Automatic retry without a cap can burn resources and keep state ambiguous. Recovery must be explicit enough for both the writer and the worker.

Invariant. An adornment may fail without downgrading the existence of the original.

Trace five moments

To test “Failure Keeps the Entry,” 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

Design the UI state for an original with one succeeded, one failed, and one pending adornment. 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

A failed durable job exposes its error, its attempt history, and a retry action derived from failed status. The original entry remains live, and on-demand voice failure never invents an audio job or artifact row.

Failure belongs to the optional work that failed, not to the passage that already exists.

Code

Project honest entry state·python
def project_entry(entry, jobs, attempts_by_job):
    projected_jobs = []
    for job in jobs:
        projected_jobs.append({
            "kind": job["kind"],
            "lang": job["lang"],
            "status": job["status"],
            "error": job["error"] if job["status"] == "failed" else None,
            "retryable": job["status"] == "failed",
            "attempts": attempts_by_job.get(job["id"], []),
        })
    return {
        "id": entry["id"],
        "original_text": entry["original_text"],
        "jobs": projected_jobs,
    }

External links

Exercise

Design the UI state for an original with one succeeded, one failed, and one pending adornment.
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.