Skip to content

Comments

feat: set NO_COLOR=1 in agent container environment#971

Merged
Mossaka merged 1 commit intomainfrom
fix/no-color-env
Feb 19, 2026
Merged

feat: set NO_COLOR=1 in agent container environment#971
Mossaka merged 1 commit intomainfrom
fix/no-color-env

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Feb 19, 2026

Summary

  • Adds NO_COLOR=1 to the base agent container environment in docker-manager.ts
  • This disables ANSI color escape codes from CLI tools (Rich, Chalk, etc.) inside the container
  • Adds a unit test to docker-manager.test.ts verifying the env var is set

Problem

The python/typer test suite has 150 failures because the Rich library injects ANSI escape codes into CLI help output. Tests expect plain text like "Usage: custom-name [OPTIONS]" but get "Usage: \x1b[0m\x1b[1mcustom-name [OPTIONS]\x1b[0m".

Solution

NO_COLOR is a standard convention (no-color.org) supported by many libraries including Rich (Python), Chalk (Node.js), and others. Setting NO_COLOR=1 in the container environment tells all compliant tools to disable color output.

The env var is added to the base environment object (alongside HTTP_PROXY, HOME, etc.) so it is always set before --env-all expansion. Since --env-all skips keys already in environment, users cannot accidentally override it with a host NO_COLOR=0.

Test plan

  • All 794 existing unit tests pass (npm test)
  • New test added: should set NO_COLOR=1 to disable ANSI color output from CLI tools

🤖 Generated with Claude Code

Disables ANSI color escape codes from CLI tools (Rich, Chalk, etc.)
inside the container. Tools like Rich inject escape codes that break
test assertions expecting plain text output (e.g. typer CLI tests).

NO_COLOR is a standard convention (https://no-color.org/) supported
by many libraries. Adding it to the base environment ensures it is
always set before --env-all expansion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 19, 2026 21:14
@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 82.30% 82.45% 📈 +0.15%
Statements 82.23% 82.37% 📈 +0.14%
Functions 82.74% 82.74% ➡️ +0.00%
Branches 74.46% 74.55% 📈 +0.09%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 83.2% → 83.8% (+0.55%) 82.5% → 83.0% (+0.54%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes non-colored CLI output inside the agent container by forcing NO_COLOR=1 in the generated Docker Compose environment, preventing ANSI escape codes from breaking CLI-output-based assertions (notably in Typer/Rich help text comparisons).

Changes:

  • Set NO_COLOR=1 in the base agent container environment within generateDockerCompose.
  • Add a unit test asserting the agent service environment includes NO_COLOR=1.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/docker-manager.ts Adds NO_COLOR=1 to the agent container’s base environment to disable ANSI color output consistently.
src/docker-manager.test.ts Adds a unit test verifying NO_COLOR is set on the agent service environment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

C++ Build Test Results

Project CMake Build Status
fmt PASS
json PASS

Overall: PASS

All C++ projects built successfully.

AI generated by Build Test C++

@github-actions
Copy link
Contributor

Deno Build Test Results

Project Tests Status
oak 1/1 ✅ PASS
std 1/1 ✅ PASS

Overall: ✅ PASS

All Deno tests completed successfully.

AI generated by Build Test Deno

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved PR data
  • ✅ Playwright: Page title verified
  • ✅ File creation: Test file created
  • ✅ Bash verification: File read successful

Status: PASS

cc @Mossaka

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

Go Build Test Results

Project Download Tests Status
color 1/1 PASS
env 1/1 PASS
uuid 1/1 PASS

Overall: PASS

All Go projects successfully downloaded dependencies and passed tests.

AI generated by Build Test Go

@github-actions
Copy link
Contributor

.NET Build Test Results

Project Restore Build Run Status
hello-world PASS
json-parse PASS

Overall: PASS

All .NET projects restored, built, and ran successfully.

AI generated by Build Test .NET

@github-actions
Copy link
Contributor

Node.js Build Test Results

Project Install Tests Status
clsx PASS ✅ PASS
execa PASS ✅ PASS
p-limit PASS ✅ PASS

Overall: ✅ PASS

All Node.js projects installed successfully and passed their tests.

AI generated by Build Test Node.js

@github-actions
Copy link
Contributor

Java Build Test Results ✅

All Java projects compiled and tested successfully through the firewall.

Project Compile Tests Status
gson 1/1 PASS
caffeine 1/1 PASS

Overall: PASS

All dependencies were successfully downloaded through the Squid proxy (172.30.0.10:3128) and all tests passed.

AI generated by Build Test Java

@github-actions
Copy link
Contributor

Smoke Test Results

✅ GitHub MCP: Listed recent PRs

✅ Playwright: Navigated to github.com (title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub")

✅ File Writing: Created /tmp/gh-aw/agent/smoke-test-claude-22200394483.txt

✅ Bash: Verified file content

Status: PASS

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

Chroot Test Results

The chroot mode test compared runtime versions between the host and chroot environment:

Runtime Host Version Chroot Version Match?
Python 3.12.12 3.12.3 ❌ NO
Node.js v24.13.0 v20.20.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall Result: ❌ Some tests failed

The chroot environment should transparently use host binaries, but Python and Node.js versions don't match. This indicates the chroot mode may not be working correctly for these runtimes.

AI generated by Smoke Chroot

@github-actions
Copy link
Contributor

PR Titles: feat: set NO_COLOR=1 in agent container environment; chore(deps): bump the all-npm-dependencies group across 1 directory with 8 updates
GitHub MCP (last 2 merged PRs): ✅
safeinputs-gh pr list: ✅
Playwright title check: ✅
Tavily search: ❌ (tool unavailable)
File write: ✅
Bash cat: ✅
Discussion comment: ✅
Build (npm ci && npm run build): ✅
Overall: FAIL

AI generated by Smoke Codex

@Mossaka Mossaka merged commit 6a20334 into main Feb 19, 2026
94 checks passed
@Mossaka Mossaka deleted the fix/no-color-env branch February 19, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant