Skip to content

fix(ci): resolve integration test suite failures on main#1151

Open
Mossaka wants to merge 5 commits intomainfrom
fix/integration-test-suite
Open

fix(ci): resolve integration test suite failures on main#1151
Mossaka wants to merge 5 commits intomainfrom
fix/integration-test-suite

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Mar 5, 2026

Summary

Fixes three groups of integration test failures in test-integration-suite.yml that have been failing on main since the workflow was added on Feb 26.

Volume Mounts (source code fix)

  • Custom --mount paths (e.g., /tmp/test:/data:ro) were invisible inside the agent container because chroot mode (always enabled) does chroot /host, making paths not under /host inaccessible
  • Fix: docker-manager.ts now prefixes custom mount container paths with /host (e.g., /data becomes /host/data) so they're accessible after chroot

API Proxy Tests (test fixes)

  • JSON.parse(result.stdout) and header assertions failed because stdout contained Docker build output mixed with actual curl output when --build-local is used
  • Fix: Added extractLastJson() and extractCommandOutput() helpers in tests/fixtures/stdout-helpers.ts to isolate command output from Docker build noise. Converted header-based assertions (curl -i) to use JSON response body instead

One-Shot Token Tests (source code + test fixes)

  • AWF_ONE_SHOT_TOKEN_DEBUG env var was not forwarded to the container, so [one-shot-token] debug log assertions always failed
  • COPILOT_GITHUB_TOKEN was never forwarded to the container in non-api-proxy mode
  • Python inline scripts used single quotes inside single-quoted bash commands, causing shell syntax errors with parentheses in comments
  • NORMAL_VAR tests used options.env which doesn't reach the container; needed cliEnv (explicit -e flags)
  • Fix: Forward AWF_ONE_SHOT_TOKEN_DEBUG and COPILOT_GITHUB_TOKEN in docker-manager.ts, use heredoc for Python scripts, use cliEnv for non-sensitive vars

Test plan

  • Unit tests pass locally (821/821)
  • TypeScript compiles without errors
  • Integration test suite CI workflow passes (volume-mounts, api-proxy, one-shot-tokens)
  • No regressions in other integration test groups

🤖 Generated with Claude Code

Three groups of integration test failures fixed:

1. **Volume Mounts** (docker-manager.ts): Custom --mount paths were not
   visible inside the agent container because chroot mode (always enabled)
   does `chroot /host`, making paths like /data invisible. Fixed by
   prefixing the container path with /host (e.g., /data -> /host/data)
   so mounts are accessible after chroot.

2. **API Proxy Tests** (observability + rate-limit): Tests used
   JSON.parse(result.stdout) and header assertions, but stdout contained
   Docker build output mixed with curl output when --build-local is used.
   Added extractLastJson() and extractCommandOutput() helpers to isolate
   actual command output from Docker build noise. Converted header-based
   assertions to use JSON response body instead of curl -i headers.

3. **One-Shot Token Tests**: Multiple issues fixed:
   - AWF_ONE_SHOT_TOKEN_DEBUG env var was not forwarded to the container,
     so debug log assertions always failed. Added forwarding in docker-manager.
   - COPILOT_GITHUB_TOKEN was never forwarded to the container in non-api-proxy
     mode, causing token caching tests to fail. Added to selective forwarding.
   - Python inline scripts used single quotes inside single-quoted bash commands,
     causing shell syntax errors. Converted to heredoc syntax.
   - NORMAL_VAR tests used options.env which doesn't reach the container;
     switched to cliEnv which uses explicit -e flags.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 5, 2026 18:34
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.

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 82.03% 82.18% 📈 +0.15%
Statements 82.01% 82.12% 📈 +0.11%
Functions 82.50% 82.50% ➡️ +0.00%
Branches 74.20% 74.03% 📉 -0.17%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 83.1% → 83.7% (+0.55%) 82.4% → 82.8% (+0.40%)

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Build Test: Node.js Results

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

Overall: ✅ PASS

Generated by Build Test Node.js for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

.NET Build Test Results

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

Overall: PASS

Run output

hello-world:

Hello, World!
```

**json-parse:**
```
{
  "Name": "AWF Test",
  "Version": 1,
  "Success": true
}
Name: AWF Test, Success: True

Generated by Build Test .NET for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Build Test: Deno ✅

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

Overall: PASS

Deno version: 2.7.4

Generated by Build Test Deno for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

C++ Build Test Results

Project CMake Build Status
fmt PASS
json PASS

Overall: PASS 🎉

Generated by Build Test C++ for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🧪 Bun Build Test Results

Project Install Tests Status
elysia 1/1 PASS
hono 1/1 PASS

Overall: ✅ PASS

Bun v1.3.10 — all tests passed successfully.

Generated by Build Test Bun for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

PR titles: fix(test): resolve integration test suite failures on main; fix: speed up firewall shutdown by ~10s
GitHub MCP 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 status: FAIL

🔮 The oracle has spoken through Smoke Codex for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Smoke Test Results — Run #22731026835

✅ GitHub MCP — Last 2 merged PRs: #1078 "fix: add explicit execute directive to smoke-codex to prevent noop", #1070 "chore: investigate issue duplication detector workflow failure"
✅ Playwright — github.com title contains "GitHub"
✅ File Write — /tmp/gh-aw/agent/smoke-test-copilot-22731026835.txt created
✅ Bash — File verified via cat

Overall: PASS | PR by @Mossaka

📰 BREAKING: Report filed by Smoke Copilot for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Rust Build Test Results

Project Build Tests Status
fd 1/1 PASS
zoxide 1/1 PASS

Overall: PASS

Generated by Build Test Rust for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Java Build Test Results

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

Overall: ✅ PASS

All projects compiled and tested successfully against Maven Central via the AWF proxy.

Generated by Build Test Java for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Chroot Version Comparison Results

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

Result: Tests did not fully pass — Python and Node.js versions differ between host and chroot environments.

Tested by Smoke Chroot for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Go Build Test Results

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

Overall: PASS

Generated by Build Test Go for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Smoke test results (run 22731026947)

✅ GitHub MCP — #1003: chore(deps): bump all-npm-dependencies; #1078: fix: add explicit execute directive to smoke-codex
✅ Playwright — github.com title contains "GitHub"
✅ File write — /tmp/gh-aw/agent/smoke-test-claude-22731026947.txt created
✅ Bash verify — file contents confirmed

Overall: PASS

💥 [THE END] — Illustrated by Smoke Claude for issue #1151

@Mossaka Mossaka changed the title fix(test): resolve integration test suite failures on main fix(ci): resolve integration test suite failures on main Mar 5, 2026
- npm audit fix for minimatch ReDoS (GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74)
- npm audit fix --force for svgo DoS (GHSA-xpqw-6gx7-v673) in docs-site
- Remaining 4 moderate lodash vulnerabilities require breaking @astrojs/check upgrade

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 82.03% 82.18% 📈 +0.15%
Statements 82.01% 82.12% 📈 +0.11%
Functions 82.50% 82.50% ➡️ +0.00%
Branches 74.20% 74.03% 📉 -0.17%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 83.1% → 83.7% (+0.55%) 82.4% → 82.8% (+0.40%)

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Go Build Test Results ✅

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

Overall: PASS

Generated by Build Test Go for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🧪 Build Test: Bun

Project Install Tests Status
elysia 1/1 PASS
hono 1/1 PASS

Overall: ✅ PASS

Bun version: 1.3.10

Generated by Build Test Bun for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

fix: add explicit execute directive to smoke-codex to prevent noop
fix(deps): resolve high-severity rollup vulnerability in docs-site
fix(ci): resolve integration test suite failures on main
fix: speed up firewall shutdown by ~10s
Tests: GitHub MCP ✅, safeinputs-gh ✅, Playwright ✅, Tavily ❌, File ✅, Bash ✅, Discussion ✅, Build ✅
Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Java Build Test Results ☕

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

Overall: PASS

All Java projects compiled and passed their tests successfully via Maven (using Squid proxy at 172.30.0.10:3128).

Generated by Build Test Java for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Chroot Version Comparison Results

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

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

Tested by Smoke Chroot for issue #1151

…ll escaping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Build Test: Deno ✅

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

Overall: PASS

Deno 2.7.4 · All 2 tests passed

Generated by Build Test Deno for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Build Test: Bun Results ✅

Project Install Tests Status
elysia 1/1 PASS
hono 1/1 PASS

Overall: PASS

Bun version: 1.3.10

Generated by Build Test Bun for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Build Test: Node.js ✅

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

Overall: PASS

Generated by Build Test Node.js for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Go Build Test Results

Project Download Tests Status
color PASS ✅ PASS
env PASS ✅ PASS
uuid PASS ✅ PASS

Overall: ✅ PASS

Generated by Build Test Go for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🔬 Smoke test results for @Mossaka (no assignees):

Overall: PASS

📰 BREAKING: Report filed by Smoke Copilot for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Rust Build Test Results

Project Build Tests Status
fd 1/1 PASS
zoxide 1/1 PASS

Overall: ✅ PASS

Generated by Build Test Rust for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

.NET Build Test Results

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

Overall: PASS

Run Output

hello-world:

Hello, World!
```

**json-parse:**
```
{
  "Name": "AWF Test",
  "Version": 1,
  "Success": true
}
Name: AWF Test, Success: True

Generated by Build Test .NET for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

PRs: fix(squid): run Squid container as non-root user; fix(deps): resolve minimatch ReDoS and ajv vulnerabilities
GitHub MCP (last 2 merged PRs) ✅
Safeinputs GH PR list ✅
Playwright title contains GitHub ✅
Tavily web search ❌ (tool unavailable)
File write + cat ✅
Discussion query + comment ✅
Build (npm ci && npm run build) ✅
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Java Build Test Results

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

Overall: PASS

Generated by Build Test Java for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Smoke Test Results — PASS

💥 [THE END] — Illustrated by Smoke Claude for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Chroot Version Comparison Results

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

Result: ❌ Not all versions match — the chroot environment uses different Python and Node.js versions than the host runner.

Tested by Smoke Chroot for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

C++ Build Test Results

Project CMake Build Status
fmt PASS
json PASS

Overall: PASS

Generated by Build Test C++ for issue #1151

The X-Request-ID injection test checked that stdout doesn't contain
'<script>', but container entrypoint logs in stdout can contain
angle brackets. Instead, verify the x-request-id response header
contains a valid UUID (proving the proxy rejected the injected value).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

C++ Build Test Results

Project CMake Build Status
fmt PASS
json PASS

Overall: PASS

Generated by Build Test C++ for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Smoke Test Results

Overall: PASS

💥 [THE END] — Illustrated by Smoke Claude for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🟢 Build Test: Go — PASS

Project Download Tests Status
color PASS ✅ PASS
env PASS ✅ PASS
uuid PASS ✅ PASS

Overall: PASS — All 3 projects built and tested successfully.

Generated by Build Test Go for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Smoke Test Results@Mossaka

✅ GitHub MCP: Last 2 merged PRs retrieved

✅ Playwright: github.com title contains "GitHub"
✅ File Write: /tmp/gh-aw/agent/smoke-test-copilot-22733677960.txt created
✅ Bash: File verified via cat

Overall: PASS

📰 BREAKING: Report filed by Smoke Copilot for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Node.js Build Test Results

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

Overall: ✅ PASS

Generated by Build Test Node.js for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

fix(security): eliminate TOCTOU race conditions in ssl-bump.ts
fix(security): stop logging partial token values
GitHub MCP review (last 2 merged PRs): ✅
safeinputs-gh PR list: ✅
Playwright title contains GitHub: ✅
Tavily search: ❌ (tool unavailable)
file write + cat: ✅
discussion comment: ✅
npm ci && npm run build: ✅
Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Bun Build Test Results

Project Install Tests Status
elysia 1/1 PASS
hono 1/1 PASS

Overall: PASS

Tested with Bun v1.3.10

Generated by Build Test Bun for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

.NET Build Test Results

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

Overall: PASS

Run output

hello-world: Hello, World!

json-parse:

{
  "Name": "AWF Test",
  "Version": 1,
  "Success": true
}
Name: AWF Test, Success: True

Generated by Build Test .NET for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🦕 Deno Build Test Results

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

Overall: ✅ PASS

Generated by Build Test Deno for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Java Build Test Results ✅

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

Overall: PASS

Generated by Build Test Java for issue #1151

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Chroot Version Comparison Results

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

Result: FAILED — Python and Node.js versions differ between host and chroot environments.

Tested by Smoke Chroot for issue #1151

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