From 4d32978bd0e52df39baa8ed236b891aab0ff3293 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 14:31:14 +0000 Subject: [PATCH] fix(ci): clear shellcheck findings in pwg-derive.sh and test-gate-falsifiability.sh SC1112: replace the unicode apostrophe in a jq comment with wording that needs no apostrophe (the comment sits inside a single-quoted jq program). SC2030/SC2031: meta_canary no longer mutates PASS/FAIL inside a command substitution; it saves and restores the counters instead. Behaviour is unchanged: canaries 19/19, pwg-check passes. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZnfGP6tuXgjeDPhEv4 --- scripts/pwg-derive.sh | 2 +- scripts/test-gate-falsifiability.sh | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/pwg-derive.sh b/scripts/pwg-derive.sh index 02360ad..6302e84 100755 --- a/scripts/pwg-derive.sh +++ b/scripts/pwg-derive.sh @@ -69,7 +69,7 @@ DERIVE=' # PROVEN-WITH-AXIOMS and its 2.2 correspondence state is RECONCILED." And: # a waived leg, an unavailable leg and any BRIDGE-PENDING leg do not count. # Also require at least one current receipt with a full 40-character commit, - # resolving the leg’s receipt IDs through the supplied receipt map. + # resolving the receipt IDs of the leg through the supplied receipt map. def counts($leg; $receipts): ($leg.token | accepted) and $leg.state == "RECONCILED" diff --git a/scripts/test-gate-falsifiability.sh b/scripts/test-gate-falsifiability.sh index 2fe424c..7786e2c 100755 --- a/scripts/test-gate-falsifiability.sh +++ b/scripts/test-gate-falsifiability.sh @@ -233,11 +233,14 @@ pwg_canaries() { # without ever exercising its target. This plants exactly that and asserts the suite # reports FAILURE. Measured: this canary FAILS against the pre-fix harness. meta_canary() { - local out - out=$( PASS=0; FAIL=0 - pwg_case reject "meta-probe (expected to be reported as FAILING)" '.theorems[0].pwg = ' >/dev/null 2>&1 - printf 'FAILCOUNT=%s' "$FAIL" ) - if printf '%s' "$out" | grep -q 'FAILCOUNT=1'; then + # Isolate the probe's counters by saving and restoring them (not a subshell), + # so the probe's expected FAIL never leaks into the suite's totals. + local saved_pass="$PASS" saved_fail="$FAIL" probe_fail + PASS=0; FAIL=0 + pwg_case reject "meta-probe (expected to be reported as FAILING)" '.theorems[0].pwg = ' >/dev/null 2>&1 + probe_fail="$FAIL" + PASS="$saved_pass"; FAIL="$saved_fail" + if [ "$probe_fail" -eq 1 ]; then ok "a canary whose own jq program is broken is reported as FAILURE (meta-canary)" else bad "a BROKEN canary still reported PASS — the suite cannot detect its own breakage"