From 199e902e552c4e4091add1e941a1941da00a0905 Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Wed, 30 Sep 2026 09:43:04 -0400 Subject: [PATCH 01/20] test(guardrails): make jq output CR-free on Windows in four suites Native jq.exe writes CRLF, so jq -r values carried a trailing CR and failed string comparisons in coverage-manifest and the other suites. A shared jq_crlf_free helper shadows jq with jq --binary on Windows hosts only. run-guards probes for a missing jq with type -P so the shadow function cannot mask the probe. Refs #4527 Co-Authored-By: Claude Opus 5.5 --- plugins/guardrails/hooks/block-hook-bypass.test.sh | 1 + plugins/guardrails/hooks/coverage-manifest.test.sh | 1 + plugins/guardrails/hooks/guardrails-test-helpers.sh | 9 +++++++++ plugins/guardrails/hooks/run-guards.test.sh | 3 ++- .../guardrails/hooks/secret-pattern-detection.test.sh | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/guardrails/hooks/block-hook-bypass.test.sh b/plugins/guardrails/hooks/block-hook-bypass.test.sh index a4f8f5831c4..766c8118a33 100755 --- a/plugins/guardrails/hooks/block-hook-bypass.test.sh +++ b/plugins/guardrails/hooks/block-hook-bypass.test.sh @@ -14,6 +14,7 @@ trap 'rm -rf "$TEST_TMPDIR"' EXIT # shellcheck source=guardrails-test-helpers.sh source "$HOOK_DIR/guardrails-test-helpers.sh" +jq_crlf_free # run