ShtukbaseStandard
package file→ .shtukbase/packages/code-pragmatic/judges/crash-early.md

judges/crash-early.md

15 lines, 750 B.

  1. # Judge: the program checks its preconditions and crashes early
  2. Norm PRG-R05. Code checks at the entry whatever it cannot work without, and on a violation stops with a clear message instead of going on with bad data.
  3. **Who judges.** The reviewer of the change.
  4. **When.** On a change where code takes external data: files, network replies, user input, parameters of public interface functions.
  5. **What the judge looks at.**
  6. 1. Preconditions are checked at the entry; an impossible state is not silently "fixed" with a default value.
  7. 2. The failure message says what is wrong and where.
  8. 3. The check does not duplicate what the type already guarantees.
  9. **Result.** "holds" or "violated: which precondition is not checked, where to add the check".