fix: telemetry heartbeat insert needs an explicit uuid id (NOT NULL, no default)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
momentum devandClaude Fable 5 committed 2026-07-22 19:36:19 -05:00
1 parent 625abee66f
commit de1973fbff
1 file changed
+4 -3
+4 -3
View File
@@ -46,10 +46,11 @@ def _write_heartbeat(outcome: str) -> None:
# The DB row is queryable remotely and survives container churn.
try:
con = open_research_db("market")
import uuid
con.execute(
"INSERT INTO telemetry_events (event_type, source, reason, metadata_json) "
"VALUES (?, ?, ?, ?)",
["tuner_heartbeat", "nightly_tune", outcome,
"INSERT INTO telemetry_events (id, event_type, source, reason, metadata_json) "
"VALUES (?, ?, ?, ?, ?)",
[str(uuid.uuid4()), "tuner_heartbeat", "nightly_tune", outcome,
json.dumps({"ran_at": datetime.now(timezone.utc).isoformat()})])
except Exception: # noqa: BLE001
pass