Skip to content

fix: demote benign rootless cleanup errors - #6939

Merged
lpcox merged 4 commits into
mainfrom
fix-rootless-cleanup-diagnostics
Aug 4, 2026
Merged

fix: demote benign rootless cleanup errors#6939
lpcox merged 4 commits into
mainfrom
fix-rootless-cleanup-diagnostics

Conversation

@lpcox

@lpcox lpcox commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reuse the rootless artifact permission-error classifier for direct cleanup chmod failures
  • demote expected EPERM/EACCES cleanup failures to concise debug output
  • retain warnings for unexpected cleanup failures
  • verify cleanup leaves the primary startup error as the last prominent diagnostic

Fixes #6934

Copilot AI and others added 3 commits August 4, 2026 21:20
Reuse the rootless artifact permission classification for direct cleanup chmod failures.

Add coverage for diagnostic ordering and unexpected failures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 4, 2026 22:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Demotes benign rootless cleanup permission errors so primary startup failures remain prominent.

Changes:

  • Adds a reusable permission-error classifier.
  • Uses debug logging for expected cleanup failures.
  • Adds regression coverage for benign and unexpected failures.
Show a summary per file
File Description
src/artifact-preservation.ts Classifies cleanup chmod failures.
src/artifact-preservation-errors.test.ts Tests cleanup diagnostic behavior.
src/artifact-permissions.ts Introduces the shared error classifier.

Review details

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread src/artifact-permissions.ts Outdated
Comment on lines +35 to +37
return /(?:^|\n)(?:chown|chmod):.*(?:operation not permitted|permission denied|\bEPERM\b|\bEACCES\b)/i.test(
details.join('\n'),
);
Comment on lines +95 to +101
if (isBenignArtifactPermissionError(error)) {
logger.debug(
`${permissionErrorMessage} Permission repair was denied for ${targetDir}; ` +
'this is expected on restricted runners and does not affect the run.',
);
} else {
logger.warn(permissionErrorMessage, error);
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

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

Overall Coverage

Metric Base PR Delta
Lines 98.94% 98.97% 📈 +0.03%
Statements 98.83% 98.85% 📈 +0.02%
Functions 99.19% 99.19% ➡️ +0.00%
Branches 95.16% 95.14% 📉 -0.02%
📁 Per-file Coverage Changes (3 files)
File Lines (Before → After) Statements (Before → After)
src/artifact-preservation.ts 96.3% → 96.3% (+0.07%) 96.3% → 96.4% (+0.07%)
src/artifact-permissions.ts 97.4% → 97.9% (+0.48%) 97.4% → 97.9% (+0.48%)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

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

@lpcox

lpcox commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot address review feedback

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Contribution Check completed successfully!

PR #6939 follows CONTRIBUTING.md on code style, docs, PR description, and file organization. The patch includes targeted tests for the new cleanup diagnostic behavior, and the PR description references Fixes #6934. No guideline issues to report.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

test

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing reports failed. OTel tracing regression detected. ⚠️

Smoke test OTEL tracing - all scenarios pass: (1) otel.js loads cleanly, exports startRequestSpan/setTokenAttributes/setBudgetAttributes/endSpan/isEnabled etc.; (2) test suite 61/61 passed (otel.test.js + otel-fanout.test.js); (3) env var forwarding confirmed - env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/PARENT_SPAN_ID to agent, api-proxy-env-config.ts buildOtelEnv() forwards OTLP endpoint/headers/trace context to api-proxy container; (4) onUsage callback confirmed present in token-tracker-http.js as OTEL hook point; (5) diagnostics step output not independently re-verified beyond above, no unexpected failures found. Overall: PASS.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

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

Overall Coverage

Metric Base PR Delta
Lines 98.94% 98.96% 📈 +0.02%
Statements 98.83% 98.84% 📈 +0.01%
Functions 99.19% 99.19% ➡️ +0.00%
Branches 95.16% 95.13% 📉 -0.03%
📁 Per-file Coverage Changes (3 files)
File Lines (Before → After) Statements (Before → After)
src/artifact-preservation.ts 96.3% → 95.5% (-0.77%) 96.3% → 95.5% (-0.76%)
src/artifact-permissions.ts 97.4% → 98.0% (+0.52%) 97.4% → 98.0% (+0.52%)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Network Isolation Egress

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed domain (api.github.com): allowed=200
  • ✅ Blocked domain (example.com): CONNECT tunnel failed (403) — blocked as expected

Overall status: PASS

cc @lpcox

Warning

Firewall blocked 1 domain

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

  • example.com

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

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine@lpcox

Overall: PASS

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com

Overall: PASS

cc @lpcox

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results:

  • Redis PING: ❌ (DNS resolution failure for host.docker.internal)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (DNS resolution failure)

Overall: FAILhost.docker.internal could not be resolved from the sandbox.

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results

  1. GitHub MCP Testing: ❌ (Access denied to PR data)
  2. GitHub.com Connectivity: ❌ (Connection failed)
  3. File Writing Testing: ✅
  4. Bash Tool Testing: ✅

Overall Status: FAIL

Last 2 PRs identified: #6935, #6928 (Titles unavailable due to secrecy policy)

💎 Faceted by Smoke Gemini
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Result
API Status ✅ PASS
GH Check ✅ PASS
File Status ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #6939 · haiku45 · 61.4 AIC · ⊞ 3.6K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke test summary

  • [Test Coverage] src/docker-manager.ts - ✅
  • chore: upgrade gh-aw to v0.84.3 pre-release and recompile workflows - ✅
  • fix: demote benign rootless cleanup errors - ✅
  • GitHub title check - ✅
  • File write/read - ✅
  • Discussion query/comment - ⚠️ unavailable
  • npm ci && npm run build - ❌ (npm not found)

Overall: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.13 ✅ YES
Node.js v24.18.0 v22.23.1 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: FAILED — Node.js version differs between host and chroot environment. smoke-chroot label was not added since not all tests passed.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

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 (ran OK) ✅ PASS
.NET json-parse N/A (ran OK) ✅ PASS
Go color pkg tests ok ✅ PASS
Go env pkg tests ok ✅ PASS
Go uuid pkg tests ok ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx passed ✅ PASS
Node.js execa passed ✅ PASS
Node.js p-limit passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — PASS

Notes:

  • Java builds initially failed with Could not create local repository at /home/runner/.m2/repository (pre-existing root-owned ~/.m2 directory in this environment, unrelated to network/firewall). Worked around with -Dmaven.repo.local=<writable path>; Maven proxy settings for Squid worked correctly.
  • No network/firewall-related failures observed across any ecosystem.

Generated by Build Test Suite for #6939 · auto · 41.9 AIC · ⊞ 11.5K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Docker Sbx@lpcox

Overall: PASS

📰 BREAKING: Report filed by Smoke Docker Sbx
Add label ready-for-aw to run again

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.

Rootless cleanup chmod warning obscures the primary AWF startup failure

3 participants