Modify compute_allocation_weight() in exchange.py to include a diversity_bonus factor that rewards hypotheses targeting underexplored mechanisms.
_compute_diversity_bonus() helper function that:compute_allocation_weight() to multiply in the diversity bonus:allocation_weight = composite_score evidence_freshness gap_coverage * diversity_bonuscompute_allocation_weight() includes diversity_bonus factor in final calculation_compute_diversity_bonus() correctly computes bonus based on existing hypothesis count_compute_diversity_bonus() and integrated it into compute_allocation_weight(). Committed as 5dcf7f478._compute_diversity_bonus() helper function and integrated it into compute_allocation_weight(). The diversity bonus multiplier (0.4–1.2) is applied as a 4th factor in the allocation weight formula, rewarding hypotheses targeting underexplored mechanisms and penalizing those targeting already-heavily-studied areas.{
"_reset_note": "This task was reset after a database incident on 2026-04-17.\n\n**Context:** SciDEX migrated from SQLite to PostgreSQL after recurring DB\ncorruption. Some work done during Apr 16-17 may have been lost.\n\n**Before starting work:**\n1. Check if the task's goal is ALREADY satisfied (run the relevant checks)\n2. Check `git log --all --grep=task:YOUR_TASK_ID` for prior commits\n3. If complete, verify and mark done. If partial, continue. If not done, proceed.\n\n**DB change:** SciDEX now uses PostgreSQL. `get_db()` auto-detects via\nSCIDEX_DB_BACKEND=postgres env var.",
"_reset_at": "2026-04-18T06:29:22.046013+00:00",
"_reset_from_status": "done"
}