[Embedding] Loaded 500 cached embeddings
[Embedding] Using Gradio API: https://iotacluster-embedding-model.hf.space/gradio_api/call/embed_dense
[Embedding] Dimension: 768

=== SETUP: Indexing files ===
[Embedding] Batch embedding 4 texts with 10 workers...
  Indexed: utils.py

=== TEST 1: summarize_context ===
  [PASS] summarize_context brief works
  [PASS] brief summary contains file name
  [PASS] brief summary counts chunks
  [PASS] summarize_context normal works
  [PASS] normal has code_flow
  [PASS] summarize_context detailed works
  [PASS] detailed has chunks list
  [PASS] detailed chunks have content

=== TEST 2: usage_report ===
  [PASS] usage_report has sessions
  [PASS] usage_report shows indexed files
  [PASS] usage_report shows most accessed
  [PASS] access count is recorded

=== TEST 3: performance_profile ===
  [PASS] performance_profile works
  [DEBUG] Profile: {
  "indexing": {
    "avg_ms": 454.5,
    "last_ms": 30.9,
    "count": 5,
    "total_ms": 2272.6
  },
  "retrieval": {
    "avg_ms": 0,
    "last_ms": 0,
    "count": 0,
    "total_ms": 0
  },
  "search": {
    "avg_ms": 1970.2,
    "last_ms": 1970.2,
    "count": 1,
    "total_ms": 1970.2
  },
  "embedding": {
    "avg_ms": 0,
    "last_ms": 0,
    "count": 0,
    "total_ms": 0
  }
}
  [DEBUG] Usage Report: {
  "sessions": {
    "total": 0,
    "total_tokens_stored": 0,
    "total_tokens_retrieved": 0,
    "total_cache_hits": 0,
    "total_cache_misses": 0
  },
  "most_accessed_files": [
    {
      "file": "utils.py",
      "file_path": "C:\\Users\\Dellg\\AppData\\Local\\Temp\\tier2_test__f36hm8g\\utils.py",
      "access_count": 13,
      "tokens": 39,
      "language": "python"
    }
  ],
  "indexing_activity": {
    "total_files_indexed": 1,
    "total_chunks": 4,
    "avg_chunks_per_file": 4.0,
    "language_distribution": {
      "python": 1
    }
  },
  "total_tokens_cached": 39
}
  [PASS] profile tracks indexing
  [PASS] profile tracks search
  [FAIL] profile tracks retrieval - 
  [PASS] latencies are recorded

=== TEST 4: invalidate_cache ===
  [PASS] invalidate_cache scope='file' works
  [PASS] file removed from index
[Embedding] Batch embedding 4 texts with 10 workers...
  [PASS] invalidate_cache scope='all' works
  [PASS] total cache reset

=== TEST 5: snapshots (mock/check) ===
  Snapshot result: error - Snapshot failed. Is .gitmem initialized? (Requires gitmem DAG backend)
  [PASS] create_snapshot call successful (even if error response)

============================================================
  RESULTS: 21 passed, 1 failed
============================================================
