Skip to content

Remove unused export from resolveAgentImageConfig#5396

Merged
lpcox merged 2 commits into
mainfrom
copilot/remove-resolveagentimageconfig-export
Jun 22, 2026
Merged

Remove unused export from resolveAgentImageConfig#5396
lpcox merged 2 commits into
mainfrom
copilot/remove-resolveagentimageconfig-export

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

resolveAgentImageConfig in src/services/agent-service.ts was a direct named export with no consumers outside its defining file, adding unnecessary public API surface.

Changes

  • src/services/agent-service.ts: Drop export from resolveAgentImageConfig; the function remains accessible to unit tests via the existing testHelpers export (the established pattern in this codebase).

Copilot AI changed the title [WIP] Remove unused export for resolveAgentImageConfig function Remove unused export from resolveAgentImageConfig Jun 22, 2026
Copilot AI requested a review from lpcox June 22, 2026 15:35
Copilot finished work on behalf of lpcox June 22, 2026 15:35
@lpcox lpcox marked this pull request as ready for review June 22, 2026 17:01
Copilot AI review requested due to automatic review settings June 22, 2026 17:01

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 reduces public API surface in the agent service module by making resolveAgentImageConfig a file-private helper while keeping unit-test access via the existing testHelpers export.

Changes:

  • Removed the direct named export from resolveAgentImageConfig and kept it as a local function.
  • Continued exposing resolveAgentImageConfig to tests through export const testHelpers = { resolveAgentImageConfig }.
Show a summary per file
File Description
src/services/agent-service.ts Makes resolveAgentImageConfig non-exported to reduce module public API while preserving test access via testHelpers.

Copilot's findings

Tip

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

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

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

Smoke test completed with FAIL status. Comment added to PR #5396.

@github-actions

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

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 98.01% 98.05% 📈 +0.04%
Statements 97.95% 97.98% 📈 +0.03%
Functions 99.51% 99.51% ➡️ +0.00%
Branches 93.68% 93.72% 📈 +0.04%
📁 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

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

Copy link
Copy Markdown
Contributor

🔥 Smoke Test: PASS

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

Overall: PASS — Auth mode: PAT (COPILOT_GITHUB_TOKEN)

cc @lpcox @Copilot

🔑 PAT report filed by Smoke Copilot PAT

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Status
API ✅ PASS
gh CLI ✅ PASS
File system ✅ PASS

Overall result: PASS

Generated by Smoke Claude for issue #5396 · 36.8 AIC · ⊞ 3.1K ·

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode ✅ PASS

  • ✅ MCP connectivity verified (gh-aw-firewall repo accessible)
  • ✅ GitHub.com connectivity (HTTP 200)
  • ✅ File write/read test passed
  • ✅ BYOK inference via api-proxy sidecar working (you're reading this)

Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY) → api-proxy → api.githubcopilot.com

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

Copy link
Copy Markdown
Contributor

🔭 Smoke Test: API Proxy OpenTelemetry Tracing

Scenario Result Notes
1. Module Loading ✅ Pass otel.js loads cleanly; exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled
2. Test Suite ✅ Pass 59 tests passed, 0 failed across otel.test.js + otel-fanout.test.js (span creation, token attrs, exporters, serialization, shutdown)
3. Env Var Forwarding ✅ Pass api-proxy-service-config.ts 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; observability-environment.ts passes all OTEL_* vars to agent container
4. Token Tracker Integration ✅ Pass onUsage callback present in token-tracker-http.js (lines 283, 324, 374) — wired as the OTEL hook for gen_ai.usage.* span attributes
5. OTEL Diagnostics ✅ Pass (no live run) No containers active during static check; isEnabled() returns true with default config; span export would fire during actual proxy execution

Summary: 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 Results

PR: Remove unused export from resolveAgentImageConfig
Author: @Copilot | Assignees: @lpcox @Copilot

Test Status
GitHub MCP connectivity
GitHub.com HTTP connectivity ✅ (200)
File write/read ⚠️ template vars not expanded

Overall: PASS (verified tests passed; file test unverifiable due to CI template expansion issue)

📰 BREAKING: Report filed by Smoke Copilot

@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: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot.

Tested by Smoke Chroot

@github-actions

Copy link
Copy Markdown
Contributor

Smoke test

  • Refactor duplicated firewall topology assertions in ensureFirewallNetwork tests: ✅
  • [Test Coverage] squid-log-reader.ts: 100% coverage: ✅
  • GitHub title check: ✅
  • File write/read: ✅
  • Build (npm ci && npm run build): ❌
  • Overall: FAIL

🔮 The oracle has spoken through Smoke Codex

@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 #5396 · 59.2 AIC · ⊞ 7.7K ·

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results

Overall status: FAIL

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

Smoke Test: GitHub Actions Services Connectivity

Check Result
Redis PING ❌ Timeout/no response
PostgreSQL pg_isready ❌ No response
PostgreSQL SELECT 1 ❌ Timeout/no response

Overall: FAILhost.docker.internal is unreachable on ports 6379 and 5432. Services may not be running or network routing to host is blocked.

🔌 Service connectivity validated by Smoke Services

@github-actions

Copy link
Copy Markdown
Contributor

@lpcox @Copilot
GitHub MCP Testing:

  • Remove unused ParsedDomainList export from domain-matchers: ✅
  • Remove unused ParsedDomain export from domain-patterns: ✅
    GitHub.com connectivity: ❌
    File write/read test: ❌
    Direct 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 status: FAIL

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@lpcox lpcox merged commit 462b92e into main Jun 22, 2026
85 of 91 checks passed
@lpcox lpcox deleted the copilot/remove-resolveagentimageconfig-export branch June 22, 2026 18:41
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