[Coverage Report] Test Coverage Report — 2026-06-01 #4132
Replies: 1 comment
-
|
🔮 The ancient spirits stir; the smoke test agent passed through the veil and left this omen in the latest discussion. 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.
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
95 test files · 142 source files
🔴 Critical Gaps (< 50% statement coverage)
src/commands/validators/network-options.ts🟡 Low Coverage (50–79% statement coverage)
No files in this range —
network-options.tsat 66.7% is the only file below 80%.🛡️ Security-Critical Path Status
src/host-iptables.tssrc/host-iptables-rules.tssrc/host-iptables-shared.tssrc/host-iptables-cleanup.tssrc/host-iptables-network.tssrc/squid-config.tssrc/squid/acl-generator.tssrc/squid/domain-acl.tssrc/squid/access-rules.tssrc/domain-patterns.tssrc/docker-manager.tssrc/cli.tsAll primary security-critical files are well covered.
src/cli.tshas a branch gap (50%) — the uncovered branch is the top-level entry guard (e.g.,if (require.main === module)), which is not exercisable in unit tests.📋 Full Coverage Table
All files sorted by statement coverage (ascending)
src/commands/validators/network-options.tssrc/services/agent-volumes/etc-mounts.tssrc/logs/audit-enricher.tssrc/cli.tssrc/logs/log-parser.tssrc/squid/policy-manifest.tssrc/services/agent-volumes/docker-host-staging.tssrc/commands/logs-command-helpers.tssrc/services/doh-proxy-service.tssrc/container-cleanup.tssrc/services/host-path-prefix.tssrc/config-writer.tssrc/commands/validators/log-and-limits.tssrc/services/agent-volumes/docker-socket.tssrc/logs/log-streamer.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/container-lifecycle.tssrc/logs/log-aggregator.tssrc/upstream-proxy.tssrc/commands/main-action.tssrc/services/cli-proxy-service.tssrc/parsers/volume-parsers.tssrc/services/agent-volumes/workspace-mounts.tssrc/pid-tracker.tssrc/commands/validators/config-assembly.tssrc/services/agent-environment/env-passthrough.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.ts🔍 Notable Findings
1.
src/commands/validators/network-options.ts— 66.7% stmt, 50.0% branch (🔴)This validator handles network-related CLI options (DNS servers, domain allowlists, etc.). The uncovered branches likely include edge-case validation errors. Given its role in configuring the firewall's domain policy, these paths should be tested.
2.
src/cli-options.ts— 93.0% stmt, 60.0% branch, 25.0% fnRecently modified (last 7 days). Only 25% function coverage despite 93% statement coverage suggests some exported functions (
program, option-accessor helpers) are defined but not directly exercised in tests — possibly because they are tested indirectly throughcli-workflow.ts. However, the 60% branch coverage leaves gap in option-combination logic.3.
src/services/agent-volumes/etc-mounts.ts— 82.5% stmt, 67.8% branchHandles selective
/etcbind mounts — a security-sensitive path (determines which host files are exposed inside the sandbox). The 32% uncovered branches likely include conditional logic for different OS configurations or fallback paths.4.
src/logs/audit-enricher.ts&src/logs/log-parser.ts— ~84–87% stmt, ~67–74% branchRecently active log subsystem files with moderate branch gaps. Uncovered branches likely include error-handling paths (malformed log lines, missing fields). Log parsing feeds the security audit trail — robust error handling matters.
📈 Recommendations
High —
src/commands/validators/network-options.ts: Add tests for invalid DNS server formats, malformed domain patterns, and boundary conditions. This is the entry gate for firewall policy configuration.Medium —
src/services/agent-volumes/etc-mounts.ts: Cover the uncovered branch paths — likely theif (fs.existsSync(...))guards and OS-variant conditionals that determine which/etcfiles get bind-mounted into the sandbox.Medium —
src/cli-options.ts: Export functions that are currently tested only through integration paths. Add direct unit tests for the uncovered option-accessor functions to bring function coverage from 25% to 100%.Low —
src/logs/log-parser.ts+src/logs/audit-enricher.ts: Add malformed-input tests (truncated lines, unexpected field counts, encoding edge cases) to cover the remaining ~13–16% of uncovered branches.Generated by test-coverage-reporter workflow. Trigger:
push· Run: 26774857851Beta Was this translation helpful? Give feedback.
All reactions