Reduce src/squid/config-sections.ts API surface by internalizing helper exports#3877
Conversation
src/squid/config-sections.ts API surface by internalizing helper exports
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
Refactors src/squid/config-sections.ts to reduce its exported API surface by converting five helper functions to module-private and exposing a single composed entrypoint generateConfigSections that the config generator consumes.
Changes:
- Make
generateDlpSections,generateSslSections,generatePortAclsAndRules,generateApiProxySection, andgenerateDnsSectionmodule-private. - Add
generateConfigSectionsthat composes the above helpers and returns all section fragments. - Update
src/squid/config-generator.tsto use the new single entrypoint.
Show a summary per file
| File | Description |
|---|---|
| src/squid/config-sections.ts | Removes export from five helpers and adds the composing generateConfigSections function. |
| src/squid/config-generator.ts | Replaces five direct helper imports/calls with one call to generateConfigSections. |
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
Overall: PASS PR by
|
Smoke Test (Claude) — ✅ PASS
Total: PASS
|
Smoke Test: Copilot BYOK (Offline) Mode
Overall: PARTIAL — BYOK inference and MCP confirmed ✅; pre-step outputs were not injected into the prompt (template variables not expanded). PR author:
|
|
✅ [awf] ARC/DinD chroot: auto-stage runner binary and critical /etc files for split-filesystem Docker hosts 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 Smoke Test Results
Result: ❌ Not all versions match — Python and Node.js differ between host and chroot environments.
|
|
Smoke test failed. 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.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results — FAIL
|
src/squid/config-sections.tswas exporting five helper functions that were only consumed inside thesquidmodule, unnecessarily widening the package API surface. This change keeps those helpers module-private and preserves a single exported integration point used by the config generator.API surface tightening
generateDlpSectionsgenerateSslSectionsgeneratePortAclsAndRulesgenerateApiProxySectiongenerateDnsSectionSingle exported composition entrypoint
generateConfigSections(...)insrc/squid/config-sections.ts.Consumer update
src/squid/config-generator.tsto import and usegenerateConfigSections(...)instead of importing five helper symbols directly.