freecoding.school100% FREE · NO SIGNUP
The Seven LayersISSUE #41 of 73

R4 · memory holds signals, not state

OMNIVSThe Silent Failure
OMNI saysR4 — memory holds signals, not state. Record what happened, not current variables.

R4 governs the memory layer: it stores signals (events, observations, artifacts — "what happened") rather than live mutable state ("what is now"). Signals are durable, append-leaning records that DISTILL into kernels; state is transient and belongs in the working layers. Putting a mutable counter in memory violates R4 — memory should hold the signal that the counter crossed a threshold, not the counter.

Power-ups you unlock

The Silent Failure attacks — common mistakes

Boss battleConvert a stateful memory write into a signal write.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#b388ff;font-family:monospace;padding:20px"><pre>violates R4: memory.counter = 5  (state)
fix: REMEMBER signal "threshold_crossed at t=…"</pre></body></html>
▶ Open the interactive comic issue
‹ R3 · Packets, Never GlobalsR5 · Kernels Boot, Never Edit ›