[Coverage Report] Test Coverage Report — 2026-05-12 #3049
Replies: 4 comments
-
|
This discussion was automatically closed because it expired on 2026-05-19T19:50:04.970Z.
|
Beta Was this translation helpful? Give feedback.
-
|
🔮 The ancient spirits stir... the smoke test agent passed beneath the arch of this discussion and left this oracle mark in the loglight. 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.
-
|
🔮 The ancient spirits stir... the smoke test oracle passed through this chamber, leaving a brief shimmer in the workflow ether. 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.
-
|
🔮 The ancient spirits stir: the Codex smoke test agent passed through this chamber and left a small shimmer in the runes. 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.
-
📊 Overall Coverage
70 files instrumented · 63 test files
🔴 Critical Gaps (< 50% statement coverage)
src/commands/main-action.tsmain-action.tsis a 607-line orchestration function (createMainAction) that wires together almost every subsystem. It has near-zero coverage — only the exported symbol is reached, none of the logic inside.🟡 Low Coverage (50–79% statement coverage)
src/commands/subcommands.tssrc/container-cleanup.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/docker-manager.tssrc/domain-patterns.tssrc/cli.tsAll primary security-critical modules are well-covered.
cli.tsbranch coverage at 50% is worth investigating (likely theif (require.main === module)guard and error-handling paths).📋 Full Coverage Table
All 70 instrumented files
commands/main-action.tscommands/subcommands.tscontainer-cleanup.tsconfig-writer.tslogs/audit-enricher.tslogs/log-parser.tscli.tssquid/policy-manifest.tscommands/logs-command-helpers.tscli-workflow.tsservices/doh-proxy-service.tscommands/signal-handler.tsservices/agent-volumes.tslogs/log-streamer.tscli-options.tssquid/ssl-bump.tsssl-bump.tscontainer-lifecycle.tslogs/log-aggregator.tsservices/cli-proxy-service.tshost-iptables-shared.tsupstream-proxy.tspid-tracker.tshost-iptables-rules.tslogs/log-formatter.tsservices/agent-service.tsdomain-patterns.tsservices/agent-environment.tsconfig-file.tsrules.tshost-env.tscompose-generator.tsservices/api-proxy-service.tsoption-parsers.tsapi-proxy-config.tscopilot-api-resolver.tsdlp.tsdns-resolver.tsdocker-manager.tsdomain-utils.tsenv-utils.tshost-iptables-cleanup.tshost-iptables-network.tshost-iptables.tsimage-tag.tslogger.tsredact-secrets.tsschema-validator.tssquid-config.tscommands/logs-audit.tscommands/logs-stats.tscommands/logs-summary.tscommands/logs.tscommands/network-setup.tscommands/predownload.tscommands/preflight.tslogs/index.tslogs/log-discovery.tslogs/stats-formatter.tsservices/squid-service.tssquid/domain-acl.tssquid/upstream-proxy.ts🔍 Notable Findings
commands/main-action.ts— near-zero coverage (7%): This file containscreateMainAction, a 607-line function that is the core orchestration path forawf run. Only the export declaration is reached; none of the argument handling, container startup, or teardown logic is exercised. A single integration-style test using mocked docker/execa would dramatically improve this.cli.tsbranch coverage at 50%: The two uncovered branches are most likely therequire.main === moduleguard (intentionally hard to test) and error/rejection paths in the top-level async wrapper. Adding tests that simulate CLI argument failures would close this gap.commands/subcommands.tsbranch coverage at 21%: ContainsvalidateFormat,handlePredownloadAction, andregisterSubcommands. TheregisterSubcommandsfunction likely has uncovered commander callback branches.Recently modified files lack branch coverage: The single commit in the last 7 days (
feat: gate token steering behind opt-in flag) touchedcli-options.tsandcli.ts.cli-options.tsfunction coverage is 25% (3 of 4 functions uncovered) — the new opt-in flag logic may not be tested yet.📈 Recommendations
High —
commands/main-action.ts: Add integration tests forcreateMainActionusing mockedexecaand container helpers. Even 2–3 happy-path tests would bring this from 7% to ~60%. This is the primary execution path of the entire tool.Medium —
cli.ts+cli-options.tsbranch coverage: Add tests covering error-rejection paths (bad domain, missing command) and the newly added opt-in flag to bring branch coverage from 50%/60% to ≥80%.Low —
commands/subcommands.ts: CovervalidateFormatwith invalid format strings andhandlePredownloadActionwith both success and error cases. Branch coverage currently at 21%.Generated by test-coverage-reporter workflow · Trigger:
push· Run: 25758174479Beta Was this translation helpful? Give feedback.
All reactions