You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drive three coverage gaps to ≥95% (all hit 100%) via test seams, no waivers:
- internal/logsafe (88.9% → 100%): cover itoa's n==0 and defensive n<0
branches with a direct unit test.
- internal/migrations (93.9% → 100%): cover NewReader's ttl<=0 default-clamp
branch and queryState's COUNT-query error path with sqlmock.
- root package main.go (0% → 100%): introduce a run(ctx, deps) seam plus
realMain/main wrapper indirection. Extract setupLogger, resolvePlansPath,
loadPlanRegistry, newHealthzHandler, buildMux, serveLiveness/
startLivenessServer/shutdownLivenessServer, awaitShutdown, setupTelemetry/
telemetryCleanup, connectProvisioner, deployK8sInitOK, prodStartWorkers,
newSignalContext. Inject infra constructors (deps struct + package vars
osExit/signalCtxFn/realMainFn/newDeployK8sClients) so the full boot/shutdown
path is exercised with sqlmock + miniredis + a fake workerSet and a
cancelled context — no real Postgres/Redis/gRPC/River.
- cmd/smoke-buildinfo (0% → 50%): extract render(io.Writer) seam + test;
main() is the irreducible one-line wrapper.
Full suite `go test ./...` builds; target packages pass under -race;
go build ./... && go vet ./... clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments