You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add cora dead-code command that identifies unreachable symbols — functions, methods, and procedures with zero callers.
Context
Cora already has call_graph (6K+ edges), find_callers(), and trace_path(). Dead code detection is a direct query on existing infrastructure — find symbols with zero incoming CALLS edges, excluding entry points.
Scope
cora dead-code CLI command
dead_code MCP tool
Entry point heuristics (main, new, drop, #[tokio::main], etc.)
Visibility-aware filtering (pub vs private)
Test function exclusion (--include-tests)
Min-line filter (--min-lines N) for tiny stubs
JSON output (--json)
Integration with cora scan (report dead code as findings)
Pre-requisite
Wire up store_kg_edges() — edges table exists but is never populated
Consider: should dead code use call_graph (legacy) or edges (new) table?
Acceptance Criteria
cora dead-code lists unreachable functions with file:line
cora dead-code --json returns structured output
MCP dead_code tool works in agent context
Performance: < 10ms on cora-code repo (115 files, 6K edges)
Activity
ajianaz commentedon Jul 29, 2026
Sub-issues
cora dead-codeCLI command #427 — Implementcora dead-codeCLI commanddead_codeMCP tool #428 — Adddead_codeMCP toolstore_kg_edges()— populateedgestable #429 — Wire upstore_kg_edges()(blocking)ajianaz commentedon Aug 1, 2026
Implemented. Closing as completed — feature verified in codebase.