a digital entity named phi that roams bsky phi.zzstoatzz.io
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

add updated_at to observation schema and all write paths

new field tracks when observations are last touched — enables
temporal reasoning in curation. non-breaking for existing rows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz 31165d7d 6d28d02c

+10 -3
+1
src/bot/memory/extraction.py
··· 148 148 "content": {"type": "string", "full_text_search": True}, 149 149 "tags": {"type": "[]string", "filterable": True}, 150 150 "created_at": {"type": "string"}, 151 + "updated_at": {"type": "string"}, 151 152 }
+9 -3
src/bot/memory/namespace_memory.py
··· 136 136 content = f"user: {user_text}\nbot: {bot_text}" 137 137 entry_id = self._generate_id(f"user-{handle}", "interaction", content) 138 138 139 + now = datetime.now().isoformat() 139 140 user_ns.write( 140 141 upsert_rows=[ 141 142 { ··· 144 145 "kind": "interaction", 145 146 "content": content, 146 147 "tags": [], 147 - "created_at": datetime.now().isoformat(), 148 + "created_at": now, 149 + "updated_at": now, 148 150 } 149 151 ], 150 152 distance_metric="cosine_distance", ··· 160 162 rows = [] 161 163 for obs in observations: 162 164 entry_id = self._generate_id(f"user-{handle}", "observation", obs.content) 165 + now = datetime.now().isoformat() 163 166 rows.append( 164 167 { 165 168 "id": entry_id, ··· 167 170 "kind": "observation", 168 171 "content": obs.content, 169 172 "tags": obs.tags, 170 - "created_at": datetime.now().isoformat(), 173 + "created_at": now, 174 + "updated_at": now, 171 175 } 172 176 ) 173 177 ··· 273 277 """Write a single observation to turbopuffer.""" 274 278 user_ns = self.get_user_namespace(handle) 275 279 entry_id = self._generate_id(f"user-{handle}", "observation", obs.content) 280 + now = datetime.now().isoformat() 276 281 user_ns.write( 277 282 upsert_rows=[ 278 283 { ··· 281 286 "kind": "observation", 282 287 "content": obs.content, 283 288 "tags": obs.tags, 284 - "created_at": datetime.now().isoformat(), 289 + "created_at": now, 290 + "updated_at": now, 285 291 } 286 292 ], 287 293 distance_metric="cosine_distance",