-
Notifications
You must be signed in to change notification settings - Fork 0
Deterministic Execution
A gate verdict is reproducible: the same request, evaluated against the same policy, state, and config, always produces the same decision. Determinism is not a nicety here — it is the property that makes audits replayable, retries safe, and conflict resolution stable.
A verdict is a pure function of pinned inputs:
verdict = f(request, policy_snapshot, state_snapshot, config)
"Pure" means no hidden inputs: the decision depends on nothing that is not recorded. Given the four inputs, the verdict is fixed. This buys four concrete things:
- Debugging — replay a failure against its exact inputs and reproduce it.
- Security — an attacker cannot rely on random drift between gates to slip a request through.
- Testing — CI and load tests produce stable outcomes, not flaky ones.
- Compliance — every historical decision stays explainable after the fact.
Precision: determinism is over (request + policy + state + config), not the request alone. The same request against a changed policy or changed resource state can legitimately flip ALLOW → DENY — that is correct behavior, not nondeterminism. The gate records which snapshots it used so the flip is explainable.
Each argument to f is pinned and identified, so a verdict can be reconstructed exactly.
| Input | What it is | Pinned as |
|---|---|---|
| request | The action, its parameters, subject and resource identifiers | Deterministic request ID |
| policy_snapshot | The versioned policy bundle in force at evaluation | Policy version (e.g. pol_20260706_01) |
| state_snapshot | Resource state and attributes read for the decision | State snapshot ID |
| config | Gate configuration (timeouts, budgets, rules wiring) | Config version (e.g. gatecfg_v14) |
| clock | Elapsed-time inputs for timeouts | Logical/monotonic counter, not wall-clock |
Design references. Deterministic rules over LLM judgment — Assury. Idempotent replay as a runtime primitive — Orloj. Signed, reproducible records — Kaman. Naming doctrine: Prose Edda / Poetic Edda, per Norse Cosmology & Platform Design.
A gate verdict is reproducible: the same request, evaluated against the same policy, state, and config, always produces the same decision. Determinism is not a nicety here — it is the property that makes audits replayable, retries safe, and conflict resolution stable.
A verdict is a pure function of pinned inputs:
verdict = f(request, policy_snapshot, state_snapshot, config)
"Pure" means no hidden inputs: the decision depends on nothing that is not recorded. Given the four inputs, the verdict is fixed. This buys four concrete things:
- Debugging — replay a failure against its exact inputs and reproduce it.
- Security — an attacker cannot rely on random drift between gates to slip a request through.
- Testing — CI and load tests produce stable outcomes, not flaky ones.
- Compliance — every historical decision stays explainable after the fact.
Precision: determinism is over (request + policy + state + config), not the request alone. The same request against a changed policy or changed resource state can legitimately flip ALLOW → DENY — that is correct behavior, not nondeterminism. The gate records which snapshots it used so the flip is explainable.
Each argument to f is pinned and identified, so a verdict can be reconstructed exactly.
| Input | What it is | Pinned as |
|---|---|---|
| request | The action, its parameters, subject and resource identifiers | Deterministic request ID |
| policy_snapshot | The versioned policy bundle in force at evaluation | Policy version (e.g. pol_20260706_01) |
| state_snapshot | Resource state and attributes read for the decision | State snapshot ID |
| config | Gate configuration (timeouts, budgets, rules wiring) | Config version (e.g. gatecfg_v14) |
| clock | Elapsed-time inputs for timeouts | Logical/monotonic counter, not wall-clock |
{
"requestId": "req_7f3a2b",
"decision": "allow",
"gates": ["ingress", "policy", "approval", "sandbox", "arbitration"],
"inputs": {
"policy": "pol_20260706_01",
"state": "st_88f2",
"config": "gatecfg_v14",
"clock": "logical:118843"
},
"timestamp": "2026-07-06T10:32:00Z"
}The timestamp is recorded but never an input to the decision — see the next section.
Determinism is enforced by removing every common source of drift from gate logic:
| Source of nondeterminism | How NornGate removes it |
|---|---|
| Wall-clock time | Timeouts use a monotonic/logical clock; wall-clock timestamps are recorded, never used to decide. |
| Randomness | No randomness in gate logic. Any required randomness is explicitly seeded and the seed is recorded. |
| Ordering | Deterministic request IDs, stable sorts, canonical serialization — no reliance on map iteration order. |
| Live external calls | Decision inputs are snapshotted, not fetched live mid-evaluation; the same snapshot yields the same result on replay. |
| Concurrency races | Contention is resolved at G4 by lease + deterministic tie-break, not by whoever happens to arrive first. |
| Model reasoning | The LLM is never in the decision path (see Scope). Gate verdicts are rules, not model output. |
The rule is simple to state and strict to hold: a verdict never depends on an unrecorded input.
Determinism of decisions is paired with determinism of effects. Every consequential action carries an idempotency key; a repeated request with the same key does not re-execute — it returns the already-committed outcome.
{
"idempotencyKey": "idem_abc123",
"firstSeen": "2026-07-07T10:30:02Z",
"committedOutcome": "out_9a2",
"onRetry": "return-cached-outcome"
}Why: networks retry. Without idempotency, a retry after a dropped response would double-charge, double-send, or double-write. With it, the side effect commits exactly once at G4 regardless of how many times the request is delivered. Reference: Orloj treats idempotent replay as a core-runtime primitive.
Because inputs are pinned and recorded to [Urd](Urd-Ledger), any historical decision can be re-derived: load the recorded snapshots, re-run the gates, and confirm the verdict matches.
$ norngate-cli audit replay req_7f3a2b
[INFO] loading snapshots policy=pol_20260706_01 state=st_88f2 config=gatecfg_v14
[INFO] re-evaluating G0 - G4 against pinned inputs
[INFO] decision=allow (matches recorded verdict — deterministic)
This is what makes the ledger more than a log: it is a reproducible record. Incident review, denial analysis, and state reconstruction after a failure all rely on replay producing the original result. A mismatch on replay is itself a signal — it means an input was not captured, which is a bug to fix, not a decision to trust.
NornGate makes control decisions deterministic. It does not make the agent's reasoning deterministic — an LLM's output is probabilistic, and NornGate does not claim otherwise. The point is precisely that the gates are deterministic regardless of the nondeterministic thing they govern:
- The agent may propose a different action each run — the gate that judges it returns the same verdict for the same proposed action, policy, and state.
- This separation is the security argument: a nondeterministic agent cannot produce a nondeterministic enforcement result, so it cannot find a lucky path through the gates.
In short: determinism lives at the boundary, not inside the model.
- [The Five Gates](The-Five-Gates) — where verdicts are produced.
- [Urd Ledger](Urd-Ledger) — the reproducible record and verifiable receipts.
- [Security & Fail-closed](Security-and-Fail-Closed) — why rules, not models, decide.
- [Gates & Attributes](Gates-and-Attributes) — the attribute inputs to policy.
Section glyphs are Elder Futhark runes (Unicode Runic block, U+16A0–U+16FF) — semantic, not emoji. Full set on [Home](Home#iconography):
| Rune | Name | Gloss | Marks |
|---|---|---|---|
| ᚾ | Nauðiz | need, constraint | the platform mark |
| ᛁ | Isa | ice, the fixed and immovable | what determinism means |
| ᛜ | Ingwaz | the enclosed, complete set | the inputs |
| ᛉ | Algiz | warding off | eliminating nondeterminism |
| ᚷ | Gebo | balanced exchange, one for one | idempotency / exactly-once |
| ᛒ | Berkanan | growth, bringing forth again | replay and reconstruction |
| ᚺ | Hagalaz | the uncontrolled, acknowledged | scope — what stays nondeterministic |
| ᚱ | Raidō | the ride, the road | next steps |
Design references. Deterministic rules over LLM judgment — Assury. Idempotent replay as a runtime primitive — Orloj. Signed, reproducible records — Kaman. Naming doctrine: Prose Edda / Poetic Edda, per [Norse Cosmology & Platform Design](Norse-Cosmology-and-Platform-Design).
Welcome
Getting Started
Core Concepts
Guides
- Guides
- Configuring Gates
- Setting Up Subdomains (Realms)
- Integrating AI Agents
- Monitoring & Observability
- Disaster Recovery (Ragnarök Drill)
- Custom Domains & TLS
Reference
Silence means no.