← Back to PRs

#21325: Smoke: pass OPENCLAW_USE_GUM to docker runs

by rolandkakonyi open 2026-02-19 22:23 View on GitHub →
scripts docker size: XS
## Summary Describe the problem and fix in 2–5 bullets: - Problem: Docker installer smoke runs can become non-deterministic/noisy when interactive `gum` UI rendering is enabled in container contexts. - Why it matters: regression validation should be stable in headless/CI-like runs. - What changed: `scripts/test-install-sh-docker.sh` now forwards `OPENCLAW_USE_GUM` (and legacy alias) into all `docker run` invocations. - What did NOT change (scope boundary): no installer/runtime behavior change by default; this only takes effect when env var is set. ## Change Type (select all) - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Docs - [ ] Security hardening - [x] Chore/infra ## Scope (select all touched areas) - [ ] Gateway / orchestration - [ ] Skills / tool execution - [ ] Auth / tokens - [ ] Memory / storage - [ ] Integrations - [ ] API / contracts - [ ] UI / DX - [x] CI/CD / infra ## Linked Issue/PR - Closes # - Related https://github.com/openclaw/openclaw/pull/21307 ## User-visible / Behavior Changes None. ## Security Impact (required) - New permissions/capabilities? (`Yes/No`) No - Secrets/tokens handling changed? (`Yes/No`) No - New/changed network calls? (`Yes/No`) No - Command/tool execution surface changed? (`Yes/No`) No - Data access scope changed? (`Yes/No`) No - If any `Yes`, explain risk + mitigation: ## Repro + Verification ### Environment - OS: macOS host - Runtime/container: Docker - Model/provider: N/A - Integration/channel (if any): N/A - Relevant config (redacted): `OPENCLAW_USE_GUM=0` ### Steps 1. Run `scripts/test-install-sh-docker.sh` with `OPENCLAW_USE_GUM=0`. 2. Confirm installer output uses no-gum mode in containers. 3. Verify script shell lint. ### Expected - Docker smoke harness passes `OPENCLAW_USE_GUM` into container runs. ### Actual - Env var is now forwarded in all harness docker runs. ## Evidence Attach at least one: - [x] Failing test/log before + passing after - [x] Trace/log snippets - [ ] Screenshot/recording - [ ] Perf numbers (if relevant) ## Human Verification (required) What you personally verified (not just CI), and how: - Verified scenarios: - `shellcheck scripts/test-install-sh-docker.sh` passes. - Harness run behavior reflects `OPENCLAW_USE_GUM` in containerized smoke runs. - Edge cases checked: - Empty/unset `OPENCLAW_USE_GUM` preserves default behavior. - What you did **not** verify: - No full CI run from GitHub Actions in this branch yet. ## Compatibility / Migration - Backward compatible? (`Yes/No`) Yes - Config/env changes? (`Yes/No`) No - Migration needed? (`Yes/No`) No - If yes, exact upgrade steps: ## Failure Recovery (if this breaks) - How to disable/revert this change quickly: revert this PR commit. - Files/config to restore: - `scripts/test-install-sh-docker.sh` - Known bad symptoms reviewers should watch for: - Unexpected env propagation if caller injects malformed `OPENCLAW_USE_GUM` value. ## Risks and Mitigations - Risk: Slightly broader env forwarding in smoke harness. - Mitigation: limited to explicit single env var and Docker test script only. ## AI Assistance Disclosure - AI tool used: GPT-5.3-Codex (High reasoning). - Intent summary of prompts: - Split `OPENCLAW_USE_GUM` harness forwarding into a separate PR. - Keep regression-test PR scope clean. - Validate shell script with shellcheck. <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR forwards the `OPENCLAW_USE_GUM` environment variable (and its legacy `CLAWDBOT_USE_GUM` alias) into Docker container runs during installer smoke tests. The change ensures that when `OPENCLAW_USE_GUM` is set in the host environment, it's properly propagated to all three containerized test scenarios: root installer test, non-root installer test, and CLI installer test. **Key changes:** - Captures `USE_GUM` variable from environment with fallback chain - Conditionally builds `DOCKER_GUM_ENV` array only when variable is set - Passes array to all three `docker run` invocations using array expansion **Implementation approach:** The solution uses bash array expansion `"${DOCKER_GUM_ENV[@]}"` which correctly handles both empty and populated cases - when the variable is unset, the array is empty and expands to nothing, maintaining backward compatibility. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The change is narrowly scoped to test infrastructure, uses defensive bash patterns (empty array when unset), maintains backward compatibility, and follows existing patterns in the script for environment variable handling. The implementation correctly uses bash array expansion which safely handles both empty and populated states. - No files require special attention <sub>Last reviewed commit: 54b6c75</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs