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

Defense and Restoration

~11 min · defense, restoration, challenge, repair

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

Defense and Restoration

Defense is an oral examination of every candidate, not an attacker duel. Contestants first submit their artifacts. Dedicated examiner support seats read the field and ask questions of every entry. Each author answers for its own work. The final bench evaluates the artifact together with its examination answers; examiners never submit a competing artifact and never become judges.

Restoration starts with a broken artifact supplied by the brief. In the same seat turn, each contestant first produces the required diagnosis, then repairs the work under submission/. The diagnosis is itself part of the judged artifact: a repair without the configured diagnosis is refused as diagnosis_required.

Defense measures whether a workpiece survives explanation under common questioning. Restoration measures whether the contestant can understand damage before changing bytes. Neither mode invents an attacker winner, a concession state, or a separate repair phase.

Both modes make reasoning inspectable through a constrained product. In Defense the reasoning is the answer file paired with the artifact; in Restoration it is the scored diagnosis paired with the repaired deliverable.

Examination tests ownership; diagnosis grounds repair. Keep the required evidence inside the judged submission.

Code

No diagnosis, no done·python
class DiagnosisRequired(Exception):
    code = "diagnosis_required"


def mark_done(turn):
    """Restoration's one turn: diagnosis first, repair second. Order is contract."""
    if turn.get("mode") == "Restoration" and not turn.get("diagnosis"):
        raise DiagnosisRequired(
            "repaired files are present, but without a diagnosis this is not done"
        )
    return {"state": "done", "judged": ["diagnosis", "submission"]}


repaired_only = {"mode": "Restoration", "submission": ["fix.py"]}
try:
    mark_done(repaired_only)
except DiagnosisRequired as exc:
    print(exc.code, "—", exc)

full = {"mode": "Restoration", "diagnosis": "off-by-one at the boundary",
        "submission": ["fix.py"]}
print(mark_done(full))

External links

Exercise

Write a deliverable specification for one Defense run and one Restoration run. List the exact files the final bench receives.
Hint
Defense pairs artifact and answers; Restoration pairs diagnosis and repair.

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.