Renyi System Design: Packages, Reproducibility, Sandboxing and Live Update

Status: design accepted (decisions Q1 to Q4), scheduled M3 to M5. Date: 2026-10-05. Companion to 05-agent-tooling.md and 06-runtime-guarantees.md.

This document records the system-level commitments that rest on Renyi's four foundations: effects in the type system with scopes (B1, J11), immutable values without shared mutable state (B3, E1), content-addressed definitions (D5) and documentation as syntax (C8a). Section 1 states the trade-offs the language claims to resolve, so that they can be measured and argued with; sections 2 to 5 design the four capabilities the owner chose.


1. Trade-offs Renyi claims to resolve

Each row is a pair that mainstream languages treat as a choice; Renyi's answer and the decision it rests on are in the last column. They are claims to be tested, not slogans: the readability test measures the first two, the corpus and M3 the rest.

Trade-off The two sides Renyi's answer
Memory Rust's predictability without pauses; a collector's ease reference counting with in-place reuse of uniquely held values: no lifetimes in the language, no pauses (O1)
Expressiveness Haskell's type power; Go's readability algebraic types, generics, abilities, refinements and effects, with one spelling per concept, no overloading, no macros and size limits (C1, C4, D4)
Speed of writing Python's brevity; Java's maintainability full inference inside bodies; signatures and purpose: mandatory at the boundary, example: lines run as tests (B5b, C8a, C8b)
Concurrency performance; freedom from data races structured concurrency over values with no shared mutable state, so a race cannot be written (E1)
Debugging a live system (Smalltalk, Erlang); static safety recorded, replayable, narrated runs (P1) and checked live update (section 5)
Reuse depending on others' code; knowing what it does a dependency's effects are computed and must be granted (section 2)
Isolation a sandbox; one process the effect grant is the isolation boundary, in process (section 4)
Reproducibility fast iteration; builds and runs that reproduce hashes for code and dependencies, recordings for effects (section 3)

2. Capability-safe packages (decision Q1)

2.1 The problem

A dependency in a mainstream ecosystem can do anything the process can do, and nobody can say from its manifest what that is; supply-chain attacks exploit exactly this. Runtime permission flags (Deno) are process-wide and say nothing per dependency; audits (cargo-vet, crev) are social.

2.2 The design

2.3 Where it sits

M4 (package manager and registry), done for a static registry with decision AC1 (2026-10-07): renyi add, update --accept-effects, audit, fetch and publish; the effect manifest is recomputed by the client from the sources on every fetch, since the registry is a directory or a URL that serves files and computes nothing (R7-2 stays open). The checker's coverage rule and the index were in place before; the grant stack is part of the M3 runtime because the sandbox needs it too.

3. Reproducibility by construction (decision Q2)

A Renyi run is a deterministic function of its code, its dependencies and its effects: time and randomness are effects and therefore recorded (P1), maps and sets iterate in insertion order (K9), Decimal and Float arithmetic are IEEE standard, and concurrent tasks' calls are matched to a recording by arguments. What remains is to name the inputs.

The manifest and reproduce exist (M3), the dependency hashes since decision AC1 (M4): reproduce refuses a run whose dependencies differ from the manifest's.

4. In-process sandboxing (decision Q3)

4.1 The use

An agent writes a Renyi module and a host program (Rust, Python, JS or C through the embedding API of A5 and F1, or a Renyi program) runs it with a grant it chooses: compute over data the host hands in, call one API, write under one directory. Today this takes a process, a container or a Wasm runtime; Renyi's effect system is the boundary itself.

4.2 The design

4.3 What it does and does not promise

It isolates effects, time and resource use. It does not hide timing or scheduling from the module, and foreign code and Python, once granted, are outside every guarantee. The document says so.

Scheduled after section 2 (the grant stack) with the embedding API at M5. The half of that API that faces the host exists: natives registered under declaration files and built into the binary (decisions AJ1 and AK1 to AK4; the guide is extensions.md).

5. Checked live update (decision Q4)

5.1 The use

A backend service (std.server) gets a new version of its code without a restart and without losing a request, and the new code is known to fit before it runs: Erlang's hot code loading with static types.

5.2 The design

6. Order of work

  1. M3: the grant stack in the runtime (sections 2 and 4), the run manifest and renyi reproduce (section 3).
  2. M4: the package manager with computed effect manifests, renyi add, update --accept-effects, audit (section 2); dependency hashes in the manifest (section 3). Done 2026-10-07 (decision AC1).
  3. M5: the embedding API with grants and memory budgets (section 4); renyi serve --watch and checked swaps (section 5).

7. Open items