Create the default profile shell used before cold start completes.
(user_id: str)
| 369 | |
| 370 | |
| 371 | def build_empty_profile(user_id: str) -> Dict[str, Any]: |
| 372 | """Create the default profile shell used before cold start completes.""" |
| 373 | now = datetime.now().isoformat() |
| 374 | return { |
| 375 | "user_id": user_id, |
| 376 | "version": "0.1", |
| 377 | "created_at": now, |
| 378 | "updated_at": now, |
| 379 | "core_directions": {}, |
| 380 | "methodology_preferences": {}, |
| 381 | "must_read": { |
| 382 | "authors": [], |
| 383 | "institutions": [], |
| 384 | "keywords": [], |
| 385 | }, |
| 386 | "topic_weights": {}, |
| 387 | "author_heat": {}, |
| 388 | "institution_heat": {}, |
| 389 | "interest_vector": [], |
| 390 | "taste_profile": {}, |
| 391 | "report_preferences": { |
| 392 | "positive_feedback_count": 0, |
| 393 | "negative_feedback_count": 0, |
| 394 | "preferred_evidence_top_k": 3, |
| 395 | }, |
| 396 | "reading_history": [], |
| 397 | "behavior_logs": [], |
| 398 | "drift_state": build_default_drift_state(now), |
| 399 | } |
| 400 | |
| 401 | |
| 402 | def normalize_topic_token(value: str) -> str: |
no test coverage detected