Skip to content

Recompile workflow lock files with updated MCP environment variables#2918

Merged
pelikhan merged 2 commits intomainfrom
copilot/recompile-code-base
Nov 1, 2025
Merged

Recompile workflow lock files with updated MCP environment variables#2918
pelikhan merged 2 commits intomainfrom
copilot/recompile-code-base

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Regenerated all 65 workflow lock files to incorporate updated MCP server configuration that includes GITHUB_REPOSITORY and GITHUB_SERVER_URL environment variables.

Changes

  • Ran make recompile to regenerate all .lock.yml files from their .md sources
  • Updated MCP server environment variable passthrough in all workflows to include repository context variables
# Before
"env": {
  "GH_AW_SAFE_OUTPUTS_CONFIG": "${GH_AW_SAFE_OUTPUTS_CONFIG}",
  "GH_AW_ASSETS_BRANCH": "${GH_AW_ASSETS_BRANCH}"
}

# After
"env": {
  "GH_AW_SAFE_OUTPUTS_CONFIG": "${GH_AW_SAFE_OUTPUTS_CONFIG}",
  "GH_AW_ASSETS_BRANCH": "${GH_AW_ASSETS_BRANCH}",
  "GITHUB_REPOSITORY": "${GITHUB_REPOSITORY}",
  "GITHUB_SERVER_URL": "${GITHUB_SERVER_URL}"
}

All 65 workflows compiled successfully with 0 errors.

Original prompt

Recompile


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Recompile the existing code base Recompile workflow lock files with updated MCP environment variables Nov 1, 2025
Copilot AI requested a review from pelikhan November 1, 2025 00:17
@pelikhan pelikhan marked this pull request as ready for review November 1, 2025 00:30
Copilot AI review requested due to automatic review settings November 1, 2025 00:30
@pelikhan pelikhan merged commit 1b0d76e into main Nov 1, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/recompile-code-base branch November 1, 2025 00:30
Copy link
Contributor

Copilot AI left a comment

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 regenerates all 65 GitHub Actions workflow lock files to include additional environment variables (GITHUB_REPOSITORY and GITHUB_SERVER_URL) for MCP server configuration.

  • Automated recompilation of all workflow lock files using make recompile
  • Addition of two GitHub context environment variables to MCP server configurations
  • Consistent environment variable passing across all workflow files

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

Agentic Changeset Generator triggered by this pull request.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

🔍 Smoke Test Investigation - Run #61

Summary

The Smoke OpenCode workflow failed due to a transient Anthropic API error (AI_APICallError). This is a well-documented recurring pattern - the 12th occurrence since October 22, 2025. OpenCode successfully initialized (installed plugins, configured MCP servers) but failed when attempting the first Anthropic API call.

Failure Details

  • Run: 18988563486
  • Commit: 1b0d76e
  • Trigger: schedule
  • Duration: 1.2m
  • Failed Job: agent (43s)

Root Cause Analysis

Pattern: OPENCODE_ANTHROPIC_API_ERROR

  • Category: AI Engine - API Failure
  • Severity: High
  • Is Transient: Yes ✅
  • Is Flaky: Yes ✅
  • Occurrence Count: 12 occurrences since Oct 22, 2025
  • Affects: ~25% of OpenCode smoke test runs

What Happened

  1. OpenCode initialized successfully (plugins installed, MCP servers configured)
  2. Session created and prompt processed
  3. API call to (redacted)/v1/messages failed with AI_APICallError
  4. Agent completed with 0 turns, 0 token usage
  5. No safe-outputs or artifacts created
  6. Downstream jobs skipped/failed

Root Causes (from pattern analysis)

  1. Anthropic API temporarily unavailable (likelihood: high)
    • Evidence: Transient nature, resolves on retry
  2. API rate limiting during concurrent requests (likelihood: medium)
    • Evidence: Often occurs during scheduled runs when multiple workflows execute
  3. Network connectivity issues (likelihood: low)
    • Evidence: Other API calls succeed in same workflow

Historical Context

Related Issues: #2852, #2772, #2730, #2143, #2121, #2604, #2307

Recent Occurrences:

Recommended Actions

🔴 High Priority (Recommended 12 times, still unimplemented)

1. Add retry logic with exponential backoff

- name: Run OpenCode (with retry)
  uses: nick-fields/retry@v3
  with:
    timeout_minutes: 5
    max_attempts: 3
    retry_wait_seconds: 30
    exponential_backoff: true
    command: |
      # OpenCode execution command

Impact: Would prevent ~90% of these transient failures

2. Make create_issue job conditional

create_issue:
  needs: [agent]
  if: needs.agent.result == 'success'

Impact: Prevents cascading failures, clearer error signals

🟡 Medium Priority

3. Add API health check

  • Query Anthropic API status before running agent
  • Skip with clear message if API is down

Prevention Strategies

  1. Retry Logic: 3 attempts, 30s delay, 2x backoff → 90%+ success rate improvement
  2. Conditional Jobs: Only run downstream jobs when agent succeeds
  3. Health Checks: Pre-flight checks for OpenCode CLI and Anthropic API
  4. Stagger Scheduled Runs: Reduce concurrent API load during schedule triggers
  5. Circuit Breaker: Implement for repeated failures

Assessment: Related to PR #2918?

No ❌ - This failure is unrelated to the PR changes.

Evidence:

  • This is a well-established recurring transient pattern (12 occurrences)
  • Pattern documented since Oct 22, 2025
  • Occurs randomly during scheduled runs regardless of code changes
  • PR Recompile workflow lock files with updated MCP environment variables #2918 only recompiled workflow lock files with MCP environment variables
  • Failure occurs at Anthropic API call, not workflow configuration

Conclusion: The timing is coincidental. This is an infrastructure/API issue, not a code bug.


**Investigation (redacted)

  • Pattern Database: /tmp/gh-aw/cache-memory/patterns/opencode_anthropic_api_error.json
  • Investigation Record: /tmp/gh-aw/cache-memory/investigations/2025-11-01-18988563486.json
  • Investigator: Smoke Detector

AI generated by Smoke Detector - Smoke Test Failure Investigator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants