Skip to content

Increase Documentation Maintainer LLM invocation budget to prevent false Copilot auth failures#5349

Merged
lpcox merged 2 commits into
mainfrom
copilot/debug-documentation-maintainer-failure
Jun 21, 2026
Merged

Increase Documentation Maintainer LLM invocation budget to prevent false Copilot auth failures#5349
lpcox merged 2 commits into
mainfrom
copilot/debug-documentation-maintainer-failure

Conversation

Copilot AI commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

The Documentation Maintainer workflow was failing with a Copilot “authentication failed” error, but the underlying cause was exhausting the configured LLM invocation cap (403 Maximum LLM invocations exceeded (4 / 4)). This change aligns workflow limits so normal doc-maintainer runs don’t hit that artificial ceiling.

  • Workflow budget increase

    • Raised source workflow turn budget:
      • .github/workflows/doc-maintainer.md
      • max-turns: 4max-turns: 8
  • Compiled workflow alignment

    • Updated lockfile/runtime settings to match the source workflow:
      • .github/workflows/doc-maintainer.lock.yml
      • GH_AW_MAX_TURNS: 4GH_AW_MAX_TURNS: 8
      • apiProxy.maxRuns: 4apiProxy.maxRuns: 8
  • Regression guard update

    • Updated workflow assertion test expectations:
      • scripts/ci/doc-maintainer-workflow.test.ts
      • now expects 8 for both source and compiled turn limits
# .github/workflows/doc-maintainer.md
max-turns: 8

# .github/workflows/doc-maintainer.lock.yml
GH_AW_MAX_TURNS: 8
# ... awf-config.json payload ...
"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":8,...}

Copilot AI changed the title [WIP] Debug documentation maintainer workflow failure Increase Documentation Maintainer LLM invocation budget to prevent false Copilot auth failures Jun 21, 2026
Copilot AI requested a review from lpcox June 21, 2026 16:34
Copilot finished work on behalf of lpcox June 21, 2026 16:34
@lpcox lpcox marked this pull request as ready for review June 21, 2026 17:11
Copilot AI review requested due to automatic review settings June 21, 2026 17:11

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

This PR raises the Documentation Maintainer agent’s turn/invocation budget to avoid runs failing with a misleading Copilot “authentication failed” error when the real cause is hitting the configured max-invocations cap. It keeps the source workflow, compiled lock workflow, and the regression test expectations in sync.

Changes:

  • Increased the doc-maintainer source workflow max-turns from 4 → 8.
  • Updated the compiled workflow to align runtime limits (GH_AW_MAX_TURNS and apiProxy.maxRuns) from 4 → 8.
  • Updated the CI regression test to assert the new limits in both source and lock workflows.
Show a summary per file
File Description
.github/workflows/doc-maintainer.md Raises the doc-maintainer agent turn limit to reduce false “auth” failures caused by invocation caps.
.github/workflows/doc-maintainer.lock.yml Aligns compiled/runtime settings (GH_AW_MAX_TURNS, apiProxy.maxRuns) to the new 8-turn budget.
scripts/ci/doc-maintainer-workflow.test.ts Updates assertions to ensure source and lock workflows stay aligned at 8 turns.

Copilot's findings

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@github-actions

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.

@github-actions

github-actions Bot commented Jun 21, 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 Jun 21, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅

@github-actions

github-actions Bot commented Jun 21, 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 Jun 21, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

@github-actions

github-actions Bot commented Jun 21, 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 Jun 21, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Jun 21, 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 Jun 21, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 97.85% 97.89% 📈 +0.04%
Statements 97.78% 97.82% 📈 +0.04%
Functions 99.50% 99.50% ➡️ +0.00%
Branches 93.55% 93.58% 📈 +0.03%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/workdir-setup.ts 92.7% → 94.5% (+1.82%) 92.7% → 94.5% (+1.82%)

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

@github-actions

Copy link
Copy Markdown
Contributor

🔥 Smoke Test Results — Auth mode: PAT (COPILOT_GITHUB_TOKEN)

Test Result
GitHub MCP connectivity
GitHub.com HTTP ✅ 200
File write/read

Overall: PASS

cc @lpcox @Copilot

🔑 PAT report filed by Smoke Copilot PAT

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct Mode) — PASS

  • ✅ GitHub MCP: Listed recent merged PRs successfully
  • ✅ GitHub.com connectivity: HTTP 200
  • ✅ File write/read: smoke-test-copilot-byok.txt verified
  • ✅ BYOK inference: Direct mode via api-proxy → api.githubcopilot.com working

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) with credentials forwarded through api-proxy sidecar.

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Claude Result: PASS

Check Status
API PASS
gh check PASS
File status PASS

Overall: PASS

Generated by Smoke Claude for issue #5349 · 36.7 AIC · ⊞ 3.1K ·

@github-actions

Copy link
Copy Markdown
Contributor

Smoke test results:

  • perf(security-guard): prioritize security-relevant files in PR diff
  • fix(smoke-claude): raise turn budget to 8 and fix add_comment usage
  • GitHub page title: ✅
  • File write/read: ✅
  • Discussion comment: ✅
  • Build: ✅
    Overall: PASS

Warning

Firewall blocked 1 domain

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

  • registry.npmjs.org

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

network:
  allowed:
    - defaults
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Smoke Test Results

Test Status
GitHub MCP connectivity
github.com HTTP ✅ 200
File write/read

Overall: PASS

PR: Increase Documentation Maintainer LLM invocation budget to prevent false Copilot auth failures
Author: @Copilot — Assignees: @lpcox, @Copilot

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: API Proxy OpenTelemetry Tracing

Scenario Status Detail
Module Loading otel.js loads cleanly; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled + internal test helpers
Test Suite 59 tests passed across otel.test.js + otel-fanout.test.js (0 failures)
Env Var Forwarding api-proxy-service-config.ts:148–155 forwards GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, GITHUB_AW_OTEL_TRACE_ID, GITHUB_AW_OTEL_PARENT_SPAN_ID, OTEL_SERVICE_NAME via pickEnvVars()
Token Tracker Integration onUsage callback present in token-tracker-http.js (lines 283, 324, 374); invoked after token data is extracted
OTEL Diagnostics No live containers (expected in CI smoke context); FileSpanExporter fallback writes to /var/log/api-proxy/otel.jsonl when no OTLP endpoint configured — graceful degradation confirmed

All 5 scenarios pass. OTEL tracing integration is fully functional.

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Gemini Engine Validation

  • GitHub MCP Testing: ❌ (Tools missing from session)
  • GitHub.com Connectivity: ✅ (200 OK)
  • File Writing Testing: ✅
  • Bash Tool Testing: ✅
  • Overall status: FAIL

Last 2 merged PRs:

  • perf(security-guard): prioritize security-relevant files in PR diff
  • fix(smoke-claude): raise turn budget to 8 and fix add_comment usage

Warning

Firewall blocked 1 domain

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

  • localhost

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

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

💎 Faceted by Smoke Gemini

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.3
Node.js v24.16.0 v22.22.3
Go go1.22.12 go1.22.12

Overall: ❌ Some versions differ between host and chroot.

Python and Node.js versions in the chroot environment do not match the host. Go versions match correctly.

Tested by Smoke Chroot

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results — ❌ FAIL

Check Result
Redis PING ❌ No response (timeout)
PostgreSQL pg_isready ❌ No response
PostgreSQL SELECT 1 ❌ No response (timeout)

host.docker.internal is not reachable from this runner environment — all service containers are unreachable.

🔌 Service connectivity validated by Smoke Services

@github-actions

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

Overall: 8/8 ecosystems passed — ✅ PASS

Generated by Build Test Suite for issue #5349 · 62.9 AIC · ⊞ 7.7K ·

@lpcox lpcox merged commit 0bbf412 into main Jun 21, 2026
85 of 91 checks passed
@lpcox lpcox deleted the copilot/debug-documentation-maintainer-failure branch June 21, 2026 17:48
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.

3 participants