Pulse/pkg/metrics
rcourtman b707512e38 Clear all errcheck and gofmt violations so make lint gates on real findings
golangci-lint run ./... failed on ~190 pre-existing errcheck violations and
5 unformatted files, burying any new regression in noise. Fix all of them:

- Test files that hand-rolled mock-mode set/restore (vmware, truenas, and
  friends) now use the canonical setMockModeForTest/testutil.SetMockMode
  helper instead of drift copies that ignored SetEnabled errors.
- internal/mock and internal/monitoring tests get package-local
  mustSetEnabled/mustSetMockEnabled/mustSetMonitorMockMode helpers that
  fail the test on toggle errors.
- pkg/auth/sqlite_manager.go, pkg/metrics/store.go, pkg/server/server.go:
  rollbacks in defers use the explicit-discard idiom, migration renames and
  rollup commits log failures, the hosted reaper goroutine logs an error
  exit, shutdown mock-disable logs failures.
- Remaining test sites check errors with t.Fatalf/t.Errorf or explicitly
  discard best-effort calls (restore-chmods, handler-closure unmarshals)
  per existing repo style.
- gofmt: internal/api/maintenance_verification.go, internal/ai/demo.go and
  three findings test files.

Only dupl findings remain (44 pre-existing production-code duplication
pairs) — those need real refactors, not mechanical fixes.

Full test suites pass for every touched package.
2026-06-09 21:42:21 +01:00
..
alert_metrics.go feat(enterprise): add Advanced Reporting and Audit Webhooks integration 2026-01-09 21:31:49 +00:00
alert_metrics_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
norace_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
race_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
store.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
store_additional_test.go metrics: drain freelist proportionally so metrics.db stops bloating 2026-06-05 13:29:48 +01:00
store_bench_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
store_downsample_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
store_loadtest_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
store_query_plan_test.go Optimize compact storage summary chart path 2026-04-10 19:09:12 +01:00
store_slo_test.go Add hosted-runner budget for metrics query SLO 2026-04-11 19:57:49 +01:00
store_test.go Defer metrics store startup maintenance 2026-04-01 13:29:39 +01:00