diff --git a/.github/workflows/smoke-codex.md b/.github/workflows/smoke-codex.md index 641d109b..b09e819c 100644 --- a/.github/workflows/smoke-codex.md +++ b/.github/workflows/smoke-codex.md @@ -88,7 +88,7 @@ post-steps: - Use the `github-discussion-query` safe-input tool with params: `limit=1, jq=".[0]"` to get the latest discussion from ${{ github.repository }} - Extract the discussion number from the result (e.g., if the result is `{"number": 123, "title": "...", ...}`, extract 123) - Use the `add_comment` tool with `discussion_number: ` to add a mystical, oracle-themed comment stating that the smoke test agent was here -8. **Build AWF**: Run `npm ci && npm run build` to verify the agent can successfully build the AWF project. If the command fails, mark this test as ❌ and report the failure. +8. **Build AWF**: Run `npm run build` to verify the agent can successfully build the AWF project (node_modules is already installed). If the command fails, mark this test as ❌ and report the failure. ## Output diff --git a/src/docker-manager.test.ts b/src/docker-manager.test.ts index 02fb6fcb..64db4937 100644 --- a/src/docker-manager.test.ts +++ b/src/docker-manager.test.ts @@ -1485,10 +1485,11 @@ describe('docker-manager', () => { expect(agent.healthcheck?.test[0]).toBe('CMD-SHELL'); // Check that the healthcheck verifies base paths (mcp-logs and workDir) are empty expect(agent.healthcheck?.test[1]).toContain('/tmp/gh-aw/mcp-logs'); - expect(agent.healthcheck?.test[1]).toContain('/host/tmp/gh-aw/mcp-logs'); expect(agent.healthcheck?.test[1]).toContain(mockConfig.workDir); - expect(agent.healthcheck?.test[1]).toContain(`/host${mockConfig.workDir}`); expect(agent.healthcheck?.test[1]).toContain('ls -A'); + // Should NOT include host paths since they contain files at startup time + expect(agent.healthcheck?.test[1]).not.toContain('/host/tmp/gh-aw/mcp-logs'); + expect(agent.healthcheck?.test[1]).not.toContain(`/host${mockConfig.workDir}`); }); it('should include ghAwSetupDir paths in healthcheck when specified', () => { @@ -1502,7 +1503,8 @@ describe('docker-manager', () => { // Agent should have healthcheck with all paths expect(agent.healthcheck).toBeDefined(); expect(agent.healthcheck?.test[1]).toContain('/home/runner/setup-gh-aw'); - expect(agent.healthcheck?.test[1]).toContain('/host/home/runner/setup-gh-aw'); + // Should NOT include host path since it may contain files at startup time + expect(agent.healthcheck?.test[1]).not.toContain('/host/home/runner/setup-gh-aw'); // Should also contain base paths expect(agent.healthcheck?.test[1]).toContain('/tmp/gh-aw/mcp-logs'); expect(agent.healthcheck?.test[1]).toContain(mockConfig.workDir); diff --git a/src/docker-manager.ts b/src/docker-manager.ts index a76272aa..52d5d0f0 100644 --- a/src/docker-manager.ts +++ b/src/docker-manager.ts @@ -909,17 +909,16 @@ export function generateDockerCompose( // Add healthcheck to verify all tmpfs mounts that should be empty are working correctly // This validates the tmpfs overlays are functioning properly as a security measure + // Only check container-visible paths (not host paths via /host) since the workDir + // and mcp-logs directories on the host contain files before the container starts. const pathsToCheck: string[] = [ '/tmp/gh-aw/mcp-logs', - '/host/tmp/gh-aw/mcp-logs', config.workDir, - `/host${config.workDir}`, ]; - // Add GH_AW_SETUP_DIR paths if configured + // Add GH_AW_SETUP_DIR path if configured if (config.ghAwSetupDir) { pathsToCheck.push(config.ghAwSetupDir); - pathsToCheck.push(`/host${config.ghAwSetupDir}`); } // Build healthcheck command to verify all paths are empty diff --git a/src/pid-tracker.test.ts b/src/pid-tracker.test.ts index 25a6c188..f2f01c9b 100644 --- a/src/pid-tracker.test.ts +++ b/src/pid-tracker.test.ts @@ -538,7 +538,9 @@ describe('pid-tracker', () => { const pid = process.pid; const info = getProcessInfo(pid); expect(info).not.toBeNull(); - expect(info!.comm).toContain('node'); + // comm should be a non-empty string; may vary by environment + // (e.g., 'node' on standard Linux, 'MainThread' in some containers) + expect(info!.comm.length).toBeGreaterThan(0); }); } });