Skip to content

Stabilize knowledge memory and repeated harvest growth - #60

Merged
SignalLayerLabs merged 3 commits into
mainfrom
fix/shared-knowledge-index-memory
Oct 9, 2026
Merged

SignalLayerLabs merged 3 commits into
mainfrom
fix/shared-knowledge-index-memory

Conversation

@SignalLayerLabs

@SignalLayerLabs SignalLayerLabs commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Production cold recovery loaded 875,469 knowledge records, 50,255 memories and 12,023 objects, then repeatedly reset the Durable Object after exhausting memory. Repeated harvesting also created a new object and private entity/concept memberships for every action, growing the same directories indefinitely.

Share detached immutable index strings through a bounded pool and store exact personal concept/entity lookups as compact numeric positions. Compatible harvested material now accumulates in one personal stack from the same deposit. Existing objects, IDs, initial provenance and every harvest's causal receipt are preserved; transformed, reserved, heated or foreign matter is excluded. Depleted and fractional sources conserve matter.

Private membership, first-active duplicate selection, record order, packed-v2 recovery, chronology and animations retain their semantics. Hash collisions compare full keys. Existing CI gates and thresholds are unchanged.

Validation:

  • 474 tests, deterministic Genesis, manifest and Wrangler dry run pass.
  • Independent review plus 100,000 randomized lookup operations against Map pass.
  • A thousand repeated harvests introduce one object/entity with all thousand receipts and exact mass.
  • Controlled native workerd fixture includes the actual record counts and added inert-object overhead. Old reader exhausts 96 MiB old space; final fix recovers, advances thirty chronological minutes and saves under 80 MiB old space/4 MiB semi space. All 108 IDs preserved, 2 Citizens moved, 100 bodies and 75 actions changed; sampled heap plus backing peaked at 114.35 MiB. Separate cold recovery preserves the saved minute and sampled original private sources.

Local memory caps are not Cloudflare's exact enforcement. The unchanged production quiet gates and separate ten-minute proof remain required after deployment. Account quotas remain finite and shared; no plan upgrade or unlimited-capacity claim.

@SignalLayerLabs SignalLayerLabs changed the title Prevent memory resets in mature-world knowledge lookups Stabilize knowledge memory and repeated harvest growth Oct 9, 2026
@SignalLayerLabs
SignalLayerLabs merged commit bfdad48 into main Oct 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant