Skip to content

Narrow host-path prefix API surface#4052

Merged
lpcox merged 2 commits into
mainfrom
copilot/remove-unused-export-translate-bind-mount-host-pat
May 30, 2026
Merged

Narrow host-path prefix API surface#4052
lpcox merged 2 commits into
mainfrom
copilot/remove-unused-export-translate-bind-mount-host-pat

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 30, 2026

translateBindMountHostPath was exported from src/services/host-path-prefix.ts even though production code only uses it internally through applyHostPathPrefixToVolumes. This change removes that unnecessary public symbol and keeps coverage on the public volume-rewrite entrypoint.

  • API surface

    • Remove the translateBindMountHostPath export from src/services/host-path-prefix.ts
    • Keep applyHostPathPrefixToVolumes as the public interface for bind-mount source translation
  • Test coverage

    • Update src/services/agent-volumes-mounts.test.ts to assert the shared /tmp fallback behavior via applyHostPathPrefixToVolumes
    • Stop reaching into a module-private helper from tests
  • Result

    • Reduces accidental coupling to an implementation detail
    • Preserves existing behavior checks through the supported API
import { applyHostPathPrefixToVolumes } from './host-path-prefix';

expect(
  applyHostPathPrefixToVolumes(
    ['/etc/passwd:/host/etc/passwd:ro'],
    '/tmp/gh-aw',
  ),
).toEqual(['/etc/passwd:/host/etc/passwd:ro']);

Copilot AI changed the title [WIP] Remove unused export of translateBindMountHostPath Narrow host-path prefix API surface May 30, 2026
Copilot finished work on behalf of lpcox May 30, 2026 13:50
Copilot AI requested a review from lpcox May 30, 2026 13:50
@lpcox lpcox marked this pull request as ready for review May 30, 2026 13:59
Copilot AI review requested due to automatic review settings May 30, 2026 13:59
@github-actions
Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 96.46% 96.51% 📈 +0.05%
Statements 96.32% 96.36% 📈 +0.04%
Functions 98.26% 98.26% ➡️ +0.00%
Branches 90.61% 90.65% 📈 +0.04%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/services/host-path-prefix.ts 89.3% → 88.9% (-0.40%) 90.6% → 90.3% (-0.30%)
src/config-writer.ts 89.3% → 90.9% (+1.65%) 89.3% → 90.9% (+1.65%)

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

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine

  • ✅ GitHub API: 2 recent PR entries loaded
  • ✅ GitHub check: playwright_check=PASS
  • ✅ File verify: smoke-test-claude-26685437417.txt present

Result: PASS

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Copy Markdown
Contributor

🔥 Smoke Test: Copilot BYOK (Offline) Mode

Test Result
GitHub MCP connectivity ✅ (fetched PR #4049 via MCP)
GitHub.com HTTP ⚠️ pre-step data not injected (template unexpanded)
File write/read ⚠️ pre-step data not injected (template unexpanded)
BYOK inference (agent → api-proxy → api.githubcopilot.com) ✅ responding now

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

Overall: PARTIAL — BYOK inference path confirmed working; pre-step smoke data was not injected into the prompt template.

PR author: @Copilot | Assignees: @lpcox, @Copilot

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Smoke Test Results

Test Status
GitHub MCP connectivity
GitHub.com HTTP ⚠️ pre-step data unavailable (template vars not substituted)
File write/read ⚠️ pre-step data unavailable (template vars not substituted)

PR: "Narrow host-path API surface" — author: @Copilot, assignees: @lpcox, @Copilot

Overall: PARTIAL — MCP confirmed working; pre-step outputs were not injected into task body.

📰 BREAKING: Report filed by Smoke Copilot

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

Narrows the host-path-prefix.ts API surface by removing the translateBindMountHostPath export and updating the lone test that referenced it to use the public applyHostPathPrefixToVolumes helper instead.

Changes:

  • Make translateBindMountHostPath module-private in src/services/host-path-prefix.ts.
  • Update agent-volumes-mounts.test.ts to assert /tmp staging fallback behavior via applyHostPathPrefixToVolumes.
Show a summary per file
File Description
src/services/host-path-prefix.ts Drops the export keyword on translateBindMountHostPath.
src/services/agent-volumes-mounts.test.ts Switches the /etc/passwd//etc/group preservation test to the public helper.

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: 0

@github-actions
Copy link
Copy Markdown
Contributor

Chroot Runtime Version Comparison

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

Result: ❌ Not all versions match — Python and Node.js versions differ between host and chroot environments.

Tested by Smoke Chroot

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: GitHub Actions Services Connectivity

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

Overall: FAILhost.docker.internal service containers are not reachable from this environment.

🔌 Service connectivity validated by Smoke Services

@github-actions
Copy link
Copy Markdown
Contributor

Gemini Smoke Test: PASS\n- MCP: ✅\n - Deduplicate server test HTTPS_PROXY/module-reset bootstrap across split api-proxy tests\n - [docs] Document AWF_DIND env var and ARC/DinD sibling-socket auto-detection\n- Connectivity: ✅\n- File Writing: ✅\n- Bash: ✅

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

🏗️ 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 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 0/0 (ok) ✅ PASS
Rust zoxide 0/0 (ok) ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Generated by Build Test Suite for issue #4052 · sonnet46 953.5K ·

@lpcox lpcox merged commit 8812e47 into main May 30, 2026
61 of 66 checks passed
@lpcox lpcox deleted the copilot/remove-unused-export-translate-bind-mount-host-pat branch May 30, 2026 14:16
@github-actions
Copy link
Copy Markdown
Contributor

Reviewed merged PRs:

  • Deduplicate server test HTTPS_PROXY/module-reset bootstrap across split api-proxy tests
  • Deduplicate env var setup/restore blocks in agent-volumes-mounts tests

Checks: GitHub ✅ Playwright ✅ File ✅ Discussion ✅ Build ❌
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex

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.

[Export Audit] Exported internal helper translateBindMountHostPath never imported by production code

3 participants