Narrow log-discovery API: make isContainerRunning test-helper only#3530
Conversation
log-discovery API: make isContainerRunning test-helper only
✅ 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 pull request narrows the src/logs/log-discovery.ts module’s public API by making isContainerRunning module-private while still allowing white-box unit tests to call it via the repository’s established testHelpers export pattern.
Changes:
- Removed the direct
exportfromisContainerRunning, making it internal-only for production code paths. - Added
export const testHelpers = { isContainerRunning }to preserve test access without promoting the function as first-class API. - Updated unit tests to reference
testHelpers.isContainerRunning(...)instead of importingisContainerRunningdirectly.
Show a summary per file
| File | Description |
|---|---|
src/logs/log-discovery.ts |
Makes isContainerRunning private and exposes it only via testHelpers for unit tests. |
src/logs/log-discovery.test.ts |
Updates tests to use testHelpers.isContainerRunning after API surface narrowing. |
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✅ API verification: 2 recent PRs found PASS — Claude validation complete
|
🔬 Smoke Test Results
Overall: PASS PR: Narrow
|
🔥 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: PARTIAL — BYOK inference path works; pre-step smoke data was not interpolated into the prompt. cc
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
|
Smoke test result summary: 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.
|
|
Smoke Codex: 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.
|
Chroot Version Comparison Results
Overall: ❌ Not all versions match — Python and Node.js versions differ between host and chroot environments.
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL — Service containers are not reachable via
|
src/logs/log-discovery.tsexportedisContainerRunningeven though it is only used internally (plus white-box tests), which unnecessarily expanded the module API surface. This change removes it from the public export surface while preserving direct test access via the existingtestHelperspattern.API surface cleanup
exportfromisContainerRunninginsrc/logs/log-discovery.ts.discoverLogSources,validateSource).Test-only access pattern
testHelpersexport inlog-discovery.ts:export const testHelpers = { isContainerRunning };Test updates
src/logs/log-discovery.test.tsto importtestHelpersand calltestHelpers.isContainerRunning(...)instead of importingisContainerRunningdirectly.