[Coverage Report] Test Coverage Report — 2026-06-11 #4721
Replies: 3 comments
-
|
🔮 The ancient spirits stir; the smoke test agent passed through the veil and left this rune behind.
|
Beta Was this translation helpful? Give feedback.
-
|
This discussion was automatically closed because it expired on 2026-06-18T00:39:29.646Z.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir, and the smoke-test agent has passed through this discussion. The omens are clear: the build held, the browser bore GitHub’s name, and the workflow remained intact. 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.
Uh oh!
There was an error while loading. Please reload this page.
-
📊 Test Coverage Report — 2026-06-11
Overall Coverage
108 test files covering 155 source files (47 test-utils/helpers excluded from counts).
🔴 Critical Gaps (< 50% statement coverage)
None. All files are above 50% statement coverage.
🟡 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-network.tssrc/host-iptables-cleanup.tssrc/host-iptables-shared.tssrc/squid-config.tssrc/squid/access-rules.tssrc/squid/acl-generator.tssrc/squid/domain-acl.tssrc/docker-manager.tssrc/domain-patterns.tssrc/rules.tssrc/squid/ssl-bump.tssrc/squid/policy-manifest.tssrc/cli.ts📋 Notable Files with Incomplete Coverage
Files below 100% that warrant attention (security-critical or low branch coverage):
src/commands/validators/network-options.tssrc/services/api-proxy-service.tssrc/services/agent-environment/environment-builder.tssrc/dind-bootstrap.tssrc/services/agent-volumes/etc-mounts.tssrc/logs/log-parser.tssrc/artifact-preservation.tssrc/squid/policy-manifest.tssrc/cli.ts📋 Full Coverage Table (all files with imperfect coverage)
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/agent-volumes/docker-socket.tssrc/services/api-proxy-service.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/commands/main-action.tssrc/upstream-proxy.tssrc/services/cli-proxy-service.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.ts🔍 Notable Findings
1.
src/commands/validators/network-options.ts— DinD/Docker host warning paths untested (lines 48–77)The function
validateNetworkOptionshas branches for external DOCKER_HOST detection and ARC/DinD split-filesystem hints (lines 47–77). These emitlogger.warn()calls that require an external Docker socket to trigger. No test covers the!dockerHostCheck.validordindHintbranches, leaving two out of four network-option validation branches uncovered.2.
src/cli.ts— 50% branch coverage on module guard (line 11–12)The only uncovered lines are the top-level
if (require.main === module)guard. This is a structural limitation of unit tests that import the module rather than invoke it as a process entry point. The execution path itself is indirectly exercised by integration-style tests incli-workflow.test.ts.3.
src/logs/log-parser.ts— IPv6 destination parsing uncovered (lines 178–203)The bracketed-IPv6 parser branch (
rawDest.startsWith('[')) is not exercised by any test. Since Squid access logs can contain IPv6 destination addresses, this path could silently produce incorrectdestIp/destPortvalues for IPv6 upstreams. Added as part of the structured log parsing refactor.4.
src/artifact-preservation.ts— New file from recent commit, 85% statement coverageCommit
e99d0a8(2026-06-10) introducedsrc/artifact-preservation.tsto persist a redacted resolved-config audit artifact at startup. Uncovered lines are in error-handlingcatchblocks for filesystem failures. The happy path is well tested; the failure paths (permissions errors, disk-full scenarios) are not.📈 Recommendations
High —
src/logs/log-parser.tsIPv6 parsing (lines 178–203): Add a unit test that passes a Squid log line with a bracketed-IPv6 destination (e.g.,[2001:db8::1]:443). This is a latent correctness bug in a security-relevant log path — incorrect dest IP/port would silently corrupt audit records.Medium —
src/commands/validators/network-options.tsDinD warning branches (lines 47–77): MockcheckDockerHost()to return{ valid: false }andresolveDockerHostPathPrefix()to return{ dindHint: true, dockerHostPathPrefix: undefined }to cover the two missing branch pairs.Medium —
src/artifact-preservation.tserror paths: Add tests that mockfs.writeFileSyncto throw, confirming that filesystem errors during config persistence are handled gracefully and don't abort the main workflow.Low —
src/squid/policy-manifest.tsanonymous functions (3 uncovered, 70% fn coverage): The three uncovered anonymous functions appear to be lazy-eval accessors. Add tests exercisingfindPolicyManifestForSource()with source inputs that trigger the lazy paths.Generated by test-coverage-reporter workflow on 2026-06-11. Trigger:
push. Commit:e99d0a8(feat: persist redacted resolved config as audit artifact).Beta Was this translation helpful? Give feedback.
All reactions