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

Resume Without Rewriting

~11 min · resume, recovery, versioning, continuity

Level 0Cold Iron
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Resume Without Rewriting

Two different continuations need different records. After a service crash, the same run resumes from durable Anvil state: persisted rows, store trees, and the append-only trail determine the current phase and completed work. Recovery never asks a session to recreate an already archived submission or replays a finished external effect merely from memory.

A live harness window may be gone after restart. Dad can mobilize a replacement or withdraw the open seat according to the current protocol. That operational repair appends new facts to the same run; it does not alter earlier submissions, ballots, or the frozen base.

Finalized Anvil board crowning Entry A above controls to export deliverables, start a rematch, or resume the result as Relay, Restoration, Red Team, Workshop, Synthesis, Debate, Elimination, Arena, Party, or Apprentice.
The standing result stays intact; every rematch or cross-mode continuation starts through an explicit successor action.

Cross-mode continuation is not same-run recovery. Continuing an Arena result into Red Team, Restoration, or another mode creates a new run whose resumed_from points to the finalized source run. The source artifact becomes declared input, while both runs retain their own premises and trails.

If the brief, mode, or base changes, make that boundary explicit in the new run. A linked pipeline preserves lineage precisely because it refuses to pretend that later conditions existed in the earlier contest.

Recover a crash in place; continue a workpiece in a linked run. Both preserve history, but they are not the same operation.

Code

Two continuations — neither edits the past·python
def continue_run(prior, reason):
    """Operational interruption stays INSIDE the run; a new premise gets a NEW one."""
    OPERATIONAL = {"service_restart", "window_vanished"}
    NEW_PREMISE = {"new_mode", "changed_base", "changed_brief"}

    if reason in OPERATIONAL:
        return {**prior, "events": prior["events"] + [f"resumed:{reason}"]}
    if reason in NEW_PREMISE:
        return {"id": prior["id"] + "-b", "state": "composing",
                "resumed_from": prior["id"],
                "input": prior["winner"], "events": []}
    raise ValueError(f"{reason}: decide which branch this is first")


prior = {"id": "run-1", "state": "finalized", "winner": "A",
         "events": ["submitted", "judged"]}

same = continue_run(prior, "service_restart")
assert same["id"] == prior["id"] and same["events"][:2] == prior["events"]

new = continue_run(prior, "new_mode")
assert new["resumed_from"] == "run-1" and new["events"] == []
print(same["events"], "|", new["id"], new["input"])

External links

Exercise

Classify four cases as same-run recovery or a resumed_from successor: service restart, vanished live window, new mode, and changed base.
Hint
Operational interruption stays in the run; changed contest premise starts another.

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.