  [91m✗[0m context_efficiency = information / tokens (math exact)  ← expected≈0.8826 actual=882.5883
2026-03-08 21:21:53,278 [entroly] Using Rust engine (entroly_core)
2026-03-08 21:21:53,278 [entroly] AdaptivePruner: ebbiforge_core not available — using static weights
2026-03-08 21:21:53,278 [entroly] Failed to load persistent index: 'builtins.EntrolyEngine' object has no attribute 'load_index'
2026-03-08 21:21:53,292 [entroly] Autotune: background self-tuning daemon started (nice+10)
2026-03-08 21:21:53,294 [entroly] Autotune: daemon launched (tid=140248400000704, strategy=auto→monorepo, idle_only=True)
  [91m✗[0m daemon spawns when enabled=true
2026-03-08 21:21:53,494 [entroly] Autotune: disabled via tuning_config.json autotuner.enabled=false
  [91m✗[0m efficiency after 5 optimize calls: math holds  ← reported=882.5883 computed=0.8826
2026-03-08 21:21:53,661 [entroly] Using Rust engine (entroly_core)
2026-03-08 21:21:53,661 [entroly] AdaptivePruner: ebbiforge_core not available — using static weights
2026-03-08 21:21:53,661 [entroly] Failed to load persistent index: 'builtins.EntrolyEngine' object has no attribute 'load_index'
2026-03-08 21:21:53,667 [entroly] Failed to persist index: 'builtins.EntrolyEngine' object has no attribute 'persist_index'
2026-03-08 21:21:53,669 [entroly] Failed to persist index: 'builtins.EntrolyEngine' object has no attribute 'persist_index'
2026-03-08 21:21:53,670 [entroly] Using Rust engine (entroly_core)
2026-03-08 21:21:53,670 [entroly] AdaptivePruner: ebbiforge_core not available — using static weights
2026-03-08 21:21:53,670 [entroly] Failed to load persistent index: 'builtins.EntrolyEngine' object has no attribute 'load_index'

[1mP-01  CONTEXT EFFICIENCY METRIC[0m
  [92m✓[0m stats() contains context_efficiency key
  [92m✓[0m context_efficiency has sub-keys
  [92m✓[0m context_efficiency is non-negative float
  [92m✓[0m cumulative_tokens_used > 0 after optimize

[1mP-02  SLIDING WINDOW RECALL[0m
  [92m✓[0m sliding window caps results to window vicinity  [got 3 (expect ≤ 3)]
  [92m✓[0m window=0 returns more results than window=3  [no_window=10 vs window3=3]
  [92m✓[0m window > corpus size works (no crash, returns results)

[1mP-03  MCP SERVER TOOL LAYER (Python → Rust)[0m
  [92m✓[0m server.ingest_fragment returns dict
  [92m✓[0m server.ingest_fragment status=ingested  [{'status': 'ingested', 'fragment_id': 'fa389c35a_000001', 'token_count': 11, 'entropy_score': 0.8858, 'criticality': 'Normal', 'is_pinned': False, 'total_fragments': 1, 'has_skeleton': False}]
  [92m✓[0m server.ingest_fragment detects duplicate  [{'status': 'duplicate', 'duplicate_of': 'fa389c35a_000001', 'tokens_saved': 11}]
  [92m✓[0m optimize_context returns dict
  [92m✓[0m optimize_context has selected key  [['method', 'total_tokens', 'total_relevance', 'selected_count', 'skeleton_count', 'skeleton_tokens', 'tokens_saved', 'effective_budget', 'budget_utilization', 'sufficiency', 'context_efficiency', 'selected_fragments']]
  [92m✓[0m optimize_context has >0 selected
  [92m✓[0m advance_turn increments turn counter  [before=0 after=1]

[1mP-04  GC FREEZE STATE[0m
  [92m✓[0m manual gc.disable/enable cycle works correctly
  [92m✓[0m gc.freeze does not raise on non-empty heap

[1mP-05  AUTOTUNE CONFIG I/O[0m
  ⊘ Skipping autotune config (import error: cannot import name 'TUNABLE_PARAMS' from 'bench.autotune' (/media/abby/OS2/Users/abhis/cogops/entroly/bench/autotune.py))

[1mP-06  DAEMON CONTROL[0m
  [92m✓[0m daemon does NOT spawn when enabled=false
  [92m✓[0m autotune thread is daemon=True

[1mP-07  UNICODE + NON-ASCII CONTENT[0m
  [92m✓[0m unicode ingest OK [german.py]  [{'status': 'ingested', 'fragment_id': 'f6d679b92_000001', 'token_count': 50, 'entropy_score': 0.8831, 'criticality': 'Normal', 'is_pinned': False, 'total_fragments': 1, 'has_skeleton': False}]
  [92m✓[0m unicode ingest OK [auth_cn.go]  [{'status': 'ingested', 'fragment_id': 'f6d679b92_000002', 'token_count': 80, 'entropy_score': 0.8338, 'criticality': 'Normal', 'is_pinned': False, 'total_fragments': 2, 'has_skeleton': False}]
  [92m✓[0m unicode ingest OK [auth_ar.py]  [{'status': 'ingested', 'fragment_id': 'f6d679b92_000003', 'token_count': 60, 'entropy_score': 0.8885, 'criticality': 'Normal', 'is_pinned': False, 'total_fragments': 3, 'has_skeleton': False}]
  [92m✓[0m unicode ingest OK [security_notes.md]  [{'status': 'ingested', 'fragment_id': 'f6d679b92_000004', 'token_count': 30, 'entropy_score': 0.8947, 'criticality': 'Normal', 'is_pinned': False, 'total_fragments': 4, 'has_skeleton': False}]
  [92m✓[0m unicode ingest OK [spanish.py]  [{'status': 'ingested', 'fragment_id': 'f6d679b92_000005', 'token_count': 20, 'entropy_score': 0.88, 'criticality': 'Normal', 'is_pinned': False, 'total_fragments': 5, 'has_skeleton': False}]
  [92m✓[0m recall works after unicode ingests

[1mP-08  EMPTY CONTENT EDGE CASES[0m
  [92m✓[0m empty string ingest does not crash
  [92m✓[0m empty string ingest handled (any valid status)  [{'status': 'ingested', 'fragment_id': 'f91e422cc_000001', 'token_count': 1, 'entropy_score': 0.0, 'criticality': 'Normal', 'is_pinned': False, 'total_fragments': 1, 'has_skeleton': False}]
  [92m✓[0m whitespace-only ingest does not crash
  [92m✓[0m optimize on empty corpus does not crash
  [92m✓[0m optimize on empty corpus returns selected key
  [92m✓[0m optimize on empty corpus returns empty selected
  [92m✓[0m recall on empty corpus does not crash
  [92m✓[0m recall on empty corpus returns empty list

[1mP-09  ZERO/TINY TOKEN BUDGET[0m
  [92m✓[0m optimize(budget=0) does not crash
  [92m✓[0m optimize(budget=0) returns selected key
  [92m✓[0m optimize(budget=1) does not crash

[1mP-10  ALL-DUPLICATE CORPUS[0m
  [92m✓[0m first ingest accepted
  [92m✓[0m all repeated ingests detected as duplicate  [10/10]
  [92m✓[0m optimize works on all-duplicate corpus
  [92m✓[0m all-dup corpus: optimize returns the 1 unique fragment
  [92m✓[0m stats reports total_fragments=1 (dedup working)  [{'current_turn': 0, 'total_fragments': 1, 'total_tokens_tracked': 100, 'avg_entropy': 0.8685, 'pinned': 0}]

[1mP-11  CONCURRENT RAPID INGESTS (threading)[0m
  [92m✓[0m no exceptions during concurrent ingests  [0 errors: []]
  [92m✓[0m concurrent ingests: some accepted (>0)  [50 ingested]
  [92m✓[0m total_fragments consistent with accepted ingests  [total_fragments=50 accepted=50]

[1mP-12  RECALL WINDOW LARGER THAN CORPUS[0m
  [92m✓[0m window=10000 with 5-fragment corpus: no crash
  [92m✓[0m window=10000 with 5-fragment corpus: returns results

[1mP-13  EFFICIENCY MATH EXACTNESS (across N optimize calls)[0m

[1mP-14  PRISM DRIFT GUARD (value residual)[0m
  [92m✓[0m engine functional after 20 success feedbacks
  [92m✓[0m selected count > 0 after heavy feedback
  [92m✓[0m stats still returns correctly after PRISM updates

[1mP-15  BENCH/EVALUATE READS LIVE TUNING CONFIG[0m
  [92m✓[0m load_tuning_config() returns dict
  [92m✓[0m config has weights section
  [92m✓[0m evaluate() returns composite_score  [['composite_score', 'avg_recall', 'avg_precision', 'avg_f1', 'avg_context_efficiency', 'avg_latency_ms', 'all_latency_ok', 'total_cases', 'cases', 'config']]
  [92m✓[0m composite_score in [0, 1]  [0.6451]
  [92m✓[0m all_latency_ok = True (all under 500ms)  [avg=0.06ms]

[1mP-16  FRAGMENT EVICTION (max_fragments cap)[0m
  [92m✓[0m total_fragments tracks ingested count (dedup excluded)  [count=50]

[1mP-17  EXPORT / IMPORT ROUNDTRIP (via server.py layer)[0m
  [92m✓[0m checkpoint() (server layer) does not raise
  [92m✓[0m checkpoint ID returned
  [92m✓[0m resume() (server layer) does not raise
  [92m✓[0m resume() status=resumed
  [92m✓[0m total_fragments preserved after checkpoint  [orig=5 restored=5]
  [92m✓[0m recall works after checkpoint restore

============================================================
[1mPRODUCTION TEST RESULTS: 60/63 passed[0m  [91m3 FAILED ✗[0m

Failed tests:
  • context_efficiency = information / tokens (math exact)
  • daemon spawns when enabled=true
  • efficiency after 5 optimize calls: math holds
