From 1de74ce840ab45e0d6f6aa2d75f70be8076fe476 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 25 Feb 2026 13:43:13 +0000 Subject: hide read-only mode skips from human and JSON probe output --- Cargo.lock | 1 + grasp-audit/src/probe.rs | 19 ++++++++++++++++++- worktrees/b905-deletion-request-support | 1 + worktrees/bb46-git-http-protocol-test-suite | 1 + ...dministrator-observability-and-management-strategy | 1 + 5 files changed, 22 insertions(+), 1 deletion(-) create mode 160000 worktrees/b905-deletion-request-support create mode 160000 worktrees/bb46-git-http-protocol-test-suite create mode 160000 worktrees/ec1f-administrator-observability-and-management-strategy diff --git a/Cargo.lock b/Cargo.lock index 884a59c..20f36ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,6 +727,7 @@ dependencies = [ "nostr-sdk", "regex", "reqwest 0.11.27", + "serde", "serde_json", "tempfile", "tokio", diff --git a/grasp-audit/src/probe.rs b/grasp-audit/src/probe.rs index d6c1482..8976400 100644 --- a/grasp-audit/src/probe.rs +++ b/grasp-audit/src/probe.rs @@ -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()); } } diff --git a/worktrees/b905-deletion-request-support b/worktrees/b905-deletion-request-support new file mode 160000 index 0000000..6d18f8e --- /dev/null +++ b/worktrees/b905-deletion-request-support @@ -0,0 +1 @@ +Subproject commit 6d18f8e0228c38307bb46603aafe128a4bfe0bed diff --git a/worktrees/bb46-git-http-protocol-test-suite b/worktrees/bb46-git-http-protocol-test-suite new file mode 160000 index 0000000..b62231d --- /dev/null +++ b/worktrees/bb46-git-http-protocol-test-suite @@ -0,0 +1 @@ +Subproject commit b62231dc30aeaa33b6817d225b2afcfee850db4d diff --git a/worktrees/ec1f-administrator-observability-and-management-strategy b/worktrees/ec1f-administrator-observability-and-management-strategy new file mode 160000 index 0000000..a1c89b4 --- /dev/null +++ b/worktrees/ec1f-administrator-observability-and-management-strategy @@ -0,0 +1 @@ +Subproject commit a1c89b41e25cb2c4757862e1e64a57ac928f4efd -- cgit v1.2.3