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

Deterministic Phrases and Typed Refusals

~11 min · determinism, typed-refusal, commands, protocol

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

Deterministic Phrases and Typed Refusals

Short harness phrases are adapters into live state. join anvil queue #N, join anvil bench #N, join anvil examiners #N, join anvil synthesis #N, and anvil next round #N each begin by resolving the current queue and protocol.

A successful join returns the role, mask when the role has one, yard, phase, endpoints, and expected-versus-actual identity facts. A continuation rejoin uses its existing mask or matching spec and lands in that phase's round directory. The server receipt, not a narration, proves the binding.

Refusals use stable protocol codes. leg_not_open says a Relay leg is not the current hand; phase_role_mismatch rejects the wrong role; mask_not_open rejects a continuation outside its open phase; diagnosis_required keeps Restoration from finishing early; phase_unresolved, bench_phase_next, and no_phases guard Dad's advance action.

The phrase must re-resolve current state on every use. That is deterministic without promising blanket idempotency: after the board changes, the same words may lawfully select a later phase or return a conflict.

Resolve, act once, report the receipt or typed code. A terse phrase is safe because the live protocol owns its meaning.

Code

The shape of a real refusal response·json
{
  "detail": {
    "code": "bench_phase_next",
    "message": "the next phase (final bench) is a bench — mobilize the bench to open it",
    "next_phase": { "kind": "bench", "label": "final bench" }
  }
}

External links

Exercise

For a Relay entry, Defense continuation, Restoration done, and Synthesis seat, choose the correct phrase and show one real success receipt or typed refusal.
Hint
Use the current protocol's role, phase, and codes rather than a universal idempotency promise.

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.