Skip to content

🏥 CI FailureIntegration Tests: multiple suite failures after "fix issues, remove workflows" commit #1102

@github-actions

Description

@github-actions

Summary

The Integration Tests workflow failed on commit 3aa408c ("fix issues, remove workflows" by @dsyme) with 43 test failures across 10 suites in 3 parallel jobs.


Failing Jobs

Job Test Suites Failed Tests Failed
Protocol & Security Tests 3 of 5 20 of 55
Container & Ops Tests 5 of 7 16 of 66
API Proxy Tests 2 of 3 7 of 27
Domain & Network Tests cancelled (upstream failure)

Failure Analysis

1. container-workdir.test.ts — Chroot Mode WORKDIR Mismatch

Error:

expect(result.stdout.trim()).toContain('/workspace');
                              ^
at container-workdir.test.ts:39
```

**Root Cause:** The test expects `pwd` to return `/workspace` (the Dockerfile's default `WORKDIR`), but in chroot mode the working directory is set to the host user's home (`/home/runner`). The test was written assuming non-chroot mode behavior. The entrypoint logs confirm:
```
[entrypoint] Chroot working directory: /home/runner
/home/runner   ← actual pwd output
```

**Suites affected:** `container-workdir`

---

### 2. `protocol-support.test.ts` — curl Returns 403 from api.github.com

**Error:**
```
curl: (22) The requested URL returned error: 403
[DEBUG] Agent exit code: 22
expect(result).toSucceed();  ← at protocol-support.test.ts:128
```

**Root Cause:** A test (likely "should pass User-Agent header") that runs `curl -fsS -H "Accept: application/json" https://api.github.com/zen` is receiving a 403. This indicates either a GitHub API rate-limit on the CI runner, or a proxy/header configuration issue introduced by the recent commit.

**Suites affected:** `protocol-support`, `credential-hiding`, `one-shot-tokens` (and possibly others)

---

### 3. `api-proxy-rate-limit.test.ts` — `rate_limit_rejected_total` Missing from Metrics

**Error:**
```
{"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"},"request_id":"req_011CYZS1sooSU88L27xeq8HX"}
expect(result.stdout).toContain('rate_limit_rejected_total');
                       ^
at api-proxy-rate-limit.test.ts:237
```

**Root Cause:** The rate limit test is getting a genuine authentication error (`invalid x-api-key`) from the upstream API rather than being rate-limited by the proxy, so the `rate_limit_rejected_total` counter is never incremented. This could be a test logic issue (the test may need a fake/mock API key) or the proxy is not returning the rejection before forwarding to the upstream.

**Suites affected:** `api-proxy-rate-limit`, `api-proxy-observability`

---

### 4. Secondary: Cleanup Permission Errors

Multiple `rm: cannot remove` errors during cleanup of chroot home directories:
```
rm: cannot remove '/tmp/awf-cmd-1.sh': Operation not permitted
rm: cannot remove '/tmp/awf-lib/one-shot-token.so': Permission denied
rm: cannot remove '/tmp/awf-1772234676021-chroot-home/.ssh/id_rsa': Permission denied

These are non-fatal (cleanup script continues) but indicate files owned by root are not being cleaned up properly.


Recommended Actions

  1. container-workdir.test.ts: Fix the test to either:

    • Run in non-chroot mode when testing container WORKDIR behavior, OR
    • Update the assertion to match chroot mode behavior (working dir = host user's home ~/)
    • The test comment says "Default WORKDIR in Dockerfile is /workspace" — this is not the right expectation for chroot mode
  2. protocol-support.test.ts: Investigate whether the recent commit changed proxy header forwarding. Re-run to check if this is a transient GitHub API rate-limit or a real regression. Check if --ssl-bump or header modification logic changed.

  3. api-proxy-rate-limit.test.ts: The test relies on an auth rejection to trigger rate limiting behavior, but the counter only increments for proxy-level rate limit rejections. Verify the test setup properly triggers the rate limiter before forwarding upstream.

  4. Cleanup permissions: The cleanup.sh script should use sudo rm -rf for chroot home directories since some files are created as root.


Related


🏥 Automatically investigated by CI Doctor

Generated by CI Doctor

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingci

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions