fix(bigmind): apply 4 health-check fixes — BUG-1/2/3 + PERF-1

BUG-1: fix test_server_tools.py assert "ALWAYS" → "Always" (case mismatch)
BUG-2: export_memory() now includes hypotheses, upgrade_requests, token_saves,
        people tables; renamed bigmind_version → bigmind_schema_version (int)
BUG-3: auto_close.py replaced CURRENT_TIMESTAMP (SQLite) with Python
        datetime.now(timezone.utc).isoformat() for consistent UTC timestamps
PERF-1: context_builder.py caps get_facts() at _MAX_CONTEXT_FACTS=50 with
         overflow hint to prevent unbounded context growth

All 297 tests passing. Upgrade requests #6-9 resolved.
Health report: plans/BIGMIND_HEALTH_REPORT_2026-04-04.md
This commit is contained in:
pplate
2026-04-04 09:49:13 +02:00
parent 155d56e8e8
commit 42ffc85f0b
7 changed files with 265 additions and 11 deletions
+3 -2
View File
@@ -571,8 +571,9 @@ class TestExportMemory:
memory_store.export_memory(user["id"], out)
data = json.loads(Path(out).read_text())
for key in (
"export_date", "bigmind_version", "user", "identity_profile",
"facts", "sessions", "conversation_chunks", "stats",
"export_date", "bigmind_schema_version", "user", "identity_profile",
"facts", "sessions", "conversation_chunks", "hypotheses",
"upgrade_requests", "token_saves", "people", "stats",
):
assert key in data
+3 -2
View File
@@ -541,7 +541,7 @@ class TestMemoryGetInstructions:
def test_contains_mandatory_language(self, temp_db):
result = memory_get_instructions()
assert "ALWAYS" in result
assert "Always" in result
# ── memory_health_check ────────────────────────────────────────────────────────
@@ -674,7 +674,8 @@ class TestMemoryExport:
memory_export(output_path=out)
data = json.loads(Path(out).read_text())
assert "export_date" in data
assert data["bigmind_version"] == "1.0"
assert "bigmind_schema_version" in data
assert isinstance(data["bigmind_schema_version"], int)
# ── memory_deprecate_fact ──────────────────────────────────────────────────────