Skip to content

Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.

fix(tests): guard macOS-only security calls behind Darwin check; update test to track guard blocks

auroracapital38240e45b825
diff --git a/claude-ops/tests/test-bin-scripts.sh b/claude-ops/tests/test-bin-scripts.sh
index 38e733b9..a8c0ebd4 100755
--- a/claude-ops/tests/test-bin-scripts.sh
+++ b/claude-ops/tests/test-bin-scripts.sh
@@ -67,11 +67,31 @@ for script in "${script_files[@]}"; do
ok "macOS-only tool usage present (macOS environment)"
fi
else
- # On Linux: check that macOS-only tool calls are guarded
+ # On Linux: check that macOS-only tool calls are guarded by an IS_MACOS / OS check
unguarded=false
+ macos_guard_depth=0 # >0 means we are inside a macOS-only if-block
+ if_depth=0 # overall if nesting depth when guard started
while IFS= read -r line; do
- # Skip lines that are comments
+ # Skip blank lines and full-line comments
[[ "$line" =~ ^[[:space:]]*# ]] && continue
+ stripped="${line#"${line%%[! ]*}"}" # leading-whitespace stripped
+
+ # Detect entry into a macOS-guarded block:
+ # if $IS_MACOS; / if [ "$OS" = "macos" ] / Darwin*) in case / $IS_MACOS &&
+ if echo "$stripped" | grep -qE \
+ '^\$IS_MACOS\s*&&|if[[:space:]].*\$IS_MACOS|if[[:space:]].*"macos"|if[[:space:]].*Darwin|Darwin\*\)'; then
+ macos_guard_depth=$(( macos_guard_depth + 1 ))
+ fi
+
+ # Track fi / esac / ;; that close guarded blocks
+ if (( macos_guard_depth > 0 )); then
+ if echo "$stripped" | grep -qE '^fi[[:space:];]*(#.*)?$|^esac[[:space:];]*(#.*)?$'; then
+ macos_guard_depth=$(( macos_guard_depth - 1 ))
+ fi
+ # Lines inside a guard are safe — skip the macOS-tool check
+ continue
+ fi
+
# Check for macOS-only tools outside of IS_MACOS guards
if echo "$line" | grep -qE "(security find-generic-password|pbcopy|osascript|defaults read)"; then
unguarded=true