[Coverage Report] Test Coverage Report — 2026-05-12 #3046
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-05-19T18:59:06.169Z.
|
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
Overall coverage is strong and well above all enforced thresholds.
🔴 Critical Gaps (< 50% statement coverage)
src/commands/main-action.tsmain-action.tsis the top-level action dispatcher and is almost entirely uncovered. Its 0% branch coverage means no conditional paths have been exercised at all.🟡 Low Coverage (50–79% statement coverage)
src/commands/subcommands.tssrc/container-cleanup.ts🛡️ Security-Critical Path Status
src/squid-config.tssrc/domain-patterns.tssrc/host-iptables-rules.tssrc/host-iptables-cleanup.tssrc/host-iptables-shared.tssrc/cli.tssrc/docker-manager.tsAll primary security-critical files (Squid ACL generation, domain pattern matching, iptables rule generation) are at or above 94% statement coverage. The main concern is
cli.tswith only 50% branch coverage.📋 Full Coverage Table
Per-file breakdown (click to expand)
src/commands/main-action.tssrc/commands/subcommands.tssrc/container-cleanup.tssrc/config-writer.tssrc/logs/audit-enricher.tssrc/logs/log-parser.tssrc/cli.tssrc/squid/policy-manifest.tssrc/commands/logs-command-helpers.tssrc/services/doh-proxy-service.tssrc/cli-workflow.tssrc/commands/signal-handler.tssrc/services/agent-volumes.tssrc/logs/log-streamer.tssrc/cli-options.tssrc/squid/ssl-bump.tssrc/ssl-bump.tssrc/container-lifecycle.tssrc/logs/log-aggregator.tssrc/services/cli-proxy-service.tssrc/host-iptables-shared.tssrc/upstream-proxy.tssrc/pid-tracker.tssrc/host-iptables-rules.tssrc/logs/log-formatter.tssrc/services/agent-service.tssrc/domain-patterns.tssrc/services/agent-environment.tssrc/config-file.tssrc/rules.tssrc/host-env.tssrc/compose-generator.tssrc/services/api-proxy-service.tssrc/option-parsers.tssrc/host-iptables-cleanup.tssrc/commands/network-setup.tssrc/commands/preflight.tssrc/copilot-api-resolver.tssrc/logs/log-discovery.tssrc/squid-config.tssrc/logger.tssrc/cli-workflow.ts🔍 Notable Findings
src/commands/main-action.ts(7.1% stmt, 0% branch) — The top-level action entry point has virtually no test coverage. This includes the GitHub Actions integration path and error handling for the entire command dispatch. Any bug here would be invisible to the test suite.src/cli.tsbranch coverage (50%) — All 10 functions are covered, but half the conditional branches are untested. This likely includes error recovery paths (failed container start, signal handling edge cases, cleanup on error) — all security-relevant scenarios.src/commands/subcommands.ts(50% stmt, 21.4% branch) — Subcommand routing logic has very low branch coverage, meaning many command paths are never exercised in tests.src/cli-options.tsfunction coverage (25%) — Only 1 of 4 exported functions is covered despite 93% statement coverage, suggesting some functions have a single linear path tested but other exported functions remain entirely untouched.📈 Recommendations
High —
src/commands/main-action.ts: Add integration or unit tests for the main action dispatcher. Focus on: normal invocation, error paths (container start failure, invalid config), and cleanup-on-exit. Even a few smoke tests would dramatically improve this 7% → 60%+.High —
src/cli.tsbranch coverage: Add tests for the error branches: what happens whenstartContainers()throws, when the agent exits with non-zero code, or when SIGINT fires during startup. These are exactly the paths that fail silently in production.Medium —
src/commands/subcommands.ts: Cover the subcommand routing branches — particularly anyswitch/ifdispatching tologs,stats, andsummarysub-commands.Low —
src/container-cleanup.ts: 77% statement coverage with 100% function coverage suggests some cleanup error-handling branches (e.g.,docker rmfailure, partial cleanup) are not tested.Generated by test-coverage-reporter workflow. Trigger:
push· Run: 25755368378Beta Was this translation helpful? Give feedback.
All reactions