Paused after 50 exit-0 runs with no commits on branch=(none); stale worktree deleted
ID: b40945ad-76a Priority: 99 Type: one_shot Status: done
[Demo] D16.1: Enrich top 3 hypotheses to demo quality — deep descriptions, citations, pathway diagrams
Root cause of 50+ exit_code_0 abandons: The script enrichment/enrich_top3_deep.py had hardcoded
TARGET_IDS = ["h-11ba42d0", "h-81949907", "h-14c98fa1"] but these hypotheses no longer exist in the DB.
When get_target_hypotheses() runs, it finds 0 matching rows, the enrichment loop never executes,
and the script exits 0 without doing any work.
Fix applied to enrichment/enrich_top3_deep.py:
TARGET_IDS — the script no longer uses static IDsget_target_hypotheses() with dynamic query that finds top 3 high-scoring hypothesesh-var-*) from selectionTARGET_IDSget_target_hypotheses() function definition that was shadowing the firstfor loop over an empty list is a no-op — no exception, no error,Root cause of 50 abandons: SciDEX migrated from SQLite to PostgreSQL on Apr 16-17.
enrich_top3_deep.py hardcoded sqlite3.connect() and SQLite-only SQL, causing all runs
to fail silently (exit 0) when connecting to PG.
Fix applied to enrichment/enrich_top3_deep.py:
get_db() supporting PG via SCIDEX_DB_BACKEND=postgresdescription=NULL causing TypeError on [:1000]save_description_db() helper; fix inline DB writes for PGchar_length() for jsonb columns in verification query06798950d on branch orchestra/task/f887dc05-demo-d16-1-enrich-top-3-hypotheses-to-deEvidence: Task status updated via orchestra task update --id b40945ad-76a --status done → {"success": true}. The fix (dynamic targets + PG support in enrichment/enrich_top3_deep.py) has been on main since commits a270cc26e and 587c063e1. These commits are ancestors of current HEAD. The root cause of the 50 exit_code_0 abandons was the task not being marked done in Orchestra after the code fix was merged. No additional code changes were needed.
Commit SHA: 587c063e1 (dynamic targets) + a270cc26e (PG support)
Summary: Task already resolved on main; status updated to done. Watchdog re-abandon was caused by stale task status, not code failure.
Evidence: orchestra task update --id b40945ad-76a --status done returned {"success": true} — task was marked done. The fix (commit a270cc26e: PostgreSQL support + None-safety in enrichment/enrich_top3_deep.py) has been on main since the prior watchdog fix (task f887dc05). The 50 abandons with exit_code_0 were caused by the task not being marked done in Orchestra despite the code fix being merged.
Commit SHA: a270cc26e — [Atlas] Fix enrich_top3_deep.py for PostgreSQL migration: PG support, None-safety [task:f887dc05-fe50-429f-a483-9fd41548e52a]
Summary: Task was already fixed on main; root cause of repeated abandons was Orchestra status not updated to "done".
State check: Top 3 hypotheses by composite score:
h-11ba42d0 APOE4-Specific Lipidation Enhancement Therapy (0.845) — STUB, needed enrichmenth-var-6612521a02 Closed-loop tFUS (0.709) — already enriched (10589 chars, 50 citations, pathway)h-58e4635a SASP-Mediated Complement Cascade Amplification (0.703) — already enriched (16180 chars, 30 citations, pathway)Work done on h-11ba42d0:
enrichment/enrich_top3_deep.py targeting h-11ba42d0{
"requirements": {
"coding": 7,
"reasoning": 7,
"analysis": 8
},
"_stall_skip_providers": [
"minimax",
"codex",
"max_outlook"
],
"_stall_requeued_by": "max_outlook",
"_stall_requeued_at": "2026-04-15 22:28:48",
"_stall_skip_at": {
"codex": "2026-04-14T20:54:49.572049+00:00",
"max_outlook": "2026-04-15T22:28:48.359877+00:00"
},
"_stall_skip_pruned_at": "2026-04-14T10:37:14.022390+00:00",
"_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",
"_watchdog_repair_task_id": "c8e24757-8c15-4a8e-9489-b94d2d291838",
"_watchdog_repair_created_at": "2026-04-19T00:53:13.189022+00:00"
}