fix: restore live timestamp to HotMemory.read() output
The DB-backed HotMemory.read() dropped the "> Last updated:" header that the old file-based template included. This meant callers saw no indication of when hot memory was last computed, and the stale-file problem (#10) had no equivalent fix in the new code path. Add the current UTC timestamp to the computed output so the timestamp is always fresh — never stale from a persisted file. Fixes #1339 Refs #10 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -89,7 +89,12 @@ class HotMemory:
|
||||
"""Read hot memory — computed view of top facts + last reflection from DB."""
|
||||
try:
|
||||
facts = recall_personal_facts()
|
||||
lines = ["# Timmy Hot Memory\n"]
|
||||
now = datetime.now(UTC).strftime("%Y-%m-%d %H:%M UTC")
|
||||
lines = [
|
||||
"# Timmy Hot Memory\n",
|
||||
f"> Working RAM — always loaded, ~300 lines max, pruned monthly",
|
||||
f"> Last updated: {now}\n",
|
||||
]
|
||||
|
||||
if facts:
|
||||
lines.append("## Known Facts\n")
|
||||
|
||||
Reference in New Issue
Block a user