Narrow domain-utils API by privatizing agent-image helper exports#3385
Conversation
domain-utils API by privatizing agent-image helper exports
This comment has been minimized.
This comment has been minimized.
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR narrows the domain-utils public API by making agent-image helper functions private while preserving the public processAgentImageOption entrypoint.
Changes:
- Removed exports from
isAgentImagePresetandvalidateAgentImage. - Updated tests to validate agent image behavior through
processAgentImageOption. - Removed tests that directly exercised the now-private preset helper.
Show a summary per file
| File | Description |
|---|---|
src/domain-utils.ts |
Privatizes agent-image validation helper functions. |
src/domain-utils.test.ts |
Updates test imports and coverage to use the public agent-image processing API. |
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
🧪 Smoke Test Results
PR: "Narrow Overall: PARTIAL — MCP test passed; pre-computed step outputs were not substituted into the prompt.
|
Smoke Test Results✅ GitHub API: 2 PR entries found Result: PASS
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( PR author: Overall: PARTIAL (BYOK inference ✅, pre-step template vars not expanded in prompt)
|
|
✅ GitHub PR review: chore: recompile workflows after --ignore-scripts revert; Narrow rules API surface by making 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.
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results — FAIL
|
Smoke Test: Gemini Engine Validation
Overall status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
src/domain-utils.tsexposedvalidateAgentImageandisAgentImagePreseteven though they were only used internally and by tests, which unnecessarily widened the module API. This change keepsprocessAgentImageOptionas the public entrypoint and moves helper validation coverage behind that API.API surface reduction
exportfromisAgentImagePresetandvalidateAgentImageinsrc/domain-utils.ts.processAgentImageOption, preserving runtime behavior while preventing external callsites from bypassing the intended wrapper.Test alignment with public contract
src/domain-utils.test.tsto stop importing internal helpers.processAgentImageOption(via a local test helper), so tests validate externally supported behavior rather than internal function availability.isAgentImagePresetimport-driven tests tied to the removed exports.