[Coverage Report] Test Coverage Report — 2026-06-02 #4232
Replies: 3 comments
-
|
🔮 The ancient spirits stir, and the smoke test agent has passed through this discussion. The run is sealed in oracle light. 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.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir, and the smoke test agent has passed through this chamber. The omens are favorable; the firewall remains steady. 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.
|
Beta Was this translation helpful? Give feedback.
-
|
This discussion was automatically closed because it expired on 2026-06-09T23:10:55.807Z.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
📊 Overall Coverage
Overall coverage is excellent. 96 test files covering 147 source files.
🔴 Critical Gaps (< 50% statement coverage)
None. All files are above 50% statement coverage.
🟡 Low Coverage (50–79% statement coverage)
src/commands/validators/network-options.tsThis file validates Docker-host, domain-resolution, and network-configuration options. The uncovered branches are likely the
logger.warn()paths triggered when an externalDOCKER_HOSTis detected but no--docker-host-path-prefixis set — an edge case that requires mockingDOCKER_HOSTin tests.🛡️ Security-Critical Path Status
src/host-iptables.tssrc/squid-config.tssrc/docker-manager.tssrc/domain-patterns.tssrc/cli.tssrc/host-iptables-rules.tsAll primary security-critical files meet the 70% branch coverage threshold. The
src/cli.tsbranch gap is low-risk: the uncovered branch is therequire.main === moduleguard (the entry point conditional), which is expected to be uncovered when the module is imported by tests rather than run directly.📋 Full Coverage Table
All files (sorted by statement coverage)
src/commands/validators/network-options.tssrc/services/agent-volumes/etc-mounts.tssrc/logs/audit-enricher.tssrc/artifact-preservation.tssrc/cli.tssrc/logs/log-parser.tssrc/squid/policy-manifest.tssrc/services/agent-volumes/docker-host-staging.tssrc/commands/validators/log-and-limits.tssrc/commands/logs-command-helpers.tssrc/services/doh-proxy-service.tssrc/services/host-path-prefix.tssrc/config-writer.tssrc/services/agent-volumes/docker-socket.tssrc/logs/log-streamer.tssrc/diagnostic-collector.tssrc/commands/validators/agent-options.tssrc/cli-options.tssrc/services/agent-volumes/hosts-file.tssrc/services/agent-environment/environment-builder.tssrc/squid/ssl-bump.tssrc/ssl-bump.tssrc/host-env.tssrc/logs/log-aggregator.tssrc/upstream-proxy.tssrc/commands/main-action.tssrc/services/cli-proxy-service.tssrc/parsers/volume-parsers.tssrc/container-lifecycle.tssrc/pid-tracker.tssrc/container-cleanup.tssrc/commands/validators/config-assembly.tssrc/services/agent-environment/env-passthrough.tssrc/compose-sanitizer.tssrc/services/agent-volumes/home-strategy.tssrc/logs/log-formatter.tssrc/domain-patterns.tssrc/host-iptables-rules.tssrc/services/agent-service.tssrc/services/api-proxy-service.tssrc/config-file.tssrc/rules.tssrc/compose-generator.tssrc/option-parsers.tssrc/host-iptables.tssrc/squid-config.tssrc/docker-manager.tssrc/domain-patterns.ts(see above)src/cli-workflow.tssrc/commands/build-config.tssrc/commands/logs-audit.tssrc/commands/logs-stats.tssrc/commands/logs-summary.ts🔍 Notable Findings
src/commands/validators/network-options.ts— branch coverage 50%The warning paths for
!dockerHostCheck.valid && !dockerHostPathPrefixResolution.dockerHostPathPrefixare untested. This file was recently added and validates external Docker host detection — worth adding a test that setsDOCKER_HOSTto a TCP address without providing--docker-host-path-prefix.src/logs/log-parser.ts— branch coverage 67.1%Log parsing has many conditional branches for malformed/unexpected log formats. Missing tests likely cover edge cases like truncated lines, unexpected field counts, or non-standard Squid log formats.
src/services/agent-volumes/etc-mounts.ts— branch coverage 67.8%The
/etcselective bind-mount logic has several conditional paths (e.g., handling missing files, alternative path resolution). Missed branches here could silently expose unintended host paths.src/services/agent-environment/environment-builder.ts— branch coverage 66.7%Environment variable construction for the agent container has uncovered conditional paths. These could affect credential isolation if edge cases in env var resolution are not exercised.
📈 Recommendations
High — Add tests for
network-options.tsexternal Docker host branch: mockcheckDockerHost()to return{ valid: false }and assert the two warning log lines are emitted. Raises branch coverage from 50% → ~100%.Medium — Improve
log-parser.tsbranch coverage (67.1%): add tests with malformed Squid access log lines (too few fields, non-numeric timestamps, unknown decision codes) to cover error-handling paths.Medium — Cover
etc-mounts.tsmissing branches (67.8%): test the paths where optional/etcsource files don't exist on the host, ensuring the mount list is constructed correctly without throwing.Low — Cover
environment-builder.tsmissing branches (66.7%): add tests for edge cases where optional env vars are absent or set to empty strings.Generated by test-coverage-reporter workflow. Trigger:
push· Run: 26853126443Beta Was this translation helpful? Give feedback.
All reactions