You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All five security-critical files maintain strong coverage. src/host-iptables.ts, src/squid-config.ts, and src/docker-manager.ts achieve 100% across all metrics.
With 22 uncovered branches in log parsing logic, there are likely malformed-input, empty-field, and protocol-edge-case paths that aren't exercised. Since this file feeds the awf logs stats / awf logs summary commands, gaps here could cause silent mis-reporting.
11 uncovered branches in the DinD bootstrap flow. These are complex infrastructure paths (filesystem prefix detection, socket path resolution) that are hard to test without a real DinD environment but are critical for ARC runner support.
4. Recent Code — All New Functions Are Covered ✅
The only commit in the last 7 days was a CI workflow change (removing dind-ubuntu image). The large set of new functions added to the codebase in recent weeks (validateApiProxyConfig, runMainWorkflow, buildConfig, audit/stats/summary commands, etc.) all have strong coverage, indicating the team is keeping tests current with new code.
📈 Recommendations
Medium — Branch coverage for network-options.ts: Add tests that mock checkDockerHost() returning invalid/external states and resolveDockerHostPathPrefix() returning dindHint: true. This covers the DinD warning paths at lines ~50–80 which represent real user-facing behavior.
Medium — Log parser edge cases: Add tests for malformed Squid log lines, truncated entries, missing fields, and unusual HTTP method/status combinations in src/logs/log-parser.ts. The 22 missing branches likely include these defensive guards.
Low — DinD bootstrap paths: Consider adding integration-style tests for src/dind-bootstrap.ts with mocked socket paths and filesystem configurations to improve the 66.66% branch coverage. These tests can be gated to avoid requiring actual Docker-in-Docker infrastructure.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
📊 Overall Coverage
108 test files covering 155 source files.
🔴 Critical Gaps (< 50% statement coverage)
None. All files exceed 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.tsAll five security-critical files maintain strong coverage.
src/host-iptables.ts,src/squid-config.ts, andsrc/docker-manager.tsachieve 100% across all metrics.📋 Files with Branch Coverage < 70%
src/cli.tsrequire.main === moduleguardsrc/commands/validators/network-options.tssrc/services/api-proxy-service.tssrc/dind-bootstrap.tssrc/services/agent-environment/environment-builder.tssrc/services/agent-volumes/etc-mounts.tssrc/logs/log-parser.ts🔍 Notable Findings
1.
src/commands/validators/network-options.ts— DinD Branch Gaps (🟡 Priority)This file validates Docker host and DinD options. The 5 uncovered branches correspond to the warning-emission paths when:
!dockerHostCheck.valid(external Docker daemon detected)!dockerHostCheck.valid && !dockerHostPathPrefixResolution.dockerHostPathPrefix(missing prefix warning)dockerHostPathPrefixResolution.dindHint && !dockerHostPathPrefixResolution.dockerHostPathPrefix(ARC/DinD hint without prefix)Tests would require mocking
checkDockerHost()to return{ valid: false }andresolveDockerHostPathPrefix()withdindHint: true.2.
src/logs/log-parser.ts— Log Parsing Edge Cases (68.57% branch coverage, 70 branches)With 22 uncovered branches in log parsing logic, there are likely malformed-input, empty-field, and protocol-edge-case paths that aren't exercised. Since this file feeds the
awf logs stats/awf logs summarycommands, gaps here could cause silent mis-reporting.3.
src/dind-bootstrap.ts— DinD Bootstrap Paths (66.66% branch coverage, 33 branches)11 uncovered branches in the DinD bootstrap flow. These are complex infrastructure paths (filesystem prefix detection, socket path resolution) that are hard to test without a real DinD environment but are critical for ARC runner support.
4. Recent Code — All New Functions Are Covered ✅
The only commit in the last 7 days was a CI workflow change (removing dind-ubuntu image). The large set of new functions added to the codebase in recent weeks (
validateApiProxyConfig,runMainWorkflow,buildConfig, audit/stats/summary commands, etc.) all have strong coverage, indicating the team is keeping tests current with new code.📈 Recommendations
Medium — Branch coverage for
network-options.ts: Add tests that mockcheckDockerHost()returning invalid/external states andresolveDockerHostPathPrefix()returningdindHint: true. This covers the DinD warning paths at lines ~50–80 which represent real user-facing behavior.Medium — Log parser edge cases: Add tests for malformed Squid log lines, truncated entries, missing fields, and unusual HTTP method/status combinations in
src/logs/log-parser.ts. The 22 missing branches likely include these defensive guards.Low — DinD bootstrap paths: Consider adding integration-style tests for
src/dind-bootstrap.tswith mocked socket paths and filesystem configurations to improve the 66.66% branch coverage. These tests can be gated to avoid requiring actual Docker-in-Docker infrastructure.📋 Full Coverage Table (click to expand)
src/commands/validators/network-options.tssrc/squid-log-reader.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/logs-command-helpers.tssrc/dind-bootstrap.tssrc/services/doh-proxy-service.tssrc/commands/validators/log-and-limits.tssrc/services/host-path-prefix.tssrc/config-writer.tssrc/services/api-proxy-service.tssrc/services/agent-volumes/docker-socket.tssrc/logs/log-streamer.tssrc/services/agent-volumes/system-mounts.tssrc/diagnostic-collector.tssrc/commands/build-config.tssrc/commands/validators/agent-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/services/cli-proxy-service.tssrc/commands/main-action.tssrc/parsers/volume-parsers.tssrc/container-startup-diagnostics.tssrc/services/agent-volumes/workspace-mounts.tssrc/container-cleanup.tssrc/container-lifecycle.tssrc/services/agent-environment/env-passthrough.tssrc/compose-sanitizer.tssrc/commands/validators/config-assembly.tssrc/logs/log-formatter.tssrc/domain-patterns.tssrc/services/agent-service.tssrc/services/agent-volumes/home-strategy.tssrc/config-file.tssrc/rules.tssrc/compose-generator.tssrc/pid-tracker.tssrc/option-parsers.tssrc/api-proxy-config.tssrc/cli-options.tssrc/cli-workflow.tssrc/docker-manager.tssrc/domain-patterns.tssrc/host-iptables.tssrc/host-iptables-rules.tssrc/host-iptables-shared.tssrc/squid-config.tssrc/squid/access-rules.tssrc/squid/acl-generator.tssrc/squid/config-generator.tssrc/squid/domain-acl.tssrc/squid/validation.ts(Full table with all 130+ entries omitted for brevity — only files ≥ 80% statement coverage not shown above)
Generated by test-coverage-reporter workflow. Trigger:
scheduleBeta Was this translation helpful? Give feedback.
All reactions