Skip to content

fix: resolve test failures on macOS#3304

Merged
lpcox merged 1 commit into
mainfrom
fix/test-failures-macos
May 17, 2026
Merged

fix: resolve test failures on macOS#3304
lpcox merged 1 commit into
mainfrom
fix/test-failures-macos

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented May 17, 2026

Fixes 4 test failures (in 2 suites) that occur on macOS due to platform differences:

docker-manager-utils.test.ts (2 failures)

Tests hardcoded /root as root's home directory, but macOS uses /var/root. Fixed by reading the actual root home from /etc/passwd at test time.

docker-manager-cleanup.test.ts (2 failures)

writeConfigs() calls chownSync(dir, uid, gid) where gid comes from getSafeHostGid(). On macOS, the real gid (501) is below 1000 and gets clamped to 1000, but the current user doesn't belong to gid 1000, causing EPERM. Fixed by mocking getSafeHostUid/Gid in the test to return the actual process uid/gid.

Note: The workflow-engine-install-security failure (missing --ignore-scripts in Claude Code installs) is a gh-aw compiler issue in generated lock files — not addressed here since lock files should not be edited directly.

- docker-manager-utils: Read actual root home from /etc/passwd instead
  of hardcoding /root (macOS uses /var/root)
- docker-manager-cleanup: Mock getSafeHostUid/Gid to use real uid/gid
  so chownSync doesn't fail with EPERM on macOS (gid 501 gets clamped
  to 1000, which the current user can't chown to)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 17, 2026 18:45
@lpcox lpcox requested a review from Mossaka as a code owner May 17, 2026 18:45
Copy link
Copy Markdown
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

Fixes macOS-specific test failures by reading root's actual home directory from /etc/passwd instead of hardcoding /root, and by mocking getSafeHostUid/Gid in cleanup tests to avoid the clamping-to-1000 EPERM issue.

Changes:

  • Dynamically resolve root's home directory in docker-manager-utils.test.ts to support both /root (Linux) and /var/root (macOS).
  • Mock host-env in docker-manager-cleanup.test.ts so chownSync uses the real process uid/gid.
Show a summary per file
File Description
src/docker-manager-utils.test.ts Reads root home from /etc/passwd at test time instead of hardcoding /root.
src/docker-manager-cleanup.test.ts Mocks getSafeHostUid/getSafeHostGid to return actual process uid/gid.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Offline) Mode

Test Result
GitHub MCP connectivity ❌ 401 Bad Credentials
GitHub.com HTTP ⚠️ Template var not expanded
File write/read ⚠️ Template var not expanded
BYOK inference (agent → api-proxy → api.githubcopilot.com)

Running in BYOK offline mode (COPILOT_OFFLINE=true) via api-proxy → api.githubcopilot.com.

Overall: FAIL — pre-computed step outputs were not substituted into the prompt (GitHub Actions template variables ${{ steps.smoke-data.outputs.* }} appeared literally), and GitHub MCP returned 401 Bad Credentials.

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions github-actions Bot mentioned this pull request May 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results

❌ GitHub API: Failed to list merged PRs (auth error: localhost endpoint unreachable)
✅ Playwright: Successfully navigated to github.com (title contains "GitHub")
✅ File verify: Successfully read smoke test file

Result: FAIL (2/3 tests passed)

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Copy Markdown
Contributor

🧪 Smoke Test Results — Copilot Engine

Test Result
GitHub MCP connectivity ❌ (401 — unauthenticated)
GitHub.com HTTP ⚠️ (template vars unresolved)
File write/read ✅ (smoke-test-copilot-25999500899.txt exists)

Overall: PARTIAL — pre-agent step file confirms engine started, but MCP auth and template substitution issues prevent full validation.

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Codex

PRs: fix: postprocess claude-token-optimizer lock file to use local awf build; refactor: split api-proxy-service.test.ts into focused test modules
GitHub merged PR review: ✅
SafeInputs GH CLI: ❌
Playwright GitHub title: ✅
Tavily search: ❌
File + bash + build: ✅
Discussion interaction: ❌
Overall status: FAIL

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx All passed ✅ PASS
Node.js execa All passed ✅ PASS
Node.js p-limit All passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Note (Java): Maven's default local repository at ~/.m2/repository was not writable due to directory ownership. Tests succeeded using -Dmaven.repo.local=/tmp/gh-aw/agent/m2repo as a workaround.

Generated by Build Test Suite for issue #3304 · ● 5.8M ·

@github-actions
Copy link
Copy Markdown
Contributor

Chroot Smoke Test Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.3
Node.js v24.15.0 v20.20.2
Go go1.22.12 go1.22.12

Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot.

Tested by Smoke Chroot

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results — FAIL

Check Result
Redis PING ❌ timeout
PostgreSQL pg_isready ❌ no response
PostgreSQL SELECT 1 ❌ no response

host.docker.internal is not reachable from this runner — service containers appear unavailable.

🔌 Service connectivity validated by Smoke Services

@github-actions
Copy link
Copy Markdown
Contributor

Gemini Smoke Test Results:

  • GitHub MCP Testing: ❌ (mcpscripts not found)
  • GitHub.com Connectivity: ❌ (HTTP 000)
  • File Writing Testing: ✅
  • Bash Tool Testing: ✅
    Overall Status: FAIL

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • localhost

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

💎 Faceted by Smoke Gemini

@lpcox lpcox merged commit 9106b75 into main May 17, 2026
69 of 72 checks passed
@lpcox lpcox deleted the fix/test-failures-macos branch May 17, 2026 19:55
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.

2 participants