refactor: remove dead exports flagged by export audit#2762
Conversation
Address three Export Audit issues: - containers/api-proxy/providers/copilot.js (#2752): Move internal helpers (stripBearerPrefix, resolveCopilotAuthToken, deriveCopilotApiTarget, deriveGitHubApiTarget, deriveGitHubApiBasePath) from top-level exports to a _testing namespace, clarifying they are not public API. - containers/api-proxy/providers/opencode.js (#2756): Move resolveOpenCodeRoute from top-level export to _testing namespace. - src/types/docker.ts (#2746): Remove export keyword from DockerService, DockerNetwork, and DockerVolume interfaces — they are @internal sub-types used only within DockerComposeConfig in the same file. Also sync src/awf-config-schema.json environment description with docs/awf-config.schema.json to fix schema sync test. Closes #2746, closes #2752, closes #2756. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR reduces the repository’s exposed API surface by removing or namespacing exports that are only used by unit tests, and by making internal-only Docker Compose sub-types non-exported.
Changes:
- Moved Copilot/OpenCode provider helper functions from top-level CommonJS exports into a
_testingnamespace and updated api-proxy unit tests accordingly. - Made
DockerService,DockerNetwork, andDockerVolumeinterfaces file-internal withinsrc/types/docker.tsand removed a now-stale barrel comment. - Updated the environment merge precedence wording in
src/awf-config-schema.json.
Show a summary per file
| File | Description |
|---|---|
| src/types/index.ts | Removes stale barrel comment referencing Docker sub-types that are no longer intended for direct import. |
| src/types/docker.ts | Converts Docker Compose sub-type interfaces to non-exported/internal declarations. |
| src/awf-config-schema.json | Adjusts schema description text for environment merge precedence. |
| containers/api-proxy/server.routing.test.js | Updates test imports to read provider helpers from _testing namespace. |
| containers/api-proxy/server.auth.test.js | Updates test imports to read auth helpers from _testing namespace. |
| containers/api-proxy/providers/opencode.js | Namespaces resolveOpenCodeRoute under _testing instead of exporting it top-level. |
| containers/api-proxy/providers/copilot.js | Namespaces internal Copilot helper exports under _testing instead of exporting them top-level. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/7 changed files
- Comments generated: 1
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Smoke test: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test Results✅ GitHub MCP: Last 2 merged PRs retrieved Status: PASS
|
🧪 Chroot Smoke Test Results
Result: FAILED — Python and Node.js versions differ between host and chroot. Go matches.
|
This comment has been minimized.
This comment has been minimized.
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
|
@copilot investigate this failed ci check https://github.com/github/gh-aw-firewall/actions/runs/25577465450/job/75088082592?pr=2762 |
I checked that failed run/job. The failure is in step “Execute GitHub Copilot CLI” and it’s a timeout, not a test/build error:
So this looks like a stuck/slow agent run in the smoke workflow rather than a regression from the export-audit code changes. A rerun of the check should be the next step. |
🔬 Smoke Test Results
PR under test: "refactor: remove dead exports flagged by export audit" by @lpcox Overall: PARTIAL — MCP connectivity confirmed; pre-step template variables were not expanded so HTTP and file tests could not be verified.
|
🔥 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( PR author: @lpcox · Assignees: @lpcox, Overall: PARTIAL PASS (BYOK path confirmed; pre-step variables not expanded in workflow template)
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
Summary
Addresses three
[Export Audit]issues by removing or namespacing dead exports.Changes
containers/api-proxy/providers/copilot.js(closes #2752)stripBearerPrefix,resolveCopilotAuthToken,deriveCopilotApiTarget,deriveGitHubApiTarget,deriveGitHubApiBasePath) from top-level exports to a_testingnamespaceserver.auth.test.jsandserver.routing.test.jscontainers/api-proxy/providers/opencode.js(closes #2756)resolveOpenCodeRoutefrom top-level export to_testingnamespaceserver.routing.test.jssrc/types/docker.ts(closes #2746)exportkeyword fromDockerService,DockerNetwork,DockerVolumeinterfaces — these are@internalsub-types used only withinDockerComposeConfigin the same file and never imported elsewheresrc/types/index.tsTesting