[Coverage Report] Test Coverage Report — 2026-06-13 #4885
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-06-20T16:08:52.995Z.
|
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.
-
📊 Test Coverage Report — 2026-06-13
Overall Coverage
Overall coverage is excellent — substantially improved from the 38% recorded in
COVERAGE_SUMMARY.md(a historical snapshot).🔴 Critical Gaps (< 50% statement coverage)
None. All source files exceed 50% statement coverage.
🟡 Low Coverage (50–79% statement coverage)
src/commands/validators/network-options.tsThis file validates
--allow-host-access,--upstream-proxy, and related network flags — uncovered branches here mean some network validation error paths are untested.🛡️ Security-Critical Path Status
src/host-iptables.ts(barrel)src/host-iptables-rules.tssrc/host-iptables-shared.tssrc/host-iptables-cleanup.tssrc/host-iptables-network.tssrc/squid-config.ts(barrel)src/squid/acl-generator.tssrc/squid/access-rules.tssrc/squid/domain-acl.tssrc/squid/config-generator.tssrc/squid/config-sections.tssrc/squid/policy-manifest.tssrc/domain-patterns.tssrc/docker-manager.ts(barrel)src/cli.tssrc/services/agent-volumes/etc-mounts.ts📋 Full Coverage Table (files with branch coverage < 80%)
src/cli.tssrc/commands/validators/network-options.tssrc/services/agent-environment/environment-builder.tssrc/services/agent-volumes/etc-mounts.tssrc/logs/log-parser.tssrc/squid/policy-manifest.tssrc/services/agent-volumes/docker-host-staging.tssrc/services/agent-volumes/workspace-mounts.tssrc/services/agent-volumes/system-mounts.tssrc/commands/validators/log-and-limits.tssrc/host-env.tssrc/logs/log-streamer.ts🔍 Notable Findings
src/cli.ts— 50% branch coverage: The main entry point has one uncovered branch (1/2). Given it's the top-level orchestrator that wires up signal handling and container lifecycle, the uncovered branch likely relates to an error/edge condition in startup that deserves a dedicated test.src/services/agent-volumes/etc-mounts.ts— 67.85% branch coverage: This module controls which/etcfiles are bind-mounted into the agent container (SSL certs,passwd,group,nsswitch.conf— but NOT/etc/shadow). With 9 of 28 branches uncovered, there are untested paths in the security-sensitive logic that prevents sensitive files from leaking into the agent environment.src/squid/policy-manifest.ts— 70% function coverage (3 functions uncovered): The policy manifest assembles the final set of Squid rules and ACLs. Three uncovered functions mean some policy-assembly paths (e.g., specific preset combinations or edge-case domain configurations) are never exercised in tests.src/logs/log-parser.ts— 68.57% branch coverage: The Squid access log parser has 22 uncovered branches out of 70. Malformed or unusual log lines may hit unexercised parse paths, making it harder to trust log-based audit trails for security analysis.📈 Recommendations
High — Add branch tests for
src/services/agent-volumes/etc-mounts.ts: Cover the conditional logic that decides which/etcfiles are mounted. A test should verify that/etc/shadowand other sensitive paths are never included regardless of configuration. Target: raise branches from 67.85% → 90%+.High — Cover missing functions in
src/squid/policy-manifest.ts: The 3 uncovered functions likely handle specific policy presets or domain-list edge cases. Add unit tests for all exported functions to reach 100% function coverage on this security-critical module.Medium — Cover the uncovered branch in
src/cli.ts: A single uncovered branch (50%) at the entry point is a blind spot. Identify whether it's an error-path or feature-flag branch and add a test targeting that condition.Low — Improve
src/logs/log-parser.tsbranch coverage: Add tests for malformed log lines, truncated entries, and unusual timestamp formats to bring branch coverage above 80%. This improves reliability of theawf logsaudit commands.Generated by test-coverage-reporter workflow. Trigger:
pushBeta Was this translation helpful? Give feedback.
All reactions