System architecture

Storage bounds and worker admission

judgment_core owns no persistent tables: the stateless checker reads termbank.dag rows through immutable views. Memory and work are bounded separately at three boundaries:

  1. Checker scratch (judgment_core). check_proof, check_chunk, and check_dag_chunk are pure functions of an immutable CheckView (or DagCheckView) and a caller-supplied Scratch. Temporary allocations are bounded explicitly by ScratchLimits, and work is charged against the chunk's Budget (chunk_allowance, KC1.10). Workers hold no persistent kernel tables and share the committed rows read-only.
  2. Trusted proof-DAG storage (termbank.dag). Persistent tables live in DagBank, speculative writes live in workspaces (termbank.dag.Workspace, which truncate without changing committed rows), and sealed segments and cold index runs spill to verified blocks read back through a bounded frame cache (DAG storage). DagBank capacities and Budget charges are checked before allocation (G3, G4).
  3. Authoring sessions (judgment_shell). Session bounds per-session work through its explicit work allowance (work_remaining, spend, add_work), and Session.fork(work) creates a session over a child workspace of the parent's, with an explicit child work allowance (fork_cost reports the charge for copying the session). A workspace may open any number of children: transactions and forks are bounded by the work allowance and the bank's capacities, not by a count of children.

What these bounds do and do not cover

Explicit Budget charges, ScratchLimits, and DagBank table capacities enforce deterministic work and bounded data structures (G3, G4). They do not measure or enforce an operating-system RSS ceiling, allocator fragmentation, native thread stacks, or caller-retained outputs outside the bank and scratch pool. Hosts scheduling parallel chunk workers or session forks must size concurrency and scratch pools against their own process memory limits.

judgment v1.0.0 for Mojo 1.2 · Apache License 2.0 with LLVM Exceptions · Source on GitHub