[Agora] Add PubMed evidence to 20 hypotheses lacking citations done

← Agora
Hypotheses have empty evidence_for fields. Evidence-backed hypotheses are required for the Agora-to-Exchange quality loop. Verification: - 20 hypotheses gain non-empty evidence_for entries - Each evidence entry includes PMID or DOI provenance - No hollow placeholder citations are inserted Start by reading this task's spec and checking for duplicate recent work.
Spec File

Goal

Attach real PubMed-backed evidence to hypotheses whose evidence_for field is empty. This improves scientific grounding and prevents debate, ranking, and market workflows from relying on unsupported claims.

Acceptance Criteria

☐ A concrete batch of hypotheses gains non-empty evidence_for entries
☐ Each evidence entry includes PMID, DOI, or equivalent citation provenance
☐ No hollow placeholder evidence is inserted
☐ Before/after counts are recorded in the task work log

Approach

  • Select hypotheses with empty evidence_for, prioritizing active and high-impact rows.
  • Use paper_cache.search_papers or paper_cache.get_paper to find relevant PubMed evidence.
  • Add concise supporting evidence with citation identifiers and caveats.
  • Verify the updated evidence fields and remaining backlog count.
  • Dependencies

    • c488a683-47f - Agora quest
    • paper_cache PubMed lookup helpers

    Dependents

    • Hypothesis debates, evidence validators, and Exchange confidence scoring

    Work Log

    2026-04-20 - Quest engine template

    • Created reusable spec for quest-engine generated hypothesis evidence tasks.

    2026-04-21 12:28:03Z - Watchdog repair b209ba9b

    • Investigated abandoned task 030034d6-752e-4ac9-9935-36489c7ec792.
    • Found 43 hypotheses with empty evidence_for, but all 43 are archived placeholder rows titled [Archived Hypothesis]; there are 0 active/non-placeholder hypotheses requiring PubMed evidence.
    • Dry-ran scripts/add_pubmed_evidence.py --dry-run --limit 5 and confirmed it would query the literal placeholder title and attach the same unrelated PMIDs to archived rows.
    • Plan: exclude archived placeholders from quest-engine backlog counts and PubMed backfill selection, store structured evidence objects, and restore the missing tested backfill helper module.

    2026-04-21 12:32:30Z - Watchdog repair result

    • Updated quest-engine evidence backlog detection to ignore archived placeholder hypotheses.
    • Hardened scripts/add_pubmed_evidence.py so dry runs and live runs ignore archived placeholders and write structured PubMed evidence objects instead of bare PMID arrays.
    • Restored scripts/backfill_evidence_pubmed.py for the existing unit tests and PostgreSQL-aware backfill helper behavior.
    • Verified: python3 scripts/add_pubmed_evidence.py --dry-run --limit 5 reports 0 actionable hypotheses and 43 archived placeholders ignored.
    • Verified: quest_engine.discover_gaps(get_db()) no longer emits the hypothesis-pubmed-evidence gap for the archived placeholder backlog.
    • Tested: pytest -q tests/test_backfill_evidence_pubmed.py -> 18 passed; python3 -m py_compile scripts/add_pubmed_evidence.py scripts/backfill_evidence_pubmed.py quest_engine.py passed.

    2026-04-22 13:21:27Z - Verification e967d229

    • Verified: python3 scripts/add_pubmed_evidence.py --limit 5 shows 0 actionable hypotheses needing evidence.
    • All 43 empty-evidence rows are [Archived Hypothesis] placeholders (archived status) — not valid enrichment targets.
    • Ran live update on h-a2b3485737 (CAPN1/CAPN2, score=0.4199, status=proposed): 5 PubMed PMIDs attached with structured evidence ({pmid, doi, claim, source, year, url, strength, caveat}).
    • Non-placeholder, non-archived hypotheses with empty evidence_for: 0 (target met).
    • Non-placeholder hypotheses with evidence_for populated: 874 (confirmed via SELECT COUNT(*)).
    • Conclusion: task acceptance criteria already met; no additional enrichment needed.

    Already Resolved — 2026-04-23 05:00:00Z

    • Evidence: commit 5eb210854 merged to main; top 25 hypotheses by composite_score all have non-empty evidence_for (verified via DB query). Sample PMIDs verified via paper_cache.get_paper(): 41491101, 41530860, 41714746, 41804841 — all return real papers. All 43 empty-evidence rows are [Archived Hypothesis] placeholders.
    • Task ID: d02ec580-83c8-4bc0-8495-17a069138c6a
    • Acceptance criteria: satisfied — 1123/1166 hypotheses have evidence; the 43 without are archived placeholders correctly excluded.

    Sibling Tasks in Quest (Agora) ↗