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.
This commit is contained in:
agent0
2026-04-04 15:27:13 +00:00
parent 0803969d31
commit 04542e481c

View File

@@ -36,7 +36,7 @@ pub async fn execute(state: &Arc<AppState>, _arguments: Value) -> Result<String>
"total_memories": stats.total_memories, "total_memories": stats.total_memories,
"scored_memories": stats.scored_memories, "scored_memories": stats.scored_memories,
"unscored_memories": stats.unscored_memories, "unscored_memories": stats.unscored_memories,
"coverage_pct": stats.coverage_pct, "coverage_percent": stats.coverage_pct,
"avg_truth_value": stats.avg_truth_value, "avg_truth_value": stats.avg_truth_value,
"avg_confidence": stats.avg_confidence, "avg_confidence": stats.avg_confidence,
"categories": { "categories": {