[Coverage Report] Test Coverage Report — 2026-06-05 #4378
Closed
Replies: 2 comments
-
|
🔮 The ancient spirits stir, and the smoke test agent has passed through these halls. The run leaves a brief omen of success upon the 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
-
|
This discussion was automatically closed because it expired on 2026-06-12T14:42:01.546Z.
|
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-05
Overall Coverage
100 test files, 151 source files, 28,781 lines of test code. Coverage is measured across 133 instrumented files; 18 uncovered files are type-only (
src/types/*.ts).🔴 Critical Gaps (< 50% statement coverage)
None. All source files are above 50%.
🟡 Low Coverage (50–79% statement coverage)
src/commands/validators/network-options.ts🛡️ 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/config-sections.tssrc/docker-manager.tssrc/domain-patterns.tssrc/cli.tsrequire.main === moduleguard📋 Full Coverage Table (files with < 100% coverage)
Expand to see all 65 non-perfect files
src/commands/validators/network-options.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/commands/validators/log-and-limits.tssrc/services/doh-proxy-service.tssrc/services/host-path-prefix.tssrc/config-writer.tssrc/services/api-proxy-service.tssrc/services/agent-volumes/docker-socket.tssrc/logs/log-streamer.tssrc/diagnostic-collector.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/commands/main-action.tssrc/services/cli-proxy-service.tssrc/parsers/volume-parsers.tssrc/container-lifecycle.tssrc/services/agent-volumes/workspace-mounts.tssrc/container-cleanup.tssrc/services/agent-environment/env-passthrough.tssrc/commands/validators/config-assembly.tssrc/compose-sanitizer.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/commands/build-config.tssrc/commands/logs-audit.tssrc/commands/network-setup.tssrc/commands/preflight.tssrc/commands/signal-handler.tssrc/copilot-api-resolver.internal.tssrc/dind-probe.tssrc/dns-resolver.tssrc/host-identity.tssrc/host-iptables-rules.tssrc/host-iptables-shared.tssrc/logger.tssrc/logs/log-discovery.tssrc/logs/stats-formatter.tssrc/services/agent-environment/api-proxy-environment.tssrc/services/agent-environment/github-actions-environment.tssrc/services/agent-environment/host-path-recovery.tssrc/services/agent-environment/tool-specific-environment.tssrc/services/api-proxy-service-config.tssrc/squid/config-sections.ts🔍 Notable Findings
src/commands/validators/network-options.ts— 50% branch coverage (7 uncovered statements).This validator handles Docker host path prefix and DinD detection — security-adjacent code. The two uncovered
ifbranches arounddockerHostPathPrefixResolutionedge-cases (lines 59 and 64) are not exercised: the case where the prefix is absent but the DinD hint fires, and the combined!dockerHostCheck.valid && !prefixpath.src/logs/log-parser.ts— 67.14% branch coverage (23 uncovered branches acrossparseLogLineandparseAuditJsonlLine).The parser covers the happy path well, but malformed log-line variants (truncated fields, unexpected tokens, negative counts) are not tested. Log parsing drives the audit and firewall summary commands, so incorrect failure-mode handling could silently produce wrong statistics.
src/services/agent-volumes/etc-mounts.ts— 67.85% branch coverage (9 uncovered branches).buildEtcMountsconstructs the selective/etcbind-mount list. Uncovered branches are in the platform- and option-conditional mount logic. A missed branch here could expose host files (e.g.,/etc/shadow) inside the agent container.src/cli.ts— 50% branch coverage (1 uncovered branch).The uncovered branch is the
require.main === moduleguard. This is structurally hard to exercise in Jest without spawning a child process; it does not represent a real functional gap.📈 Recommendations
High —
network-options.tsbranch gaps (src/commands/validators/network-options.ts): Add two unit tests forvalidateNetworkOptionscovering (a)dindHint=truewith no resolved prefix and (b) invalid docker host path with no prefix. These branches guard DinD security decisions.Medium —
log-parser.tsmalformed input (src/logs/log-parser.ts): Add property-based or table-driven tests forparseLogLinewith truncated/corrupted Squid log lines (fewer than 9 fields, negative byte counts, missing%rmmethod token). Target: raise branch coverage above 85%.Medium —
etc-mounts.tsconditional mounts (src/services/agent-volumes/etc-mounts.ts): Add tests forbuildEtcMountswith DinD enabled, with--docker-host-path-prefixset, and without optional config keys — the 9 uncovered branches map directly to those combinations.Low —
audit-enricher.tsedge cases (src/logs/audit-enricher.ts):enrichWithPolicyRulesandcomputeRuleStatshave 16 uncovered branches (74.13%). Tests for empty rule-set and no-match scenarios would improve coverage with minimal effort.Generated by test-coverage-reporter workflow. Trigger:
push· Run:27021193452· Coverage data fromcoverage/coverage-summary.json(2026-06-05T14:36:48Z)Beta Was this translation helpful? Give feedback.
All reactions