Skip to content

fix: add env capture for Rust and Java in chroot mode#517

Open
Mossaka wants to merge 6 commits intomainfrom
fix/rust-java-env-capture
Open

fix: add env capture for Rust and Java in chroot mode#517
Mossaka wants to merge 6 commits intomainfrom
fix/rust-java-env-capture

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Feb 4, 2026

Summary

  • Recompile build-test-rust and build-test-java workflows with updated gh-aw
  • Adds Setup Rust action (actions-rust-lang/setup-rust-toolchain)
  • Adds CARGO_HOME capture step for Rust
  • Adds JAVA_HOME capture step for Java

Context

The Build Test Rust and Build Test Java workflows were failing because:

  • Rust: cargo commands failed with "No such file or directory" error
  • Java: All binary executions were intercepted and run as bash --version

Root cause: In AWF chroot mode, environment variables like CARGO_HOME and JAVA_HOME need to be explicitly captured and exported to $GITHUB_ENV because sudo may not preserve them.

This is the same pattern used for GOROOT in Go workflows.

Test plan

  • Build Test Rust workflow should now be able to run cargo commands
  • Build Test Java workflow should now be able to run java/mvn commands

🤖 Generated with Claude Code

Mossaka and others added 2 commits February 4, 2026 22:22
Add a comprehensive skill that enables Claude Code agents to effectively
use the AWF (Agentic Workflow Firewall) tool for running commands with
network isolation and domain whitelisting.

The skill is available at the repository root (skill.md) for easy access:
https://raw.githubusercontent.com/github/gh-aw-firewall/main/skill.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Recompile build-test-rust and build-test-java workflows with updated
gh-aw that adds:
- Setup Rust action (actions-rust-lang/setup-rust-toolchain)
- CARGO_HOME capture step for Rust
- JAVA_HOME capture step for Java

These environment variable captures are needed because sudo may not
preserve them when running AWF in chroot mode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 4, 2026 22:31
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

💫 TO BE CONTINUED... Smoke Claude was cancelled! Our hero faces unexpected challenges...

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

📰 DEVELOPING STORY: Smoke Copilot reports was cancelled. Our correspondents are investigating the incident...

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 82.08% 82.08% ➡️ +0.00%
Statements 82.12% 82.12% ➡️ +0.00%
Functions 81.95% 81.95% ➡️ +0.00%
Branches 75.41% 75.41% ➡️ +0.00%

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

The compiled gh-aw workflows require the actions/ folder from gh-aw
to be present in the repo. This folder contains the setup scripts
and action definitions needed for workflow execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Build Test: Rust - FAILED ❌

Error: Rust toolchain not installed in the execution environment.

Project Build Tests Status
fd N/A FAILED - cargo not found
zoxide N/A FAILED - cargo not found

Overall: FAIL

Issue

The test environment does not have the Rust toolchain (cargo/rustc) installed. Cannot proceed with build and test operations.

Required Action

Install Rust toolchain via rustup or configure the workflow to use a Rust-enabled container/runner.

AI generated by Build Test Rust

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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 built and tested successfully.

AI generated by Build Test Go

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Smoke Test Results - Claude Engine

GitHub MCP: ✅

Playwright: ✅ (page title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub")

File Writing: ✅ (created /tmp/gh-aw/agent/smoke-test-claude-21690990040.txt)

Bash Tool: ✅ (verified file content)

Status: PASS

AI generated by Smoke Claude

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

github-actions bot commented Feb 4, 2026

Node.js Build Test Results

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

Overall: ✅ PASS

All Node.js build tests completed successfully.

AI generated by Build Test Node.js

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

github-actions bot commented Feb 4, 2026

Smoke Test Results

Last 2 Merged PRs:

✅ GitHub MCP - Retrieved PR data
✅ Playwright - Page title verified ("GitHub · Change is constant. GitHub keeps you ahead. · GitHub")
✅ File Write - Created /tmp/gh-aw/agent/smoke-test-copilot-21690990093.txt
✅ Bash - Verified file content

Overall Status: PASS

cc @Mossaka

AI generated by Smoke Copilot

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Bun Build Test Results

Project Install Tests Status
elysia N/A 0/0 ❌ FAIL
hono N/A 0/0 ❌ FAIL

Overall: ❌ FAIL

Error Details

Both test projects failed with the same error:

bun test v1.3.8 (b64edcb4)
Aborted (core dumped)
Exit code: 134

Root Cause: Bun v1.3.8 is experiencing runtime crashes in the container environment (Ubuntu 24.04, Docker). The test runner aborts with a core dump before executing any tests.

Environment:

  • Bun version: 1.3.8
  • Kernel: 6.11.0-1018-azure (Ubuntu 24.04)
  • Container: Docker (awf-agent)

Next Steps:

  • This appears to be a Bun compatibility issue with the containerized environment
  • Consider testing with a different Bun version or investigating Bun's container support

AI generated by Build Test Bun

The setup-rust-toolchain action doesn't set CARGO_HOME - it uses the
default $HOME/.cargo path. Changed the capture step to unconditionally
set CARGO_HOME=$HOME/.cargo so it's available in AWF chroot mode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Build Test: Java - FAILED ❌

Environment Error: Maven installation is corrupted and cannot execute.

Error: cannot execute binary file: Exec format error

Test Results

Project Compile Tests Status
gson N/A BLOCKED
caffeine N/A BLOCKED

Overall: FAILED

Action Required: Maven needs to be reinstalled or a different runner with working Java toolchain is needed.

AI generated by Build Test Java

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

github-actions bot commented Feb 4, 2026

Rust Build Test Results

Project Build Tests Status
fd ❌ 0/0 FAIL
zoxide ❌ 0/0 FAIL

Overall: FAIL

Error Details

Both projects failed during test compilation with a linker error:

error: linking with `cc` failed: exit status: 1
lld-wrapper: executable has unexpected name: Some("bash")
collect2: error: ld returned 1 exit status

This appears to be an environment issue with the Rust linker configuration. The builds completed successfully, but tests could not be executed due to the linker wrapper error.

AI generated by Build Test Rust

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Smoke Test Results - Claude Engine

✅ GitHub MCP: Listed 2 merged PRs

✅ Playwright: Navigated to github.com, title verified

✅ File Write: Created /tmp/gh-aw/agent/smoke-test-claude-21691231160.txt

✅ Bash Tool: Verified file content

Status: PASS

AI generated by Smoke Claude

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Build Test: Go ✅

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

Overall: PASS

All Go projects built and tested successfully.

AI generated by Build Test Go

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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 built and tested successfully.

AI generated by Build Test Node.js

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

github-actions bot commented Feb 4, 2026

Smoke Test Results

Last 2 Merged PRs:

Tests:

  • ✅ GitHub MCP: Retrieved merged PRs
  • ✅ Playwright: Verified GitHub homepage title
  • ✅ File I/O: Created and verified test file
  • ✅ Bash: Command execution successful

Status: PASS

cc: @Mossaka

AI generated by Smoke Copilot

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Build Test: Bun - FAILED ❌

Status: Bun runtime error - unable to complete tests

Environment

  • Bun version: 1.3.8
  • Repository cloned successfully: ✅
  • Test projects found: ✅ (elysia, hono)

Error

All bun install commands fail with:

error: An internal error occurred (NotDir)

This error occurs even with:

  • Empty package.json
  • Fresh directories
  • Explicit cache directories (BUN_INSTALL_CACHE_DIR)
  • Different commands (bun install, bun add)

Root Cause

This is a known Bun issue in containerized/restricted environments. The "NotDir" error typically indicates Bun is trying to access a file it expects to be a directory (often related to cache paths or HOME directory structure).

Test Results

Project Install Tests Status
elysia ❌ NotDir error N/A BLOCKED
hono ❌ NotDir error N/A BLOCKED

Overall: FAIL - Bun runtime error prevents testing

AI generated by Build Test Bun

Copy link

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

The actions folder should come from the gh-aw release, not be copied
into this repo. The compiled workflows reference github/gh-aw/actions/setup@...
which fetches directly from the gh-aw repository.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

Recompiled build-test-rust and build-test-java workflows using the
released gh-aw v0.42.0 binary. This ensures the workflows use remote
action references (github/gh-aw/actions/setup@SHA) instead of local
paths (./actions/setup), removing the need for a local actions folder.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

⚠️ Security scanning failed for Smoke Copilot. Review the logs for details.

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Smoke Test Results (Claude)

Last 2 merged PRs:

  • feat: add AWF agent skill for Claude Code agents
  • fix: add auth and error handling to build-test workflows

Test Results:

  • ✅ GitHub MCP: Retrieved PRs
  • ✅ Playwright: GitHub page title verified
  • ✅ File Write: Created test file
  • ✅ Bash: Verified file contents

Overall Status: PASS

AI generated by Smoke Claude

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