fix: restore live timestamp to HotMemory.read() output
Some checks failed
Tests / lint (pull_request) Failing after 32s
Tests / test (pull_request) Has been skipped

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:
Alexander Whitestone
2026-03-23 22:54:47 -04:00
parent 3349948f7f
commit 80c79c18d2

View File

@@ -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")