Skip to content

Document new Squid DNS and log-permission failure modes - #8290

Merged
lpcox merged 11 commits into
mainfrom
copilot/update-runner-doctor-lessons
Sep 7, 2026
Merged

Document new Squid DNS and log-permission failure modes#8290
lpcox merged 11 commits into
mainfrom
copilot/update-runner-doctor-lessons

Conversation

Copilot AI commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Adds runner-doctor guidance for two recurring self-hosted runner failures:

  • B32 — Squid DNS caching: transient SERVFAIL responses were replayed by Squid’s default 60-second negative DNS cache.
  • B33 — Squid log ownership: UID-13-owned logs caused diagnostic and artifact-preservation EACCES/EPERM errors.

Changes

  • Added B32 and B33 to the shared failure-mode catalog.
  • Mirrored both entries in the portable runner-doctor agent.
  • Added matching quick-lookup entries to the workflow and portable playbooks.
  • Extended alignment coverage to require the new entries and citations.

Example diagnostic signals now covered:

403/DNS SERVFAIL for api.github.com across repeated runs → B32
Could not check Squid logs: EACCES ... access.log → B33

Copilot AI and others added 2 commits September 7, 2026 19:13
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Add 2 new self-hosted failure-mode lessons to Runner Doctor Document new Squid DNS and log-permission failure modes Sep 7, 2026
Copilot AI requested a review from lpcox September 7, 2026 19:16
@lpcox
lpcox marked this pull request as ready for review September 7, 2026 19:54
Copilot AI balanced review requested due to automatic review settings September 7, 2026 19:54

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.

🟡 Changes recommended

The documentation records an incorrect DNS timeout and inaccurately describes the previous Squid log repair.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds runner-doctor guidance for Squid DNS caching and log-permission failures.

Changes:

  • Documents B32 and B33 failure modes.
  • Mirrors diagnostic guidance in workflow and portable playbooks.
  • Extends alignment tests for both entries.
File summaries
File Description
.github/workflows/shared/self-hosted-failure-modes.md Adds canonical B32/B33 guidance.
.github/workflows/self-hosted-runner-doctor.md Adds quick-lookup entries.
.github/agents/self-hosted-runner-doctor.md Mirrors catalog and lookup updates.
scripts/ci/self-hosted-runner-doctor-workflow.test.ts Adds alignment assertions.
Review details

Suppressed comments (2)

.github/workflows/shared/self-hosted-failure-modes.md:138

  • The quick lookup repeats the inaccurate claim that an ownership repair existed before #8251. The previous shutdown helper only changed mode bits; #8251 added the chown that transfers ownership to the runner.
| `[DEBUG] Could not check Squid logs: EACCES ... access.log` mid-run, or `[DEBUG] Could not preserve squid logs: chmod ... Operation not permitted` during artifact preservation, even though logs are intact | B33 (Squid log ownership repair only ran at shutdown; fixed in github/gh-aw-firewall#8251 with reusable pre-diagnostic `chown`+`chmod` repair) |

.github/agents/self-hosted-runner-doctor.md:321

  • The old repair was not an ownership repair: it only ran chmod, and #8251 added the runner-UID chown. The current wording hides the reason artifact preservation still encountered EPERM.
| B33 | `[DEBUG] Could not check Squid logs: EACCES ... access.log` during diagnostics, or `[DEBUG] Could not preserve squid logs: chmod ... Operation not permitted` during artifact preservation, although logs are intact | Squid writes logs as UID 13; ownership repair previously ran only at shutdown, after mid-run diagnostics and before the preservation `chmod` | **Fixed in AWF (PR github/gh-aw-firewall#8251, merged 2026-09-07):** reusable `fixSquidLogPermissions()` now `chown`s to the runner UID/GID via `docker exec -e` and `chmod`s; `runAgentCommand()` repairs permissions before `checkSquidLogs()`, and preserved-log `chmod` is reported separately after rename. Upgrade AWF to include github/gh-aw-firewall#8251. | Trigger a blocked-domain or upstream-error diagnostic and confirm `access.log` is readable; after the run, `ls -la <preserved-squid-logs-dir>` should show runner-UID ownership and no `Could not check Squid logs`/`Could not preserve squid logs` messages | github/gh-aw-firewall#8249, github/gh-aw-firewall#8251 |
  • Files reviewed: 4/4 changed files
  • Comments generated: 8
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/ci/self-hosted-runner-doctor-workflow.test.ts
Comment thread .github/agents/self-hosted-runner-doctor.md Outdated
Comment thread .github/agents/self-hosted-runner-doctor.md Outdated
Comment thread .github/workflows/self-hosted-runner-doctor.md Outdated
| B30 | AWF-sandbox workflows fail before Squid starts (for example from a bad bind-mount spec), leaving no Squid `access.log`; `awf logs summary`/`awf logs stats` report only "no log sources found" | AWF had no mechanism to preserve startup-phase failure detail when containers never produced Squid logs, so the underlying cause was lost | **Fixed in AWF (PR github/gh-aw-firewall#8023, merged 2026-09-02):** AWF writes a redacted `awf-startup-error.json` (timestamp, phase, failure message) into the proxy logs directory on startup abort; log discovery recognizes it via `AWF_LOGS_DIR` and preserved `/tmp/squid-logs-*` discovery, and stats/summary include the diagnostic. Upgrade AWF to include github/gh-aw-firewall#8023. | After a pre-egress failure, check the preserved proxy-logs directory for `awf-startup-error.json`; run `awf logs summary` and confirm it surfaces the startup diagnostic | github/gh-aw-firewall#8014, github/gh-aw-firewall#8023 |

| B31 | Under `sandbox.agent.runtime: docker-sudo-iptables`, a toolchain version selected via a setup action (e.g. `ruby/setup-ruby` choosing Ruby 3.4.8) is shadowed by the system-installed version (e.g. `/usr/bin/ruby` 3.2.3) inside the AWF agent container, even though `--env-all`/`AWF_HOST_PATH` capture is active | `docker-sudo-iptables` invoked AWF via `sudo -E awf ...`; sudoers' `secure_path` could silently overwrite the runner's `$GITHUB_PATH`-augmented `PATH` before AWF observed `process.env.PATH`, losing hosted-toolcache bin-dir precedence | **Fixed in gh-aw (PR github/gh-aw#58625, merged 2026-09-05):** privileged AWF startup preserves the caller `PATH`. AWF's `readGitHubPathEntries()`/`recoverHostPaths()` recovery remains defense in depth, and merged PR github/gh-aw-firewall#8173 adds regression coverage in `src/services/agent-environment/host-path-recovery.test.ts`; no AWF production-code change was needed. | Confirm the setup-action hosted-toolcache bin dir remains ahead of `/usr/bin` in `AWF_HOST_PATH` under `docker-sudo-iptables`; if it does not, this is a regression. | github/gh-aw#58458, github/gh-aw#58625, github/gh-aw-firewall#8141, github/gh-aw-firewall#8173 |
| B32 | A repeated/persistent-runner workflow intermittently blocks allowlisted `api.github.com`/`github.com` traffic with `403` or DNS `SERVFAIL`, recurring across otherwise-healthy runs | Squid's default `negative_dns_ttl` is 1 minute, so one transient upstream `SERVFAIL` is negatively cached and replayed for up to 60 seconds even after DNS recovers | **Fixed in AWF (PR github/gh-aw-firewall#8171, merged 2026-09-05):** `generateDnsSection()` emits `negative_dns_ttl 1 seconds` and `dns_timeout 5 seconds`. Upgrade AWF to include github/gh-aw-firewall#8171. | Inspect generated `squid.conf` for `negative_dns_ttl 1 seconds`, `dns_timeout 5 seconds`, and `dns_nameservers`; correlate Squid `TCP_DENIED`/SERVFAIL bursts with concurrent startup or resolver load on unpatched AWF | github/gh-aw-firewall#8168, github/gh-aw-firewall#8171 |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in commit 53717a1: aligned the shared and portable runner-doctor guidance with negative_dns_ttl 1 seconds, dns_retransmit_interval 1 seconds, and dns_timeout 10 seconds, corrected the pre-#8251 repair to chmod-only, and strengthened the alignment assertions. The targeted test passes.

Comment thread .github/workflows/shared/self-hosted-failure-modes.md Outdated
Comment thread scripts/ci/self-hosted-runner-doctor-workflow.test.ts Outdated
Comment thread scripts/ci/self-hosted-runner-doctor-workflow.test.ts Outdated
lpcox and others added 2 commits September 7, 2026 13:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

lpcox and others added 5 commits September 7, 2026 13:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lpcox

lpcox commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot address this feedback #8290 (comment)

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 94.03% 94.05% 📈 +0.02%
Statements 92.70% 92.71% ➡️ +0.01%
Functions 93.33% 93.33% ➡️ +0.00%
Branches 86.62% 86.63% ➡️ +0.01%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/enclave/delegation-control-client.ts 94.6% → 94.5% (-0.08%) 94.3% → 94.2% (-0.08%)
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 Sep 7, 2026

Copy link
Copy Markdown
Contributor

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

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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

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

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Docker Sbx reports failed. Our correspondents are investigating the incident...

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude failed

Warning

Firewall blocked 1 domain

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

  • api.anthropic.com

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

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8290

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

Generated by Build Test Suite for #8290

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode

All tests passed

Status: PASS — Direct BYOK mode (COPILOT_PROVIDER_API_KEY) operational

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

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@lpcox Smoke test: Copilot network isolation egress enforcement

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (github.com) reachable: allowed=200
✅ Blocked domain (example.com) denied: CONNECT tunnel failed 403

Overall: PASS

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 Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Services Connectivity

  • Redis PING: ✅ (PONG)
  • Postgres pg_isready: ✅ (accepting connections)
  • Postgres SELECT 1: ✅ (1)

Overall: PASS

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

@github-actions github-actions Bot added smoke-copilot-network-isolation Copilot network-isolation egress smoke test smoke-services labels Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine — ✅ PASS

  • ✅ GitHub MCP connectivity (fetched PR data live)
  • ✅ GitHub.com connectivity (HTTP 200)
  • ✅ File write/read test

Recent merged PRs checked:

Overall: PASS

cc @lpcox

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

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@lpcox @Copilot
fix: send delegation TTLs in seconds — ❌
chore(deps): Bump the all-github-actions group with 21 updates — ❌
Tests: MCP ❌ | GH.com ✅ | I/O ✅ | Inference ✅
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)
Overall: FAIL

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Recent PRs: fix: send delegation TTLs in seconds; chore(deps): Bump the all-github-actions group with 21 updates — ❌
GitHub.com Connectivity — ✅
File Write/Read — ✅
BYOK Inference — ✅
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra
Overall: FAIL
CC: @Copilot @lpcox

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.14 Python 3.12.14 ✅ YES
Node.js v24.20.0 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: FAILED — Node.js version mismatch between host and chroot environment. smoke-chroot label not applied.

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

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: API Proxy OTEL Tracing — Results

Scenario Result
1. Module Loading otel.js loads successfully; isEnabled()true; exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled, _provider, _ProxyAwareOtlpExporter, _FileSpanExporter, _FanOutSpanExporter, _parseEndpoints, _parseOtlpHeaders, _buildResourceSpans, _createOtlpWorkloadIdentity
2. Test Suite ✅ 68/68 tests passed across 3 suites (otel.test.js + split modules), 0 failed
3. Env Var Forwarding GITHUB_AW_OTEL_TRACE_ID / GITHUB_AW_OTEL_PARENT_SPAN_ID present in env-passthrough.ts; GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, and trace context vars present in api-proxy-env-config.ts
4. Token Tracker Integration onUsage callback confirmed as the OTEL hook point in token-tracker-http.js
5. OTEL Diagnostics ✅ Spans exported for this run (/tmp/gh-aw/otel.jsonl contains a gh-aw.agent.setup span with valid trace/span IDs, resource attributes, and GenAI gen_ai.system attribute)

Overall: ✅ All 5 scenarios pass. OTEL module init, span creation, GenAI usage attributes, env var/context propagation, and OTLP export all validated successfully for PR #8290.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke test:

  • fix: send delegation TTLs in seconds ✅
  • feat: run dynamic agent enclaves with repository-scoped GitHub MCP identities ✅
  • PR detail read ✅
  • Playwright title ✅
  • File write/read ✅
  • Discussion comment ❌
  • Build ✅
    Overall: FAIL

Warning

Firewall blocked 7 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • msfeed25.pkgs.visualstudio.com
  • www.google.com
  • www.gstatic.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "www.google.com"
    - "www.gstatic.com"

See Network Configuration for more information.

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

@github-actions

github-actions Bot commented Sep 7, 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 (run ok) ✅ PASS
.NET json-parse N/A (run ok) ✅ PASS
Go color ok ✅ PASS
Go env ok ✅ PASS
Go uuid 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: Maven's default ~/.m2 local repository was not writable in this sandbox (owned by root), so a local repo override (-Dmaven.repo.local via a custom settings.xml) was used for the Java builds; this is a sandbox-specific workaround, not a firewall/AWF issue. All other tasks ran without modification and all builds/tests succeeded through the AWF firewall proxy.

Generated by Build Test Suite for #8290 · copilot · auto · 57.5 AIC · ⊞ 12K ·
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.

🩺 Runner Doctor UpdateRunner Doctor: 2 new self-hosted failure-mode lessons (Squid DNS TTL, Squid log ownership)

3 participants