refactor: deduplicate SSL-Bump fixture in squid-config-security tests#3480
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors squid-config-security tests to deduplicate the repeated SSL-Bump configuration fixture used in the URL-pattern injection guard tests, reducing copy/paste drift risk when the generateSquidConfig input schema changes.
Changes:
- Extracted a shared
sslBumpBaseobject in the “defense-in-depth” test block. - Replaced three repeated
generateSquidConfig({...})fixtures with{ ...sslBumpBase, urlPatterns: [...] }. - Added a
satisfies Partial<Parameters<typeof generateSquidConfig>[0]>constraint to ensure fixture fields stay aligned with the config type.
Show a summary per file
| File | Description |
|---|---|
src/squid-config-security.test.ts |
Deduplicates SSL-Bump test fixture setup for URL-pattern injection tests while keeping type-checked alignment with generateSquidConfig input. |
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
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test Results✅ GitHub API - 2 PR entries confirmed in recent-prs.json Result: PASS — All smoke tests passed
|
🔬 Smoke Test Results
PR: refactor: deduplicate SSL-Bump fixture in squid-config-security tests Overall: PARTIAL — MCP ✅, pre-step variables were not substituted (workflow template issue)
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( PR by Overall: PARTIAL (pre-step template variables not substituted; BYOK + MCP confirmed working)
|
|
Gemini Smoke Test: FAIL (MCP/Net ❌, File/Bash ✅) 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 Test Results
Overall: FAIL —
|
|
✅ Merged PRs: fix: align OTEL attributes with gen_ai semconv spec; fix: Use --build-local in smoke-otel-tracing for latest api-proxy code 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
Overall: ❌ FAILED — Python and Node.js versions differ between host and chroot environments.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
The SSL-Bump
generateSquidConfigfixture (sslBump: true,caFiles,sslDbPath) was copy-pasted verbatim 3 times in thedefense-in-depthdescribe block, differing only inurlPatterns. A rename of any SSL-bump field would require edits in all copies with no compile-time signal if one was missed.Changes
src/squid-config-security.test.ts: Extract a sharedsslBumpBaseconstant at the top of thedefense-in-depthdescribe block; replace the three duplicate fixture objects with{ ...sslBumpBase, urlPatterns: [...] }spreads.The
satisfiesconstraint ensures TypeScript will surface any schema mismatch at the single declaration site rather than silently at runtime.