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

Phases Do Not Advance Themselves

~11 min · manual-advance, dad-control, phase-gate, concurrency

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

Phases Do Not Advance Themselves

A seat finishing work proves only that its role is done. It does not open the next phase. The Open Run board exposes phase_resolved, advance_ready, judging_ready, and next_phase so Dad can see which hand is lawful without turning readiness into consent.

POST /advance moves a Relay to its next leg or opens the next non-bench phase of a multi-phase mode. If current phase seats remain open, it refuses with phase_unresolved. If the next phase is a bench, it refuses with bench_phase_next because Dad must mobilize the bench through the judging surface.

Single-phase modes such as Arena have no phase edge to advance: /advance returns no_phases. Once their field is resolved, judging_ready lights the separate bench action. Likewise, a final multi-phase production phase points to judging rather than an invented generic advance.

Every successful phase change is durably recorded before new role rows and yard materials become available. Concurrent completion timing can affect readiness, never authority.

Readiness selects a lawful hand; Dad still moves it. Non-bench advance and bench mobilization are separate actions.

Code

Real readiness, and typed refusals·python
class Refusal(Exception):
    def __init__(self, code, message):
        super().__init__(message)
        self.code = code


def advance(board):
    """Every refusal is named — there is no generic "failed" state."""
    if not board["phase_resolved"]:
        raise Refusal("phase_unresolved", "seats remain in the current phase")
    nxt = board["next_phase"]
    if nxt is None:
        raise Refusal("no_phases", "no phase edge here — judging is next")
    if nxt["kind"] == "bench":
        raise Refusal("bench_phase_next",
                      "the next phase is a bench — mobilize it from judging")
    return {"opened": nxt["label"]}


for board in (
    {"phase_resolved": False, "next_phase": {"kind": "answer"}},
    {"phase_resolved": True, "next_phase": None},
    {"phase_resolved": True, "next_phase": {"kind": "bench"}},
):
    try:
        advance(board)
    except Refusal as exc:
        print(f"409 {exc.code}: {exc}")

ok = advance({"phase_resolved": True,
              "next_phase": {"kind": "answer", "label": "answers"}})
print(ok)

External links

Exercise

For a Defense run, show readiness before all examiners finish, after they finish, and after Dad advances into the answer phase. Then show why a final bench uses judging_ready instead.
Hint
Use phase_resolved, advance_ready, judging_ready, and the real typed refusals.

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.