hide read-only mode skips from human and JSON probe output

This commit is contained in:
DanConwayDev
2026-02-25 13:43:13 +00:00
parent a6bbcc8b16
commit 1de74ce840
5 changed files with 22 additions and 1 deletions
Generated
+1
View File
@@ -727,6 +727,7 @@ dependencies = [
"nostr-sdk",
"regex",
"reqwest 0.11.27",
"serde",
"serde_json",
"tempfile",
"tokio",
+18 -1
View File
@@ -55,6 +55,12 @@ impl ProbeReport {
for check in &self.checks {
if check.skipped {
// Don't list checks skipped due to read-only mode — they are
// not applicable, not failures. Only show skips caused by
// earlier check failures so the user can see the causal chain.
if check.error.as_deref() == Some("read-only mode") {
continue;
}
let reason = check.error.as_deref().unwrap_or("skipped");
println!(
"{}→{} {:<28} skipped {}({}){} ",
@@ -103,7 +109,18 @@ impl ProbeReport {
/// Print machine-readable JSON
pub fn print_json(&self) {
println!("{}", serde_json::to_string_pretty(self).unwrap());
// Exclude checks skipped due to read-only mode — they are not
// applicable and would clutter automated consumers.
let filtered = ProbeReport {
checks: self
.checks
.iter()
.filter(|c| !(c.skipped && c.error.as_deref() == Some("read-only mode")))
.cloned()
.collect(),
..self.clone()
};
println!("{}", serde_json::to_string_pretty(&filtered).unwrap());
}
}
Submodule worktrees/b905-deletion-request-support added at 6d18f8e022
Submodule worktrees/bb46-git-http-protocol-test-suite added at b62231dc30
Submodule worktrees/ec1f-administrator-observability-and-management-strategy added at a1c89b41e2