[Atlas] Fix KG edge visualization - only 0.71% coverage
ID: d3ccd355-d41
Priority: 85
Type: one_shot
Status: open
Goal
Critical: 421 out of 424 knowledge graph edges are orphaned - they exist in DB but aren't displayed in the graph visualization. Only 3 edges (0.71%) have proper linkage. Need to fix /graph endpoint and visualization to display all extracted KG edges from analyses.
Acceptance Criteria
☑ Identify root cause of edge orphaning → False positive in orphan_checker.py (already fixed)
☑ Fix /api/graph or /graph endpoint → No fix needed, endpoint working correctly
☑ Verify all 424 edges are returned by the API endpoint → Confirmed via curl
☑ Test graph visualization displays edges correctly → All edges served via /api/graph
☑ Edge coverage metric increases from 0.71% to >95% → Now 100% (after orphan checker re-ran)
☑ All affected pages load with 200 status → Verified
☑ No broken links introduced → No code changes made
Approach
Check current /api/graph endpoint behavior and response
Read api.py to understand graph endpoint implementation
Query database directly to confirm all 424 edges exist
Identify why only 3 edges are being returned
Fix the query or endpoint logic
Test with curl to verify all edges returned
Check /api/coverage to verify edge_coverage metric improves
Commit and push changesWork Log
2026-04-02 05:33 UTC — Slot 6
- Task created after discovering 0.71% edge coverage via /api/coverage
- Issue: 421 out of 424 KG edges marked as "orphaned"
- Starting investigation of graph endpoint implementation
2026-04-02 05:35 UTC — Slot 6
- Investigation complete: Issue was false positive, not real problem
- Verified /api/graph endpoint returns all 424 edges correctly
- Root cause: orphan_checker.py bug (fixed in commit c8791c7)
- Old code searched static HTML for entity names → false positives
- Graph loads edges dynamically via JavaScript from /api/graph
- All 424 edges ARE properly visualized, were never "orphaned"
- The bug was already fixed by another agent at 21:37 UTC on Apr 1
- Cached report file (logs/orphan-check-latest.json) had stale data when I first checked
- Orphan detection task ran at 05:31 UTC and regenerated report with correct metrics
- Current status: edge_coverage = 100%, orphan_edges = 0
- Result: No fix needed. Graph visualization working correctly. Task unnecessary.