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

Finalization and Unseal

~11 min · finalization, unseal, immutability, permissions

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

Finalization and Unseal

In Anvil, finalization and reveal are one controlled boundary, not two independent switches. A run moves through composing, running, judging, and decided. Dad reviews the masked result and judge reasoning, then the verdict action finalizes the run and opens the identity mapping. An aborted run also seals its trail and reveals its cast.

This coupling protects the lifecycle. No caller can reveal a live sealed contest merely by opening provenance, and no finalized contest can remain in a misleading half-sealed state. The reveal serializer serves the mask-to-brain mapping only when the state is finalized or aborted.

Finalization freezes the contest record; it does not erase it. Artifacts, judgments, tie-breaks, and events stay append-only. A dissent note records Dad's disagreement without changing the judges' pick, and a rematch creates a fresh run instead of reopening the sealed one.

Open Runs use the same terminal boundary even though Dad already knows the field live. Their judges remain norm-masked until the verdict; finalization reveals only what the bench had not been served.

The verdict closes and reveals. Finalized and aborted are the only states that release the identity mapping.

Code

Terminal boundary — there is no separate unseal command·python
TERMINAL = {"finalized", "aborted"}


def reveal_mapping(run):
    """Looking never changes state. The state decides what is served."""
    if run["state"] not in TERMINAL:
        return {"masks": sorted(run["mapping"])}      # masks only
    return {"mapping": dict(run["mapping"])}          # now the mapping


def apply_verdict(run, agree, note=""):
    if run["state"] != "decided":
        raise ValueError(f"cannot rule from {run['state']}")
    run = {**run, "state": "finalized"}
    if not agree:
        run["dissent"] = note
    return run                                        # finalize AND reveal


live = {"state": "decided", "mapping": {"mask-A": "b1", "mask-B": "b2"}}
assert "mapping" not in reveal_mapping(live)          # not yet visible

done = apply_verdict(live, agree=False, note="B's reasoning is thin")
assert done["state"] == "finalized"
print(reveal_mapping(done))

External links

Exercise

Trace a sealed run from decided through Dad's verdict. Name what becomes immutable, what becomes visible, and what a rematch must create.
Hint
The verdict finalizes and reveals in one transition; rematch means a new run.

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.