Pulse/internal/notifications
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
..
concurrency_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
delivery_receipts_test.go Add alert intent policies and delivery receipts 2026-07-20 20:27:39 +01:00
email_enhanced.go Thread alert emails with their resolved notifications 2026-07-11 18:22:07 +01:00
email_enhanced_test.go Thread alert emails with their resolved notifications 2026-07-11 18:22:07 +01:00
email_legacy_coverage_test.go Port RC3 maintenance fixes from v5 2026-05-01 20:28:11 +01:00
email_message_branchcov0724pm_test.go Cover the alert-spec matchers and the audit, email and update guards 2026-07-25 02:17:36 +01:00
email_providers.go chore: remove more dead code 2025-11-27 00:10:55 +00:00
email_template.go Show timezone on alert email start times 2026-07-16 09:29:01 +01:00
email_template_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
httptest_ipv4_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
notification_utils_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
notifications.go Redact webhook URLs in the rate limit drop logs 2026-07-24 22:22:52 +01:00
notifications_additional_test.go Harden scanned request and storage boundaries 2026-07-09 17:22:29 +01:00
notifications_resolved_apprise_test.go Harden scanned request and storage boundaries 2026-07-09 17:22:29 +01:00
notifications_security_cli_test.go Harden scanned request and storage boundaries 2026-07-09 17:22:29 +01:00
notifications_security_http_test.go Harden Apprise server URL base handling 2026-04-01 15:50:30 +01:00
notifications_test.go Add alert intent policies and delivery receipts 2026-07-20 20:27:39 +01:00
provider_client_isolation_test.go Add entitlement-gated report branding 2026-06-02 18:11:25 +01:00
queue.go Fix notification delivery health reporting 2026-07-23 23:38:35 +01:00
queue_observability_test.go Suppress recovery notifications when the firing never left the queue 2026-07-11 18:28:28 +01:00
queue_queryplan_test.go Fix notification delivery health reporting 2026-07-23 23:38:35 +01:00
queue_test.go Fix notification delivery health reporting 2026-07-23 23:38:35 +01:00
security_utils_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
templates_test.go Fix availability summaries and webhook secret handling 2026-07-24 11:56:30 +01:00
webhook_allowlist_test.go Harden repository advisory boundaries 2026-05-24 08:15:29 +01:00
webhook_client_test.go fix(notifications): webhook dialer tries every permitted resolved IP instead of pinning the first 2026-07-17 23:49:02 +01:00
webhook_enhanced.go Redact webhook URLs in the rate limit drop logs 2026-07-24 22:22:52 +01:00
webhook_enhanced_test.go Fix availability summaries and webhook secret handling 2026-07-24 11:56:30 +01:00
webhook_retry_test.go fix(notifications): classify webhook HTTP retries canonically 2026-03-27 12:15:17 +00:00
webhook_security_test.go Pin metadata GET zero-record payload contract 2026-06-10 10:53:57 +01:00
webhook_signing_test.go Pin metadata GET zero-record payload contract 2026-06-10 10:53:57 +01:00
webhook_templates.go Fix security scan findings 2026-07-01 09:55:35 +01:00
webhook_tenant_identity_test.go Stamp tenant identity into alert webhook payloads 2026-06-10 10:03:39 +01:00
webhook_url_redaction.go Fix availability summaries and webhook secret handling 2026-07-24 11:56:30 +01:00
webhook_url_redaction_test.go Redact webhook URLs in the rate limit drop logs 2026-07-24 22:22:52 +01:00