From 7615dedf9e2b849df220978527e17c0bc3a28152 Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Sat, 2 May 2026 21:33:49 +0000 Subject: [PATCH] dream: NREM does not exclude prior traces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NREM in the reframe is replay-and-consolidation of recent encoded content. Excluding previously_retrieved sources turns NREM into novelty-finding, which is Late REM's job. NREM should re-traverse already-encoded content; that's what consolidation is. The May 2 abort surfaced this — 52 sources accumulated in the exclusion list, all of them in NREM's similarity band for the recurring research/fabrication/teaching query. The dreamer hit zero retrievable chunks not because the corpus was empty, but because everything semantically aligned was excluded. Late REM and Early REM keep the exclusion mechanism — novelty is their job. Session-scoped exclusion (nrem_high_sources flowing into Early REM) also preserved. The 500/400 trim on retrieved_sources is preserved for the remaining stages that still use it. --- scripts/dream.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/dream.py b/scripts/dream.py index ead2b36..f50bef5 100644 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -473,7 +473,9 @@ def dream_pipeline(): # ── Stage 1: NREM ────────────────────────────────────────────────────── print("\n[NREM] Retrieving...") - nrem_chunks = retrieve("nrem", excluded_sources=previously_retrieved | session_retrieved) + # NREM is replay-and-consolidation — does not exclude prior traces. + # Late REM and Early REM exclude prior content for novelty; NREM does not. + nrem_chunks = retrieve("nrem", excluded_sources=None) session_retrieved.update(c["source"] for c in nrem_chunks) # Track sources that scored above Early REM ceiling — these are the only ones Early REM should exclude nrem_high_sources = {c["source"] for c in nrem_chunks if c["similarity"] > 0.55}