Skip to content

Narrow docker-host-staging API by making SAFE_BINARY_NAME_REGEX private#3878

Merged
lpcox merged 2 commits into
mainfrom
copilot/remove-unused-export-safe-binary-name-regex
May 27, 2026
Merged

Narrow docker-host-staging API by making SAFE_BINARY_NAME_REGEX private#3878
lpcox merged 2 commits into
mainfrom
copilot/remove-unused-export-safe-binary-name-regex

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

src/services/agent-volumes/docker-host-staging.ts exposed SAFE_BINARY_NAME_REGEX as a public export even though it had no external consumers. This PR reduces unnecessary API surface by making the constant module-private without changing runtime behavior.

  • API surface cleanup

    • Removed the export modifier from SAFE_BINARY_NAME_REGEX.
    • Kept all call sites unchanged since usage is internal to docker-host-staging.ts.
  • Behavioral impact

    • No functional changes: extractCommandBinaryName(...) continues to validate binary names with the same regex.
// before
export const SAFE_BINARY_NAME_REGEX = /^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$/;

// after
const SAFE_BINARY_NAME_REGEX = /^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$/;

Copilot AI changed the title [WIP] Remove unused exported constant SAFE_BINARY_NAME_REGEX Narrow docker-host-staging API by making SAFE_BINARY_NAME_REGEX private May 26, 2026
Copilot finished work on behalf of lpcox May 26, 2026 22:23
Copilot AI requested a review from lpcox May 26, 2026 22:23
@lpcox lpcox marked this pull request as ready for review May 26, 2026 22:40
Copilot AI review requested due to automatic review settings May 26, 2026 22:40
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

Reduces unnecessary public API surface in the agent volumes service by making SAFE_BINARY_NAME_REGEX module-private within docker-host-staging.ts, without changing runtime behavior.

Changes:

  • Removed the export modifier from SAFE_BINARY_NAME_REGEX to keep it internal to the module.
Show a summary per file
File Description
src/services/agent-volumes/docker-host-staging.ts Makes SAFE_BINARY_NAME_REGEX private while keeping extractCommandBinaryName behavior unchanged.

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
Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 96.57% 96.62% 📈 +0.05%
Statements 96.44% 96.48% 📈 +0.04%
Functions 98.22% 98.22% ➡️ +0.00%
Branches 90.66% 90.70% 📈 +0.04%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
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

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 ✅ PR #3878 fetched successfully
GitHub.com HTTP connectivity ⚠️ Pre-step data unavailable (template vars not resolved)
File write/read ⚠️ Pre-step data unavailable (template vars not resolved)
BYOK inference (agent → api-proxy → api.githubcopilot.com) ✅ Responding via BYOK offline mode

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

Overall: PARTIAL — BYOK inference and MCP confirmed ✅; pre-computed step outputs were not injected (template variables unresolved).

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

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Smoke Test Results

Test Result
GitHub MCP connectivity ✅ PR data fetched successfully
GitHub.com HTTP ⚠️ Pre-step data not resolved (template vars unsubstituted)
File write/read ⚠️ Pre-step data not resolved (template vars unsubstituted)

PR: "Narrow docker-host-staging API by making SAFE_BINARY_NAME_REGEX private"
Author: @Copilot | Assignees: @lpcox, @Copilot

Overall: PARTIAL — MCP ✅, pre-step outputs not injected into task body

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

#3852 [awf] ARC/DinD chroot: auto-stage runner binary and critical /etc files for split-filesystem Docker hosts\n#3851 api-proxy: add Anthropic Workload Identity Federation provider\n✅ GitHub PR queries\n✅ Safeinputs GH CLI query\n✅ Playwright title\n✅ File write/read\n✅ Discussion lookup/comment\n✅ Build\nOverall: 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

Chroot Runtime Version Comparison

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

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

Tested by Smoke Chroot

@github-actions
Copy link
Copy Markdown
Contributor

Gemini Smoke Test: PASS

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 passed ✅ PASS
Go env passed ✅ PASS
Go uuid passed ✅ 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 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Note (Java): Maven's default local repo /home/runner/.m2/repository was not writable (owned by root). Tests were run successfully with -Dmaven.repo.local=/tmp/gh-aw/agent/m2-repo as a workaround.

Generated by Build Test Suite for issue #3878 · sonnet46 834.8K ·

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results

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

Overall: FAILhost.docker.internal is unreachable from this environment. Service containers are not accessible.

🔌 Service connectivity validated by Smoke Services

@lpcox lpcox merged commit bc5af29 into main May 27, 2026
63 of 66 checks passed
@lpcox lpcox deleted the copilot/remove-unused-export-safe-binary-name-regex branch May 27, 2026 00:29
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] Unused exported constant SAFE_BINARY_NAME_REGEX in src/services/agent-volumes/docker-host-staging.ts

3 participants