From 61486594dc0a8a58c7a5f073f9ac2d29b25137df Mon Sep 17 00:00:00 2001 From: Rex Lorenzo Date: Thu, 2 Apr 2026 17:51:54 -0700 Subject: [PATCH] feat(setup): configure flicker-free mode, Windows PowerShell tool, and fix Gemini MCP flag - Enable CLAUDE_CODE_NO_FLICKER=1 on all platforms - Enable CLAUDE_CODE_USE_POWERSHELL_TOOL=1 on Windows only - Fix Gemini CLI 0.36.0 crash: replace empty --allowed-mcp-server-names with dummy name to bypass new policy validation - Skip rate-limited agents in smoke tests instead of failing --- lib/lib-review-loop | 2 +- setup | 12 ++++++++++++ test/smoke | 20 ++++++++++++++++++-- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/lib/lib-review-loop b/lib/lib-review-loop index f7a6832..c8043a3 100644 --- a/lib/lib-review-loop +++ b/lib/lib-review-loop @@ -164,7 +164,7 @@ $prompt" # $1 — prompt text run_gemini() { local prompt="$1" - echo "$prompt" | gemini -p " " --yolo --allowed-mcp-server-names "" \ + echo "$prompt" | gemini -p " " --yolo --allowed-mcp-server-names "__none__" \ 2> >(grep -v -E 'Warning:.*deprecated|YOLO mode|Session cleanup disabled|Loaded cached credentials' >&2) } diff --git a/setup b/setup index 3761076..f784fbc 100755 --- a/setup +++ b/setup @@ -503,6 +503,14 @@ configure_claude_settings() { if ! echo "$settings" | jq -e '.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS' &>/dev/null; then feature_changes+=("teams") fi + if ! echo "$settings" | jq -e '.env.CLAUDE_CODE_NO_FLICKER' &>/dev/null; then + feature_changes+=("noflicker") + fi + if [[ "$(uname -s)" == MINGW* || "$(uname -s)" == MSYS* || "$(uname -s)" == CYGWIN* ]]; then + if ! echo "$settings" | jq -e '.env.CLAUDE_CODE_USE_POWERSHELL_TOOL' &>/dev/null; then + feature_changes+=("powershell") + fi + fi # ── Check read-only permissions (batch jq, handles legacy :* format) ── local perms_json @@ -533,6 +541,8 @@ configure_claude_settings() { websearch) echo -e " • ${BOLD}WebSearch${NC} — allow web searches without prompting" ;; attribution) echo -e " • ${BOLD}attribution${NC} — disable commit/PR attribution tags" ;; teams) echo -e " • ${BOLD}CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1${NC} — enable agent teams" ;; + noflicker) echo -e " • ${BOLD}CLAUDE_CODE_NO_FLICKER=1${NC} — flicker-free fullscreen rendering" ;; + powershell) echo -e " • ${BOLD}CLAUDE_CODE_USE_POWERSHELL_TOOL=1${NC} — enable native PowerShell tool" ;; esac done echo "" @@ -543,6 +553,8 @@ configure_claude_settings() { websearch) updated=$(echo "$updated" | jq '.permissions.allow = ((.permissions.allow // []) + ["WebSearch"])') ;; attribution) updated=$(echo "$updated" | jq '.attribution = {"commit": "", "pr": ""}') ;; teams) updated=$(echo "$updated" | jq '.env = ((.env // {}) + {"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"})') ;; + noflicker) updated=$(echo "$updated" | jq '.env = ((.env // {}) + {"CLAUDE_CODE_NO_FLICKER": "1"})') ;; + powershell) updated=$(echo "$updated" | jq '.env = ((.env // {}) + {"CLAUDE_CODE_USE_POWERSHELL_TOOL": "1"})') ;; esac done changed=true diff --git a/test/smoke b/test/smoke index 15bad42..db1a094 100755 --- a/test/smoke +++ b/test/smoke @@ -190,7 +190,21 @@ run_smoke_test() { # Check if we timed out if [[ $elapsed -ge $TIMEOUT ]]; then + # Gemini retries indefinitely on rate limits. Only skip when the + # output shows positive rate-limit evidence; otherwise fall through + # so real hangs/regressions still fail the smoke test. + if [[ "$agent" == "gemini" ]] && [[ -f "$output_file" ]] && \ + grep -qE -i 'rate[- ]?limit|resource_exhausted|quota|(^|[^0-9])429([^0-9]|$)' "$output_file"; then + echo -e " ${YELLOW}SKIP${NC} $name (rate-limited)" + RESULTS+=("SKIP $name (rate-limited)") + ((SKIPPED++)) + return 0 + fi echo -e " ${YELLOW}TIMEOUT${NC} $name (>${TIMEOUT}s)" + if [[ -f "$output_file" ]]; then + echo " --- last 5 lines of output ---" + tail -5 "$output_file" | sed 's/^/ /' + fi RESULTS+=("TIMEOUT $name") ((FAIL++)) return 1 @@ -276,6 +290,8 @@ Edit only the divide function. Do not create new files." REVIEWER_TOOLS="Read,Write,Bash,Grep,Glob" EDITOR_TOOLS="Edit,Read,Write,Bash,Grep,Glob" +SKIPPED=0 + # ---- run tests ----------------------------------------------------------- for agent in "${agents[@]}"; do @@ -297,10 +313,10 @@ done # ---- summary ------------------------------------------------------------- -total=$((PASS + FAIL)) +total=$((PASS + FAIL + SKIPPED)) echo "" echo "===========" -echo "Results: $PASS passed, $FAIL failed out of $total tests" +echo "Results: $PASS passed, $FAIL failed, $SKIPPED skipped out of $total tests" echo "" for r in "${RESULTS[@]}"; do