Pulse/pkg
rcourtman ac5b595e97 Cover the alert-spec matchers and the audit, email and update guards
A third pass on partially covered functions, led by the alert evaluation
predicates where a wrong arm means a missed or spurious alert.

- internal/alerts/specs: matches 47.9 to 100, and all six matches helpers
  (severity threshold, change threshold, baseline anomaly, health assessment,
  posture threshold, and the severity latch) from 50 to 75 percent up to 100.
  Each threshold is pinned at, just below and just above, and the latch arm is
  exercised both latched and unlatched with concrete verdicts.
- pkg/audit: exportCSV 76 to 88 with commas, quotes and newlines in the detail
  field asserted through a parsed round-trip; NewSigner error arms, both
  IsPersistent predicates and VerifySignature against a tampered payload and a
  wrong key.
- internal/agentupdate: retryBackoffDelay, sleepWithContext, Snapshot and
  writeSelfTestTokenFile to 100, the token file exercised under t.TempDir
  including the unwritable-directory arm.
- internal/notifications: writeMultipartBodyPart and alertNodeDisplay to 100,
  attachment handling to 69, all asserted on the produced MIME text. No test
  opens a network or SMTP connection.
- internal/unifiedresources: the three pure action-dispatch helpers to 100.
- internal/alerts/config: CanonicalResourceTypeKeys 34.3 to 78.4.

Five targets deliberately did not move and are recorded rather than faked:
the error arms of writeEmailThreadingHeaders, buildMultipartEmailMessage and
copyWebhookConfig are unreachable because those functions write only into a
local bytes.Buffer, which never errors; exportJSON's only gap is a
json.MarshalIndent failure that its event struct cannot produce; and
verifyBinaryMagic's remaining gap is a deferred close-error handler.

No source file is modified. Adversarial review returned no rejects and flagged
seven near-duplicate subtests; all were removed and every target function
re-measured at an identical percentage.

PULSE_ALLOW_CONTRACT_NEUTRAL_COMMIT=test-only branch coverage, no source or contract change
2026-07-25 02:17:36 +01:00
..
agents Fix Docker report size contract drift 2026-07-23 23:57:42 +01:00
aicontracts Add coverage tests for agentexec lifecycle codec and aicontracts pure helpers 2026-07-17 06:53:16 +01:00
audit Cover the alert-spec matchers and the audit, email and update guards 2026-07-25 02:17:36 +01:00
auth Keep admin recovery reachable when the legacy RBAC import fails 2026-07-24 22:56:09 +01:00
cloudauth fix(hosted): preserve direct handoff membership continuity 2026-03-26 23:40:02 +00:00
db Cover cloud tenant registry queries, unified views and slowlog wrappers 2026-07-22 21:41:02 +01:00
discovery Harden remaining CodeQL security boundaries 2026-07-09 19:46:40 +01:00
diskinventory Fix Proxmox physical disk inventory continuity 2026-07-23 22:05:09 +01:00
edition Block in-app self-update on the Pro binary to prevent silent downgrade 2026-07-08 10:02:04 +01:00
extensions Fix audit storage migration and viewer races 2026-07-24 10:33:57 +01:00
fsfilters Improve Machines disk summaries 2026-06-03 11:09:58 +01:00
licensing Add Go branch-coverage tests for twelve pure backend helpers 2026-07-19 15:10:09 +01:00
metrics Expand metrics checkpoint profiling 2026-07-24 10:07:33 +01:00
pbs Fix PBS job task history filters 2026-05-13 17:09:45 +01:00
pmg Harden outbound URLs and file-backed storage 2026-03-29 12:47:55 +01:00
proxmox Add legacy issue regression coverage 2026-07-24 11:59:50 +01:00
pulsecli Enforce server-owned action approval authority 2026-07-11 19:49:17 +01:00
reporting Make report branding PDF assertion case-insensitive 2026-07-21 10:23:06 +01:00
securityutil Cover the missing arms of the SSRF, clone and classifier guards 2026-07-25 00:39:15 +01:00
server Fix agent command channel admission 2026-07-24 13:00:03 +01:00
tlsutil fix(tlsutil): discard the subprocess kill error explicitly 2026-07-17 17:26:55 +01:00