{"quest":{"id":"35b42f94-7a8","name":"Autonomous Engines","description":"Orchestra-managed recurring scripts: debate engine, link checker, orphan checker, convergence monitor, visual regression, pubmed pipeline, metrics, health checks","layer":"Senate","priority":93,"status":"active","created_at":"2026-04-05T00:15:08.398719+00:00","updated_at":"2026-04-05T00:15:08.398719+00:00"},"tasks":[{"id":"e4ed2939-05f3-4638-b6a3-89095974aa61","title":"[Agora] Debate engine cycle","description":"Run one debate cycle: pick top knowledge gap, execute 5-persona debate, save analysis","status":"open","priority":85,"task_type":"recurring","frequency":"every-4h","assigned_slot":"","started_at":null,"completed_at":"2026-04-17T12:58:45.847384+00:00","updated_at":"2026-04-17T17:04:46.065631+00:00","summary":"","completion_notes":"Auto-release: recurring task had no work this cycle","last_error":" check thread started (5min interval)\n2026-04-17 10:00:02,591 [WARNING] LLM tool provider minimax failed (1 consecutive), trying next: No module named 'litellm'\n2026-04-17 10:00:02,591 [WARNING] LLM tool provider glm failed (1 consecutive), trying next: No module named 'litellm'\n2026-04-17 10:02:44,004 [INFO] LLM response complete (no tool use), 0 tokens, 161355ms\n2026-04-17 10:02:44,093 [ERROR] Analysis SDA-2026-04-17-gap-debate-20260417-032952-48bdcbea failed: name 'get_db_write' is not define","time_estimate_hours":0.0,"completion_count":162,"spec_path":"","provider":"any","payload_json":"{\"command\": \"bash -c 'set -a; source /home/ubuntu/scidex/.env; set +a; /home/ubuntu/scidex/venv/bin/python3 /home/ubuntu/scidex/agent.py --mode=single'\", \"timeout\": 1800, \"success_exit_codes\": [0], \"working_dir\": \"/home/ubuntu/scidex\", \"completion_shas\": [\"cbf553aedf3a6341647cb20ddb8b2fb3c661e6c6\", \"cf61cae8bc1a740c2d72508aeb18f7214b5e7991\"], \"completion_shas_checked_at\": \"2026-04-13T04:39:56.548979+00:00\", \"completion_shas_missing\": [\"7b1258fb173eb003f5ed1acdc1ac96c3918de5d9\"], \"requirements\": {\"coding\": 6, \"reasoning\": 7}}"},{"id":"e1cf8f9a-6a64-4c25-8264-f103e5eb62db","title":"[Senate] Orphan coverage check","description":"Scan for unlinked analyses, hypotheses without HTML, auto-fix missing report_urls","status":"open","priority":50,"task_type":"recurring","frequency":"every-12h","assigned_slot":"","started_at":null,"completed_at":"2026-04-17T09:45:02.690654+00:00","updated_at":"2026-04-17T09:45:02.690654+00:00","summary":"","completion_notes":"script-mode, 0.4s","last_error":"","time_estimate_hours":0.0,"completion_count":163,"spec_path":"","provider":"any","payload_json":"{\"command\": \"PYTHONPATH=/home/ubuntu/scidex /home/ubuntu/scidex/venv/bin/python3 /home/ubuntu/scidex/scripts/orphan_checker.py\", \"timeout\": 300, \"success_exit_codes\": [0], \"working_dir\": \"/home/ubuntu/scidex\", \"completion_shas\": [\"650d2f656ef6a9a955dceb6446e4045474b5e13d\", \"ab79f4162c4f8119f5c1bfa0af934feccd89e2ee\", \"c3989555ddced567f38c48c3c18b62cbe044688a\", \"5cff14573ea7d543d91223f95af599a4fa599ceb\", \"8b1d5db8feac618b2ffe486049c419ccc749dea5\", \"1b719cbb8f53908bde0a6bc124d619e1580fd54e\", \"fd51487073213ce525adcd5043b70a1a6348d310\"], \"completion_shas_checked_at\": \"2026-04-12T23:48:18.944513+00:00\", \"completion_shas_missing\": [\"46b84339b85ec92d1bb8ebd09f56dd450da4aec8\", \"c9a2ddb538509d54290e6f19983c23912a1e1fd0\", \"bdc25aefeee90b47518d7ad6032d0898b6029e65\"], \"requirements\": {\"coding\": 5}}"},{"id":"f07360c3-9380-439a-b0ae-aa417fb31789","title":"[Senate] Link validation sweep","description":"Crawl all site links, test for 404s, create fix tasks","status":"open","priority":40,"task_type":"recurring","frequency":"daily","assigned_slot":"","started_at":null,"completed_at":"2026-04-17T02:28:55.296339+00:00","updated_at":"2026-04-17T02:28:55.296339+00:00","summary":"","completion_notes":"script-mode, 77.2s","last_error":"","time_estimate_hours":0.0,"completion_count":18,"spec_path":"","provider":"any","payload_json":"{\"command\": \"/home/ubuntu/scidex/venv/bin/python3 /home/ubuntu/scidex/link_checker.py\", \"timeout\": 900, \"success_exit_codes\": [0], \"working_dir\": \"/home/ubuntu/scidex\", \"completion_shas\": [\"3a3794604d060d480e8923b92c5edfaac548c4bf\", \"76d952a902d76cd9efa459b7a3c69890dc70a4f3\"], \"completion_shas_checked_at\": \"2026-04-12T23:45:06.691669+00:00\", \"completion_shas_missing\": [\"e225d499aa42e62c896e7b46991d6c1d8077cb59\", \"0ebd171163b089fd842bb5a7ad1b9916ad4c762c\", \"c0a43ad690646d9d9b6738053c9aed4ea515ff2f\", \"13a9c719e9ac656b7d759efa750aaf192e345dfe\", \"ff3711ad40dc5754f842d51752b32d3b8507cc72\", \"87fe3bb276488c0166f7a7a5b60a2f6d83ddf05c\"], \"requirements\": {\"coding\": 5}}"},{"id":"1c1ea5d4-d2c9-4def-82bb-87174192bc31","title":"[Senate] Convergence monitor","description":"Detect task duplication, circular work patterns, quality degradation","status":"done","priority":55,"task_type":"recurring","frequency":"every-12h","assigned_slot":"","started_at":null,"completed_at":"2026-04-17T07:28:45.285143+00:00","updated_at":"2026-04-17T10:22:48.858807+00:00","summary":"","completion_notes":"script-mode, 1.4s","last_error":"Traceback (most recent call last):\n  File \"/home/ubuntu/scidex/scripts/convergence_monitor.py\", line 396, in <module>\n    sys.exit(main())\n             ^^^^^^\n  File \"/home/ubuntu/scidex/scripts/convergence_monitor.py\", line 325, in main\n    \"kg_edges\": analyze_kg_edge_quality(db),\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ubuntu/scidex/scripts/convergence_monitor.py\", line 133, in analyze_kg_edge_quality\n    empty_source = db.execute(\"\"\"\n                   ^^^^^^^^^^^^^^\nsqlite3","time_estimate_hours":0.0,"completion_count":18,"spec_path":"","provider":"any","payload_json":"{\"command\": \"PYTHONPATH=/home/ubuntu/scidex /home/ubuntu/scidex/venv/bin/python3 /home/ubuntu/scidex/scripts/convergence_monitor.py\", \"timeout\": 120, \"success_exit_codes\": [0], \"working_dir\": \"/home/ubuntu/scidex\", \"completion_shas\": [\"6af9a3684ad55713b90f36f34891f39a1ebda67b\", \"20347db649361c2b30ceb5f7f3ba44639cc30408\", \"1e670eadb1489042cf76ca09f6601faf0bd8a6ab\", \"d040f8e303e8131dcb973ef15a43915fce8e6cb2\", \"1c3464da7de562cf7bd9320e1957fdfe6424696b\"], \"completion_shas_checked_at\": \"2026-04-13T05:26:25.879458+00:00\", \"completion_shas_missing\": [\"da38b4a2fb34fdef5ef693d97b34396b392f7896\", \"9d4321b97a23c6360db442bdbbd5527dd516cb4f\", \"e2a28a35fbd0f04412749f696687e35a21261b5d\", \"6e9c970d06bd408fabf4a70c4dbee6dbd363d0ca\", \"0a9253b645b0ea76cdd1389e3bce1bbb718519c9\", \"a519af8c12c4108441fb7baa4f205e129c731413\", \"975da6a4b240a76d5814f15b3b2378619aad9e93\"], \"_watchdog_repair_task_id\": \"0e39f85d-0ade-499f-80b5-72df0c07baeb\", \"_watchdog_repair_created_at\": \"2026-04-17T10:08:32.516461+00:00\"}"}],"reviews":[],"effectiveness":{},"commits":[{"hash":"abc8d0179","message":"[Exchange] Verify /challenge broken links are false positives: all 36 pages return 200 [task:e5a1490f-9ab6-4275-a96b-bd34ceb84fcf]","date":"2026-04-17"},{"hash":"440d6072c","message":"[Senate] Final work log update: document branch push to remote [task:c2780f51-4c91-4cae-a1ff-4edaf6375c59]","date":"2026-04-17"},{"hash":"8eefea2c0","message":"[Atlas] Add redirects in api.py for /site/notebooks/ and root-level .ipynb URLs to /notebooks/ path [task:f92194bf-f23c-4bf3-97d4-676c02f5fb42]","date":"2026-04-17"},{"hash":"bdf2e04e8","message":"[Atlas] Document /mission HTTP 0 fix: already addressed in c5d7a696 [task:e50f7fed-ccde-4104-b98a-205bb500e792]","date":"2026-04-17"},{"hash":"f39b5d3b0","message":"[Atlas] Fix broken /entity links: clean corrupted data + add cleanup script [task:326c7abd-3ad2-4ae5-9a0e-e9981d611890]","date":"2026-04-17"},{"hash":"a4954541c","message":"Squash merge: orchestra/task/09b3a393-broken-links-in-api-http-0-30-links (1 commits)","date":"2026-04-17"},{"hash":"40b62c4b8","message":"[Atlas] Verify /api broken links: all 10 endpoints HTTP 200, no code changes needed [task:09b3a393-777f-4379-85c6-2bf55f6e69c0]","date":"2026-04-17"},{"hash":"6e54e1ccc","message":"On orchestra/task/326c7abd-broken-links-in-entity-http-400-64-links: stash unrelated changes","date":"2026-04-17"},{"hash":"53f087f8e","message":"index on orchestra/task/326c7abd-broken-links-in-entity-http-400-64-links: f3b466710 [Atlas] Add /mission→/missions redirect in api.py; confirm /mission broken links are false positives [task:c0d66faa-91be-41e3-909d-d6359c5b936e]","date":"2026-04-17"},{"hash":"58b5eb786","message":"[Atlas] Verify /analysis broken links: all 10 pages HTTP 200, false positive [task:a7c6d6d2-17bb-4e1c-b131-10677c65e9d0]","date":"2026-04-17"},{"hash":"0be6ce64a","message":"[Senate] Update spec work log: service verified operational, no code changes needed [task:c2780f51-4c91-4cae-a1ff-4edaf6375c59]","date":"2026-04-17"},{"hash":"53c7da02f","message":"Squash merge: orchestra/task/c13f680a-broken-links-in-site-http-404-198-links (1 commits)","date":"2026-04-17"},{"hash":"20a14e537","message":"[Atlas] Fix /site/notebooks/ 404 in api.py: add redirect to /notebooks/ route [task:c13f680a-60bf-49f3-aa42-a05602d77405]","date":"2026-04-17"},{"hash":"52e043bda","message":"Squash merge: orchestra/task/c5d7a696-broken-links-in-target-http-0-765-links (3 commits)","date":"2026-04-17"},{"hash":"aead3c46d","message":"[Atlas] Restore nb-top5- prefix-stripping fallback removed in prior commit [task:c5d7a696-2296-468a-83a2-2d3cabc6901e]","date":"2026-04-17"},{"hash":"1786c8cc4","message":"[Atlas] Wire up suppress_transient_http0_noise() in link checker to prevent false-positive tasks [task:c5d7a696-2296-468a-83a2-2d3cabc6901e]","date":"2026-04-17"},{"hash":"13c833f16","message":"[Atlas] Add redirects for /site/notebooks/ and root-level .ipynb URLs to /notebooks/ path [task:f92194bf-f23c-4bf3-97d4-676c02f5fb42]","date":"2026-04-17"},{"hash":"25d912117","message":"[Senate] Update spec work log: document MERGE GATE rebase fix [task:c2780f51-4c91-4cae-a1ff-4edaf6375c59]","date":"2026-04-17"},{"hash":"06151c073","message":"[Senate] Update spec: verify service operational, no code changes needed [task:c2780f51-4c91-4cae-a1ff-4edaf6375c59]","date":"2026-04-17"},{"hash":"dc15730ae","message":"[Atlas] Fix /notebook top5-SDA-* broken links: add prefix-stripping fallback in notebook_detail [task:c13f680a-60bf-49f3-aa42-a05602d77405]","date":"2026-04-17"}],"related_quests":[{"name":"Artifact Governance & Lifecycle Management","layer":"Senate","priority":93,"status":"active","description":"Establish a unified artifact governance system across SciDEX. Every first-class entity (gap, hypothesis, analysis, paper, dataset, wiki page, debate, squad finding) gets a universal artifact identity, full history tracking, merge/split/archive operations with decision audit trails, and content ownership by agents or squads.\n\nEXISTING INFRASTRUCTURE (to build on, not replace):\n- dedup_recommendations table: 297 pending merge candidates, zero executed\n- artifact_transforms table: 15 records tracking versions/lifecycle/deprecation\n- API endpoints: /api/dedup/{recommendations,approve,reject,scan}, /api/artifact-transforms\n- Lifecycle states: hypotheses (7 states), gaps (6 states), datasets (versioned via git)\n- governance_config table: 3 entries (ALLOCATION_THRESHOLD, REQUIRED_SIGNATURES, AUTHORIZED_SIGNERS)\n- edit_history table: schema exists, zero rows (never wired up)\n- quality_gate_results table: schema exists, zero rows\n\nGAP ANALYSIS (what's missing):\n1. No universal artifact registry — each type has its own ID scheme\n2. edit_history never wired up — no who-changed-what audit trail\n3. 297 dedup recommendations pending forever — no execution pipeline\n4. Lifecycle enforcement is manual/absent — only 1 of 337 hypotheses archived\n5. No content ownership model — artifacts are unowned\n6. No governance decision tracking — decisions happen but aren't recorded\n7. No automated garden maintenance — stale gaps, redundant hypotheses accumulate\n\nDESIGN PRINCIPLES:\n- Clean system APIs: every operation available via /api/ endpoints\n- Documented governance processes adopted by ALL subsystems\n- Agent-compatible: agents and squads can propose, vote, and execute decisions\n- Incremental: builds on existing tables, doesn't require big-bang migration\n- Auditable: every state change has a who/when/why trail","task_count":0,"done_count":0},{"name":"Resource Intelligence","layer":"Senate","priority":92,"status":"active","description":"Value-based resource allocation — continually evaluate the relative value of quests, tasks, \nhypotheses, gaps, and artifacts, then allocate LLM tokens, CPU, and disk proportionally.\n\nThis quest is the DECISION layer between:\n  - Economics (pricing signals, token economy) → tells us what things are WORTH\n  - Resource Governance (caps, quotas, enforcement) → tells us what we CAN spend\n  - Resource Intelligence (THIS) → decides what we SHOULD spend on\n\nCore loop:\n  1. Score every open task/quest by expected-value-per-token:\n     EV = (importance × tractability × downstream_impact) / estimated_cost\n  2. Rank by EV descending → priority queue\n  3. Allocate budget: top-k items get resources proportional to EV rank\n  4. After completion, measure actual impact → update EV model (feedback loop)\n\nSignals feeding the scorer:\n  - Elo tournament ratings (hypothesis quality signal)\n  - LMSR market prices (belief-weighted value)\n  - Gap value_if_resolved scores\n  - Quest priority × task count\n  - Historical cost-per-completion from resource_usage + cost_ledger\n  - Freshness: penalize stale items, boost newly-identified opportunities\n\nResources tracked:\n  - LLM tokens (by provider: max, codex, bedrock)\n  - CPU seconds (cgroup tracking via cgroup_isolation.py)\n  - Disk (artifact storage)\n  - Agent slots (concurrent execution capacity)\n\nConnects to:\n  - resource_allocations table (currently empty → needs populating)\n  - quest_resource_analyzer.py (correlates completion with consumption)\n  - monthly_resource_adjustment.py (periodic rebalancing)\n  - token_ledger.py (virtual economy)\n  - cost_ledger in orchestra.db (real spend)\n\nSpec: docs/planning/specs/q-resource-intelligence_spec.md","task_count":5,"done_count":4},{"name":"Work Governance","layer":"Senate","priority":90,"status":"active","description":"Comprehensive governance framework for tracking all work added to SciDEX — who did what, when, why, and at what cost. Includes commit-level provenance, agent accountability scores, automated quality checks, approval workflows, contradiction detection before KG modifications, rollback capability via kg_modifications log, artifact transform audit trail (merge/split/deprecate/supersede operations), supersession tracking, and dashboards showing contribution patterns.","task_count":8,"done_count":1},{"name":"Schema Governance","layer":"Senate","priority":88,"status":"active","description":"Agent-driven schema evolution through governance (propose, debate, vote, migrate). Linked to artifact_transforms for tracking schema change provenance. All schema changes recorded as artifact lifecycle events.","task_count":7,"done_count":7},{"name":"Code Health","layer":"Senate","priority":88,"status":"active","description":"Continuous code quality review without removing functionality. Archive dead code to cold storage (never delete), organize file sprawl into packages, consolidate duplicate functions, break apart api.py. Connected to artifact lifecycle governance — archival uses cold_store mechanism.","task_count":8,"done_count":7},{"name":"Resource Governance","layer":"Senate","priority":88,"status":"active","description":"Enforce hard resource limits on the VM — memory caps per analysis, CPU quotas, concurrent analysis limits, cumulative daily cost budgets, and auto-kill for runaway processes. Track and display resource usage in real-time. Prevent the VM from becoming unresponsive due to analysis load. Architecture should support future offloading to external compute (AWS Batch, Lambda, K8s) via a pluggable executor interface.\n\n[2026-04-09] See also q-resource-intelligence for the allocation DECISION layer (this quest handles enforcement/limits, that one handles value-based allocation).","task_count":6,"done_count":0}]}