connects_to is a write-only table - drop it, or finish the graph? (and a coupled schema/parser fix) #15
Replies: 2 comments
|
Update from the Uruboros side - we made the call and shipped it. We went with option A (tidy the document model). On our fork:
PR: #25. Backward compatible, tests green. One thing we found and deliberately left alone: So: visibility, not a request. Adopt the PR, change it, or pass - entirely your call. Option B (synapse as TYPE RELATION, real ->synapse-> traversal) we are leaving as a possible future direction; happy to help build it if you ever want to go there. While in the codebase we also opened a batch of small, independent bugfix PRs (#16 to #24, plus #26 and #27): SDK pin, the neuron_state activation bug, tolerant type parsing, the literal {{}} defaults, the Direction enum, id doubling, the orphan-prune pinned guard, plus get_synapses(limit) and a Gemini base_url override. Each stands alone; review at your leisure. |
|
Hi Robert — first, this genuinely made my week. Hearing that surreal-memory holds up as the production memory engine for a live multi-agent swarm, and that your neural-memory fork shrank to almost nothing on top of 2.3.2, is exactly the validation I hoped the design could earn. Thank you for running it for real and for the unusually careful write-up. Decision: let's go with A. Merge-ready as far as I'm concerned — #25 is the right call: drop the write-only B (synapse as a real On the The standalone bugfix batch (#16–#24, #26, #27) is exactly the right shape — independent, backward-compatible, one concern each. I'm working through them now; #16 in particular is a real one (the whole activation→decay→tiering loop was dormant). Thanks again, Robert. |
Uh oh!
There was an error while loading. Please reload this page.
Hi Toni! 👋
Big news first: we're adopting surreal-memory as the production memory engine of Uruboros - our multi-agent swarm orchestration system. The design you landed on - graph + vector neural memory on SurrealDB - is genuinely what made the call easy: it's the right substrate for shared memory across a swarm, and we'd much rather build on what you've built than reinvent it. The migration only confirmed the instinct - our old neural-memory fork shrank to almost nothing on top of
2.3.2, which says a lot about the shape of your codebase. In our deployment the engine now backs a live multi-agent setup on a shared SurrealDB, semantic recall went from 0/10 → 10/10 on our regression set after the migration, and batch re-embedding runs clean (21/21). So this comes from running it for real, not just reading it.While migrating we did a close review of
mainand hit one thing that's genuinely your call to make - plus a couple of related inconsistencies in the synapse area that turn out to be coupled to it. We'd love your steer, and we're happy to do the work either way.TL;DR
connects_toedge table is written and deleted, but never read - everyadd_synapsepays an extra DB round-trip for a table no query traverses.synapseindexes are onout/in, but the write path fillssource_id/target_id- so synapse lookups are unindexed full scans.synapseisSCHEMAFULLbut doesn't declaresource_id/target_id(the fields it writes). It only works because a parser bug means theSCHEMAFULLdefinition never runs - two bugs cancelling each other out. Fixing either in isolation breaks synapse persistence.1.
connects_tois write-only -RELATE neuron:$src -> connects_to -> neuron:$tgt(store.py:655), cleaned up on delete (store.py:569), schema comment "for graph traversal" (schema.py:71-73). But no->connects_to->traversal anywhere insrc/- grep returns zero.2. Synapse reads unindexed - reads go
WHERE source_id/target_id(store.py:690-693), but indexes are on(brain_id, out)/(brain_id, in)(schema.py:68-69) - fields onlyconnects_topopulates. Full scans, per-neuron on hot paths.3. Two bugs cancelling out -
synapseisSCHEMAFULL(schema.py:57) butsource_id/target_id(store.py:642-643) aren't declared → should be stripped, makingDELETE synapse WHERE source_id…(store.py:563) match nothing. It works only because theensure_schemaparser never runs theSCHEMAFULLstatement (splits on;, drops comment-prefixed fragments) → table is effectivelySCHEMALESS. Naively fixing the parser would activate the stripping. Hence: one coupled change, not two.The decision - A or B?
connects_to(4 sites), declaresource_id/target_id, fix the two indexes. One fewer write + indexed lookups. We can send this PR.synapseasTYPE RELATION, traversed->synapse->. Bigger change. We'd gladly help spec and build it.Our bias (Uruboros pushes the graph to swarm scale): A now, B as a follow-up. But it's your engine - which way?
Heads-up: a batch of small, independent, backward-compatible bugfix PRs is also coming (SDK pin, tolerant neuron-type parsing,
embed_batchN→1 under google-genai ≥2.0, nine literal{{}}DEFAULTs,direction='forward'outside enum, +get_synapses(limit)/GeminiEmbedding base_url). We'll open them individually so they're easy to review. 🙂Thanks for building this, Toni - it's a pleasure to run. Let us know on A vs B and we'll start sending patches.
All reactions