From 3ed0f20fa1e53d1a5b5b0727c079f4f71ba9bae7 Mon Sep 17 00:00:00 2001 From: m3taversal Date: Mon, 23 Mar 2026 17:31:54 +0000 Subject: [PATCH] fix: index parent_entity as alias for decision records (Ganymede review) MetaDAO queries now surface MetaDAO's decision records because parent_entity: "[[metadao]]" is stripped and added to the alias set. Pentagon-Agent: Epimetheus <3D35839A-7722-4740-B93D-51157F7D5E70> --- telegram/kb_retrieval.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/telegram/kb_retrieval.py b/telegram/kb_retrieval.py index 737e1c6..9b0284b 100644 --- a/telegram/kb_retrieval.py +++ b/telegram/kb_retrieval.py @@ -145,6 +145,11 @@ class KBIndex: # Add proposer name as alias for decision records if proposer: aliases.add(proposer.lower()) + # Add parent_entity as alias (Ganymede: MetaDAO queries should surface its decisions) + parent = fm.get("parent_entity", "") + if parent: + parent_slug = parent.strip("[]").lower() + aliases.add(parent_slug) # Mine body for ticker mentions ($XXXX and standalone ALL-CAPS tokens) dollar_tickers = re.findall(r"\$([A-Z]{2,10})", body[:2000])