Skip to main content

Module webizen

Module webizen 

Source
Expand description

Webizen VM — the Rights-Ontology governance gate over LLM/graph operations.

Library-ized from the former webizen.rs (pure code motion, no behaviour change):

  • arena — the 42MB zero-allocation SLG tabling arena + N3 rule firing.
  • opcode — the SlgOpcode WAM instruction set.
  • vm — VmFrame, the VM helpers, and execute_vm_frame.
  • agreement — agreement DIDs + the personhood-category-error guard.

The full public surface is re-exported here, so every external path (crate::governance::webizen::<Item>) resolves exactly as before.

Re-exports§

pub use agreement::*;

Modules§

agreement

Structs§

ArenaAdmit
Lease/scope wrapper over caller-owned arena backing.
SlgArena
VmFrame
The Execution Frame tracking variable bindings without touching the heap

Enums§

ArenaBudgetClass
Budget class for a caller-owned backing size.
CollisionPolicy
Occupied hash-slot collision policy. Absence is never “complete facts”.
ParityKind
Stored Quin parity classification. Never dual-accept without classifying.
SlgOpcode
The Opcodes for the Lightweight Warren Abstract Machine (WAM) variant. f64 parameters require PartialEq only — Eq is not derived.

Constants§

MAX_RULE_STAGING
Maximum staged + live rules in one admit record.
ORDINARY_CELL_BYTES
Ordinary cell budget ceiling. 42 MiB is the Sentinel pass, not the cell.
QUIN_ABI_BYTES
NQuin ABI width. Must stay 48 bytes.
RECENT_RING_IS_DURABLE
Recent-slot ring (512 entries in the arena) is lossy. Never durable.
SENTINEL_PASS_BYTES
Sentinel pass working-set: exact 42 MiB slot backing (not the cell budget).
SENTINEL_SLOTS
Slots in exact 42 MiB backing: SENTINEL_PASS_BYTES / QUIN_ABI_BYTES.

Functions§

admit
Acquire an exclusive RT-01 lease for backing_bytes and bind scope + generations.
classify_budget
Classify a caller backing size. Exact 42 MiB is the Sentinel pass; (42 MiB, 512 MiB] is an ordinary cell. Smaller than 42 MiB is not a documented scratch class here. Over 512 MiB is over the cell budget. Both fail closed as QdnfError::Capacity.
classify_parity
Classify stored parity. Canonical five-field wins when both XOR folds match (e.g. metadata == 0). Garbage is QdnfError::Malformed. Never dual-accept.
collision_on_occupied_hash_slot
Occupied hash-slot collision: always recompute. A miss is not completeness.
empty_entry_is_not_allow
Empty / unoccupied table entries fail closed. They are not an allow.
execute_vm_frame
The Bytecode Evaluator for the Prolog Webizen
recent_ring_may_certify_obligation
The recent-slot ring is lossy. It must not certify obligation.