[Senate] Create automated quality checks for new hypotheses, wiki pages, KG edges
Quest: Work Governance
Priority: P3
Status: open
Goal
Create automated quality checks for new hypotheses, wiki pages, KG edges
Context
This task is part of the Work Governance quest (Senate layer). It contributes to the broader goal of building out SciDEX's senate capabilities.
Acceptance Criteria
☐ Implementation complete and tested
☐ All affected pages load (200 status)
☐ Work visible on the website frontend
☐ No broken links introduced
☐ Code follows existing patterns
Approach
Read relevant source files to understand current state
Plan implementation based on existing architecture
Implement changes
Test affected pages with curl
Commit with descriptive message and pushWork Log
2026-04-20 14:30 PT — Slot 0
- Re-evaluated task: confirmed no prior commits reference task ID b340fd5d9dd9
- Found existing quality gates in api.py (/api/quality-gates) and post_process.py (evidence/score/specificity gates)
- Created scidex/senate/quality_checks.py with three runnable validators: check_hypothesis, check_wiki_page, check_knowledge_edge
- Integrated quality guard-rail calls into db_writes.py: insert_knowledge_edge, create_wiki_page, upsert_wiki_page
- Added /api/quality/validate endpoint for on-demand entity validation
- Rebased on origin/main (da089b65c), resolved no conflicts
- Committed: [Senate] Add quality_checks module... (a6ac0df21), [Senate] Wire quality checks into db_writes... (b19e43202)
- All unit tests passed (hypothesis, wiki page, KG edge checks)
Already Resolved — 2026-04-20T14:35:00Z
The task goal (automated quality checks) was partially addressed by pre-existing quality gates:
- post_process.py gates (evidence_gate, score_gate, specificity_gate) run after every debate
- api.py /api/quality-gates endpoint provides batch quality reporting
- epistemic_health.py monitors KG trust scores and auto-proposes Senate reviews
The new implementation extends these with:
A standalone scidex/senate/quality_checks.py module (runnable as CLI, usable by any code)
Guard-rail integration into db_writes.py for real-time validation at write time
/api/quality/validate endpoint for on-demand single-entity validationCommitted: a6ac0df21, b19e43202 (task:b340fd5d9dd9)