[Coverage Report] Test Coverage Report — 2026-06-02 #4238
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-06-09T23:46:20.429Z.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overall Coverage
Test suite: 2,329 tests across 110 suites — 1 test failing (flaky DNS resolution in
agent-volumes-mounts.test.ts, environment-specific IP mismatch).🔴 Critical Gaps (< 50% statement coverage)
None. All source files are above 50% statement coverage.
🟡 Low Coverage (50–79% statement coverage)
src/commands/validators/network-options.ts🛡️ Security-Critical Path Status
src/host-iptables.tssrc/squid-config.tssrc/docker-manager.tssrc/domain-patterns.tssrc/cli.tsThe three most security-sensitive modules (
host-iptables.ts,squid-config.ts,docker-manager.ts) all have 100% coverage across all metrics.📋 Coverage Table (files below 100%)
Click to expand — all files with less than 100% statement coverage
src/commands/validators/network-options.tssrc/services/agent-volumes/etc-mounts.tssrc/logs/audit-enricher.tssrc/services/agent-volumes/hosts-file.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/config-writer.tssrc/services/doh-proxy-service.tssrc/services/host-path-prefix.tssrc/services/api-proxy-service.tssrc/services/agent-volumes/docker-socket.tssrc/logs/log-streamer.tssrc/diagnostic-collector.tssrc/commands/validators/agent-options.tssrc/cli-options.tssrc/services/agent-environment/environment-builder.tssrc/squid/ssl-bump.tssrc/ssl-bump.tssrc/host-env.tssrc/services/agent-volumes/workspace-mounts.tssrc/logs/log-aggregator.tssrc/upstream-proxy.tssrc/commands/main-action.tssrc/services/cli-proxy-service.tssrc/container-lifecycle.tssrc/domain-patterns.tssrc/host-iptables-rules.ts🔍 Notable Findings
1.
src/cli.ts— 50% branch coverageThe main CLI entry point has only half its branches exercised. Uncovered branches likely include error/exception paths after container startup, signal handler edge cases, and
--keep-containerscleanup skipping logic. Since this is the orchestration core, these gaps represent untested failure modes.2.
src/commands/validators/network-options.ts— 50% branch / 66.7% statementThe network option validator is the lowest-covered non-test file overall. Missing branches likely cover invalid DNS server formats, conflicting option combinations (e.g.,
--enable-dind+ proxy options), and upstream proxy validation edge cases. This validator runs before any container starts — bugs here could silently misconfigure the firewall.3.
src/services/api-proxy-service.ts— 50% branch coverageThe API proxy service (which handles credential injection for OpenAI/Anthropic/Copilot) has significant branch gaps at 50%. Uncovered branches may include error handling when the upstream API is unreachable, port conflict handling, and the optional activation guard. Security-sensitive given it handles real API keys.
4.
src/logs/log-parser.ts— 67.1% branch coverageThe log parser has uncovered branches in Squid access log parsing — likely malformed line handling, unexpected field counts, and timestamp parsing edge cases. While not a security boundary, poor coverage here can hide silent log corruption that would affect
awf logs statsaccuracy.src/services/agent-volumes-mounts.test.tsis failing due to a DNS IP mismatch — the test expects140.82.121.4forgithub.qkg1.topbut the runner resolved it to140.82.113.3. This is an environment-specific issue with hardcoded expected IPs in the test.📈 Recommendations
High — Fix flaky test: Update
agent-volumes-mounts.test.tsto not hardcode specific IP addresses forgithub.qkg1.topandnpmjs.org. Use a pattern match or mock the DNS resolver to avoid environment-specific failures.High —
src/commands/validators/network-options.ts: Add tests for invalid DNS server input, conflicting network options, and upstream proxy validation edge cases. This code gates all firewall configuration.Medium —
src/cli.tsbranch coverage: Add tests for the error-path branches: what happens whenstartContainers()throws, when the agent command exits non-zero, and when cleanup is skipped due to--keep-containers. These represent real operational failure scenarios.Medium —
src/services/api-proxy-service.tsbranch coverage: Test the branches where the api-proxy sidecar is disabled (verify early returns work correctly) and where credential injection fails.Low —
src/logs/log-parser.ts: Add tests for malformed Squid log lines (truncated, extra fields, invalid timestamps) to harden the log aggregation pipeline against unexpected Squid output formats.Generated by test-coverage-reporter workflow. Trigger:
push· Run: 26854579797Beta Was this translation helpful? Give feedback.
All reactions