From 04542e481c22878e3cd38243d244f1a75264a61e Mon Sep 17 00:00:00 2001 From: agent0 Date: Sat, 4 Apr 2026 15:27:13 +0000 Subject: [PATCH] fix(truth_status): rename JSON key coverage_pct -> coverage_percent The e2e_truth_status_counts_are_consistent test reads the "coverage_percent" field but the truth_status tool was emitting "coverage_pct", causing the test to fall back to -1.0 and panic with "coverage_percent should be 0-100, got: -1". Align the JSON output with the test contract by renaming the JSON key. The internal Rust struct field stats.coverage_pct in src/db.rs is unchanged, so no other code is affected. --- src/tools/truth_status.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/truth_status.rs b/src/tools/truth_status.rs index 39b7cd3..2443c75 100644 --- a/src/tools/truth_status.rs +++ b/src/tools/truth_status.rs @@ -36,7 +36,7 @@ pub async fn execute(state: &Arc, _arguments: Value) -> Result "total_memories": stats.total_memories, "scored_memories": stats.scored_memories, "unscored_memories": stats.unscored_memories, - "coverage_pct": stats.coverage_pct, + "coverage_percent": stats.coverage_pct, "avg_truth_value": stats.avg_truth_value, "avg_confidence": stats.avg_confidence, "categories": {