Skip to content

fix(audit): bind NotificationCommand type T + propagate schedule cid (St#14

Merged
fupelaqu merged 2 commits into
mainfrom
feature/audit
Jun 16, 2026
Merged

fix(audit): bind NotificationCommand type T + propagate schedule cid (St#14
fupelaqu merged 2 commits into
mainfrom
feature/audit

Conversation

@fupelaqu

Copy link
Copy Markdown
Contributor

…ory 13.7 Phase B)

  • NotificationCommand overrides type T = NotificationCommand (sound withCorrelationId cast).
  • TriggerSchedule4Notification: cmd.schedule.correlationId.orElse(cmd.correlationId) so the
    synthetic stream cid is not dropped by the import-shadowing.
  • document that the notification_sent/notification_failed 'template' field is N/A at the
    notification-pod layer.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

fupelaqu and others added 2 commits June 15, 2026 15:38
…(Story 13.7 gate #3)

Carry a single correlation id from the originating schedule through to the
notification's terminal audit line, so one id links schedule_fired to
notification_sent across the round-trip.

- NotificationCommand extends AuditableCommand; ScheduleNotification is now a
  case class (carries a per-instance cid) and TriggerSchedule4Notification
  propagates it to the self-sent ScheduleNotification.
- Scheduler2NotificationProcessorStream derives the cid from
  schedule.correlationId (deterministic fallback) and emits
  schedule_fired / schedule_not_fired / schedule_failed (actor=scheduler).
- NotificationBehavior threads the cid (notification.correlationId orElse
  cmd.correlationId) through sendNotification and stamps it on the notification
  before send, so notification_sent/_failed carry it; created schedules carry
  it too (AddNotification / ResendNotification / ScheduleNotification).
- NotificationAuditLog promoted to a proper object exposing the shared
  AuditLog("notification").
- testkit: round-trip assertions (schedule.correlationId == cid) + logback.xml.
…(Story 13.7 Phase B)

- NotificationCommand overrides `type T = NotificationCommand` (sound withCorrelationId cast).
- TriggerSchedule4Notification: cmd.schedule.correlationId.orElse(cmd.correlationId) so the
  synthetic stream cid is not dropped by the import-shadowing.
- document that the notification_sent/notification_failed 'template' field is N/A at the
  notification-pod layer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.70588% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.56%. Comparing base (5e4f97e) to head (7bf2282).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../query/Scheduler2NotificationProcessorStream.scala 42.85% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   70.94%   70.56%   -0.38%     
==========================================
  Files          61       61              
  Lines        1122     1145      +23     
  Branches      178      174       -4     
==========================================
+ Hits          796      808      +12     
- Misses        326      337      +11     
Flag Coverage Δ
unittests 70.56% <64.70%> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fupelaqu fupelaqu merged commit 4c100f9 into main Jun 16, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant