Pulse/pkg/auth
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
..
auth_test.go feat: remove Enterprise badges, simplify Pro upgrade prompts 2026-01-09 16:51:08 +00:00
authorizer.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
authorizer_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
coverage_test.go feat: remove Enterprise badges, simplify Pro upgrade prompts 2026-01-09 16:51:08 +00:00
password.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
permissions.go security: add scope checks to AI Patrol and agent profile endpoints 2026-02-03 19:29:56 +00:00
policy_evaluator.go feat(auth): add policy evaluator and SQLite auth manager for RBAC 2026-01-12 15:20:49 +00:00
policy_evaluator_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
rbac.go fix(agent): add FreeBSD platform support to agent download and UI (#1051) 2026-01-11 23:51:12 +00:00
rbac_global_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
rbac_manager.go fix: replace hallucinated upgrade URLs with correct pulserelay.pro 2026-01-10 22:45:40 +00:00
rbac_manager_test.go fix: replace hallucinated upgrade URLs with correct pulserelay.pro 2026-01-10 22:45:40 +00:00
scopes.go Split audit log access into dedicated token scope 2026-04-22 07:59:12 +01:00
sqlite_manager.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
sqlite_manager_bench_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
sqlite_manager_queryplan_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
sqlite_manager_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
token.go feat: remove Enterprise badges, simplify Pro upgrade prompts 2026-01-09 16:51:08 +00:00