Skip to content

Fix BYOK smoke workflow COPILOT_MODEL fallback override in postprocessing#2049

Merged
lpcox merged 6 commits intomainfrom
copilot/fix-copilot-model-override
Apr 17, 2026
Merged

Fix BYOK smoke workflow COPILOT_MODEL fallback override in postprocessing#2049
lpcox merged 6 commits intomainfrom
copilot/fix-copilot-model-override

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

smoke-copilot-byok was failing because the compiled agent step set COPILOT_MODEL to an empty fallback (|| ''), which overrode the workflow-level default when GH_AW_MODEL_AGENT_COPILOT was unset. This caused Copilot BYOK startup to fail due to missing explicit model.

  • What changed

    • Updated scripts/ci/postprocess-smoke-workflows.ts to patch smoke-copilot-byok.lock.yml during postprocessing:
      • rewrite empty fallback:
        • COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}
      • to explicit fallback:
        • COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-opus-4.6' }}
    • Scoped the transform to BYOK smoke workflow postprocessing only.
  • Test coverage

    • Added focused regex tests in scripts/ci/postprocess-smoke-workflows.test.ts for:
      • empty fallback rewrite to claude-opus-4.6
      • idempotency (already-correct fallback remains unchanged)
  • Example

    # before
    COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}
    
    # after (postprocessed)
    COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-opus-4.6' }}

Copilot AI changed the title [WIP] Fix COPILOT_MODEL env var override in smoke-copilot-byok Fix BYOK smoke workflow COPILOT_MODEL fallback override in postprocessing Apr 17, 2026
Copilot AI requested a review from lpcox April 17, 2026 02:57
@lpcox lpcox marked this pull request as ready for review April 17, 2026 02:58
@lpcox lpcox requested a review from Mossaka as a code owner April 17, 2026 02:58
Copilot AI review requested due to automatic review settings April 17, 2026 02:58
Copy link
Copy Markdown
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 fixes a CI failure in the smoke-copilot-byok compiled workflow by postprocessing the generated lock file to avoid a compiler-emitted COPILOT_MODEL empty-string fallback overriding the workflow-level default model when GH_AW_MODEL_AGENT_COPILOT is unset.

Changes:

  • Add a targeted postprocessing rewrite for smoke-copilot-byok.lock.yml to replace || '' with a non-empty fallback.
  • Add regex-focused Jest tests covering the rewrite and idempotency.
Show a summary per file
File Description
scripts/ci/postprocess-smoke-workflows.ts Adds a BYOK-only postprocessing transform to rewrite the empty COPILOT_MODEL fallback in the compiled lock workflow.
scripts/ci/postprocess-smoke-workflows.test.ts Adds tests validating the new regex rewrite behavior and idempotency.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread scripts/ci/postprocess-smoke-workflows.ts Outdated
Comment thread scripts/ci/postprocess-smoke-workflows.test.ts Outdated
lpcox and others added 2 commits April 16, 2026 20:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread scripts/ci/postprocess-smoke-workflows.test.ts Fixed
Comment thread scripts/ci/postprocess-smoke-workflows.test.ts Fixed
lpcox and others added 2 commits April 16, 2026 20:06
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 84.33% 84.41% 📈 +0.08%
Statements 83.56% 83.64% 📈 +0.08%
Functions 87.39% 87.39% ➡️ +0.00%
Branches 74.78% 74.82% 📈 +0.04%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 86.8% → 87.1% (+0.30%) 86.4% → 86.7% (+0.29%)

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

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results ✅

PR: fix: allow package.json/lock in dep security monitor PRs (#2041)

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

Status: PASS

cc: @lpcox @Copilot

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results — PASS ✅

Test Result
GitHub MCP: PR #2041 "fix: allow package.json/lock in dep security monitor PRs"
GitHub MCP: PR #2036 "fix: make smoke-claude safe outputs trigger-aware for workflow_dispatch"
Playwright: github.com title contains "GitHub"
File write/read: smoke-test-claude-24545607072.txt

Overall: PASS

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Copy Markdown
Contributor

🔥 BYOK Smoke Test — PASS

Test Result
GitHub MCP (list PRs) ✅ PR #2049: Fix BYOK smoke workflow COPILOT_MODEL fallback override in postprocessing
GitHub.com connectivity ✅ HTTP 200
BYOK inference ✅ Agent responding via api-proxy → api.githubcopilot.com

Running in BYOK offline mode (COPILOT_OFFLINE=true) via api-proxy → api.githubcopilot.com

cc @lpcox (assignees: @lpcox, @Copilot)

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions
Copy link
Copy Markdown
Contributor

🔥 OpenCode Smoke Test Results

Overall: PASS

🌐 Transmitted by Smoke OpenCode

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: GitHub Actions Services Connectivity ✅

Check Result
Redis PING (host.docker.internal:6379) PONG
PostgreSQL ready (host.docker.internal:5432) ✅ accepting connections
PostgreSQL SELECT 1 (smoketest db, user postgres) ✅ returned 1

All checks passed.

🔌 Service connectivity validated by Smoke Services

@github-actions
Copy link
Copy Markdown
Contributor

PR titles: "fix: allow package.json/lock in dep security monitor PRs"; "fix: make smoke-claude safe outputs trigger-aware for workflow_dispatch"

  1. GitHub MCP (last 2 merged PRs): ✅
  2. safeinputs-gh PR query: ❌
  3. Playwright github.com title check: ✅
  4. Tavily web search: ❌
  5. File write (/tmp/gh-aw/agent/...): ✅
  6. Bash cat verification: ✅
  7. Discussion interaction (required tool path): ❌
  8. npm ci && npm run build: ✅
    Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex

@lpcox lpcox merged commit a473de1 into main Apr 17, 2026
55 of 57 checks passed
@lpcox lpcox deleted the copilot/fix-copilot-model-override branch April 17, 2026 03:12
@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 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 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 #2049 · ● 647.3K ·

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.

[awf] BYOK smoke-copilot-byok fails: COPILOT_MODEL env var overridden with empty fallback

4 participants