From 29960f3e07a6c240e37825a01783d63dd4744cff Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 9 Sep 2026 02:22:17 +0000 Subject: [PATCH] refactor(tracedecay): hide unconsumed root graph and telemetry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root graph/ and runtime_telemetry had zero CLI or workspace callers. Keep both crate-private for MCP health/redundancy; delete unused collect wrappers. Types stay on session-memory, the canonical owner. API: 24→22 root pub items; -2 pub fns (collect, collect_with_integrity). LOC: +9/−20 (runtime_telemetry 208→197). Retained: CLI/MCP/daemon/ application_surface plus test reexports (query, git_query, bench, dashboard, serve). crates.io 0.0.68 graph was a different module already moved; current lib is unpublished with 0 dependents. --- crates/tracedecay/src/graph/mod.rs | 4 ++-- crates/tracedecay/src/graph/test_risk.rs | 10 +++++----- crates/tracedecay/src/lib.rs | 4 ++-- crates/tracedecay/src/runtime_telemetry.rs | 11 ----------- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/crates/tracedecay/src/graph/mod.rs b/crates/tracedecay/src/graph/mod.rs index 9b90317177..dc215379e1 100644 --- a/crates/tracedecay/src/graph/mod.rs +++ b/crates/tracedecay/src/graph/mod.rs @@ -1,5 +1,5 @@ /// Test-risk analysis over the verified code graph. -pub mod test_risk; +pub(crate) mod test_risk; /// AST-level functional-duplicate scanning over the code graph. -pub mod redundancy_scan; +pub(crate) mod redundancy_scan; diff --git a/crates/tracedecay/src/graph/test_risk.rs b/crates/tracedecay/src/graph/test_risk.rs index b9d2b62ad9..d0b44b4d99 100644 --- a/crates/tracedecay/src/graph/test_risk.rs +++ b/crates/tracedecay/src/graph/test_risk.rs @@ -13,13 +13,13 @@ const MAX_TEST_RISK_SYMBOLS: usize = 500_000; const MAX_TEST_RISK_RELATIONS: usize = 2_000_000; #[derive(Debug, Serialize)] -pub struct TestRiskReport { +pub(crate) struct TestRiskReport { pub risks: Vec, pub summary: TestRiskSummary, } #[derive(Debug, Serialize)] -pub struct TestRiskEntry { +pub(crate) struct TestRiskEntry { pub id: String, pub name: String, pub file: String, @@ -37,7 +37,7 @@ pub struct TestRiskEntry { } #[derive(Debug, Serialize)] -pub struct TestRiskSummary { +pub(crate) struct TestRiskSummary { pub total_functions: usize, pub tested: usize, pub skipped: usize, @@ -51,7 +51,7 @@ pub struct TestRiskSummary { } #[derive(Debug, Serialize)] -pub struct TestRiskAttributionSummary { +pub(crate) struct TestRiskAttributionSummary { pub depth: usize, pub direct_unit_attributed: usize, pub closure_attributed: usize, @@ -62,7 +62,7 @@ pub struct TestRiskAttributionSummary { } #[derive(Debug, Serialize)] -pub struct TestRiskBucketSummary { +pub(crate) struct TestRiskBucketSummary { pub attributed: usize, pub reachable_unattributed: usize, pub orphan_entry: usize, diff --git a/crates/tracedecay/src/lib.rs b/crates/tracedecay/src/lib.rs index c3fa89a740..4726120221 100644 --- a/crates/tracedecay/src/lib.rs +++ b/crates/tracedecay/src/lib.rs @@ -57,7 +57,7 @@ pub mod daemon; pub mod dashboard; pub mod doctor; pub use tracedecay_application::git_query; -pub mod graph; +mod graph; mod hooks; #[cfg(test)] mod host_admission_test; @@ -74,7 +74,7 @@ pub use runtime_ports::{hook_runtime, register_runtime_ports}; #[cfg(test)] #[path = "sessions/claude_observation_benchmark.rs"] mod claude_observation_benchmark; -pub mod runtime_telemetry; +mod runtime_telemetry; pub mod serve; #[cfg(test)] #[path = "sessions/ingest_tests.rs"] diff --git a/crates/tracedecay/src/runtime_telemetry.rs b/crates/tracedecay/src/runtime_telemetry.rs index 04e29e7fdd..1eeb0b5a65 100644 --- a/crates/tracedecay/src/runtime_telemetry.rs +++ b/crates/tracedecay/src/runtime_telemetry.rs @@ -22,17 +22,6 @@ use tracedecay_session_memory::runtime_telemetry::{ /// (b) `stat` the `SQLite` files and ask the connection for its journal /// mode. Unavailable pragmas remain optional; failures to identify or stat the /// store itself fail the read instead of fabricating a zero-sized database. -pub async fn collect(cg: &crate::tracedecay::TraceDecay) -> Result { - collect_with_integrity(cg, false).await -} - -pub async fn collect_with_integrity( - cg: &crate::tracedecay::TraceDecay, - include_integrity: bool, -) -> Result { - collect_with_integrity_and_generation_census(cg, include_integrity, None).await -} - #[hotpath::measure(label = "runtime_ports.collect", future = true)] pub(crate) async fn collect_with_integrity_and_generation_census( cg: &crate::tracedecay::TraceDecay,