{
  "schema_version": 1,
  "date": "2026-09-21",
  "scope": "Original Django/DRF backend and disposable SQLite, with fictional fixtures and deterministic provider doubles. No HTTP server or deployed application was used.",
  "source": {
    "base_commit": "399c253edb36fda18df11ca869953feeea02bc57",
    "snapshot": "Inspected local files include uncommitted chat-view and schema changes. Base commit alone does not identify these bytes.",
    "files": [
      {
        "path": "backend/LifeLine/api/models/__init__.py",
        "sha256": "3567b503d306fdbed6e32c1fca703de36ad64619bbe12389d3297fa6a45ce1a4"
      },
      {
        "path": "backend/LifeLine/api/models/chat.py",
        "sha256": "3712c442ae218cf3dc00e0c413b5b44cf20bae43e0429277330dea50c78bfe8c"
      },
      {
        "path": "backend/LifeLine/api/models/user_auth.py",
        "sha256": "83d6c47b7bb185d0510e6eddaea388ea912868ff94a18c5f0d01b495a66adf18"
      },
      {
        "path": "backend/LifeLine/api/models/mcp_connectors.py",
        "sha256": "4d949648af23c94762e42dcf150654a1c9c88caff5d6b8e942b2d42dcc3e4358"
      },
      {
        "path": "backend/LifeLine/api/serializers.py",
        "sha256": "e071cd8a4a9c28966e503bc4a1f251961197412e93ebb080094d9a94943f2209"
      },
      {
        "path": "backend/LifeLine/api/schema.py",
        "sha256": "1c54ae4f1ab39f503ee358ef029889c1e8f73314610df0532406cde3257dbd3e"
      },
      {
        "path": "backend/LifeLine/api/utils/constants.py",
        "sha256": "6804bbecd18ed4bcbcb772b68a31a752894e93d9c5bd5e42ce42030f87f9a4d2"
      },
      {
        "path": "backend/LifeLine/api/utils/prompts.py",
        "sha256": "e8071db247e26af42220634a46db7dc22a35e0846105904350452ae89f0f5674"
      },
      {
        "path": "backend/LifeLine/api/utils/memory_utils.py",
        "sha256": "f345c0b5c10077bd9e2e28dd20a5efeeba69de3834875cd5a4a01da062738c4f"
      },
      {
        "path": "backend/LifeLine/api/utils/llm.py",
        "sha256": "6b228195017e39d94fdf42d2a708b37614fb43ba8097eaca3425ad5703761ffb"
      },
      {
        "path": "backend/LifeLine/api/views/views.py",
        "sha256": "cb7698f5ed460f2e0b56058d57f4c677f3990d3a34d2a73a5b26a11b52dc3dae"
      }
    ],
    "probe_sha256": "4983133f47a34304ccd18ec26114c2fc1a3068027cc3060b1ef0498b4ee39dcd"
  },
  "versions": {
    "Django": "5.2.17",
    "djangorestframework": "3.18.1",
    "drf-spectacular": "0.30.0",
    "numpy": "2.3.5"
  },
  "method": "Full source modules imported unchanged from a hash-checked allowlist. Real models/ORM, DRF view and JSON serialization, extraction prompt/parser, memory persistence, retrieval and prompt builder. A deferred callback queue holds extraction until each API response is rendered. Text/embedding providers are fixed doubles; agent and auto-title branches fail closed. Test authentication is forced, schema is built directly from models, and the existing missing-tokenizer fallback is selected.",
  "fixture": {
    "first_user": "Rowan (fictional)",
    "other_user": "Jules (fictional)",
    "first_message": "For this fictional workshop I prefer diagrams in tutorials.",
    "fixed_reply": "Fictional assistant response: we can plan a workshop.",
    "later_question": "How should we prepare the workshop?",
    "fixed_embedding": [
      1,
      0,
      0
    ],
    "provider_note": "All model replies, extraction JSON and embedding vectors are predetermined test inputs, not model outputs."
  },
  "first_response": {
    "status": 201,
    "conversation_id": 1,
    "user_message_id": 1,
    "assistant_message_id": 2,
    "messages_saved": 2,
    "memories_saved": 0,
    "queued_callbacks": 1
  },
  "after_extraction": {
    "memories_saved": 1,
    "memory": {
      "id": 1,
      "title": "Workshop preference",
      "content": "Fictional Rowan prefers diagrams for workshop tutorials.",
      "type": "preference",
      "source_conversation": 1,
      "source_message": 2,
      "is_auto_extracted": true
    }
  },
  "later_conversation": {
    "status": 201,
    "conversation_id": 2,
    "selected_memory_ids": [
      1
    ],
    "semantic_memories": 1,
    "conversation_memories": 0,
    "memory_access_count": 1,
    "prompt": "You are LifeLine, a smart AI assistant that knows the user well and provides helpful, contextual responses.\n\nCore Principles:\n- Be concise but warm - no unnecessary verbosity\n- Use memories naturally without explicitly stating \"I remember\"\n- Infer context from past conversations and user patterns\n- Provide direct answers first, then elaborate if needed\n- Adapt to the user's communication style and preferences\n\nMemory Usage:\n- Seamlessly integrate what you know about the user\n- Reference past topics, preferences, and goals naturally\n- Build on previous conversations without over-explaining\n- Use context to provide more relevant, personalized responses\n\nResponse Style:\n- Direct and helpful, not chatty\n- Use markdown for clarity (headers, lists, emphasis)\n- Anticipate follow-up needs\n- Be proactive with suggestions based on user patterns\n\nExample approach:\n- Instead of: \"I remember you mentioned you like coffee. Would you like me to help you find coffee shops?\"\n- Say: \"Here are some highly-rated coffee shops near your office in downtown SD.\"\n\nBe smart, contextual, and efficient.\n\nUser: Rowan\n\nContext about Rowan:\n• Workshop preference: Fictional Rowan prefers diagrams for workshop tutorials.\n\n\nUser: How should we prepare the workshop?"
  },
  "failure_cases": [
    {
      "kind": "extraction",
      "response_status": 201,
      "messages_saved": 2,
      "memory_count_before": 1,
      "memory_count_after": 1,
      "new_memories": 0
    },
    {
      "kind": "embedding",
      "response_status": 201,
      "messages_saved": 2,
      "memory_count_before": 1,
      "memory_count_after": 1,
      "new_memories": 0
    }
  ],
  "user_checks": {
    "same_question": "How should we prepare the workshop?",
    "other_user_status": 201,
    "other_user_selected_memory_ids": [],
    "other_user_prompt": "You are LifeLine, a smart AI assistant that knows the user well and provides helpful, contextual responses.\n\nCore Principles:\n- Be concise but warm - no unnecessary verbosity\n- Use memories naturally without explicitly stating \"I remember\"\n- Infer context from past conversations and user patterns\n- Provide direct answers first, then elaborate if needed\n- Adapt to the user's communication style and preferences\n\nMemory Usage:\n- Seamlessly integrate what you know about the user\n- Reference past topics, preferences, and goals naturally\n- Build on previous conversations without over-explaining\n- Use context to provide more relevant, personalized responses\n\nResponse Style:\n- Direct and helpful, not chatty\n- Use markdown for clarity (headers, lists, emphasis)\n- Anticipate follow-up needs\n- Be proactive with suggestions based on user patterns\n\nExample approach:\n- Instead of: \"I remember you mentioned you like coffee. Would you like me to help you find coffee shops?\"\n- Say: \"Here are some highly-rated coffee shops near your office in downtown SD.\"\n\nBe smart, contextual, and efficient.\n\nUser: Jules\n\nUser: How should we prepare the workshop?",
    "foreign_conversation_status": 500,
    "foreign_conversation_response": {
      "detail": "Failed to process message"
    },
    "foreign_conversation_message_writes": 0,
    "foreign_conversation_write_evidence": "The probe compares the total ORM message count before and after this request."
  },
  "limits": [
    "The callback ordering is imposed by this probe; production thread timing, concurrency and job durability were not tested.",
    "The stored interpretation and reply were stipulated. Extraction accuracy, embedding quality and answer quality were not evaluated.",
    "The two-user fixture does not establish broad privacy or authorization correctness. The foreign-conversation HTTP 500 is a known error-handling defect.",
    "Login/JWT, deployment settings, migration history, PostgreSQL, frontend and current hosted availability were not exercised."
  ]
}
