Commit Graph

813 Commits

Author SHA1 Message Date
Joseph Doherty
e471a5a855 docs(requirements): add Site Calls page to Central UI 2026-05-19 11:56:02 -04:00
Joseph Doherty
77cc4865c5 docs(requirements): add SiteCalls table and purge to Configuration Database 2026-05-19 11:53:54 -04:00
Joseph Doherty
d46cb56934 docs(requirements): correct cached-call telemetry lifecycle states in Communication 2026-05-19 11:52:34 -04:00
Joseph Doherty
d43d43d795 docs(requirements): add cached-call telemetry pattern to Communication 2026-05-19 11:50:55 -04:00
Joseph Doherty
00ec265980 docs(requirements): add Tracking.Status and cached-call handles to Script Runtime API 2026-05-19 11:48:45 -04:00
Joseph Doherty
f839f6ce45 docs(requirements): make cached-write and cached-call docs symmetric 2026-05-19 11:47:30 -04:00
Joseph Doherty
354314dfe0 docs(requirements): cached calls return TrackedOperationId in ESG 2026-05-19 11:45:41 -04:00
Joseph Doherty
320e4d7479 docs(requirements): document Failed terminal state for permanent cached-call failures 2026-05-19 11:44:23 -04:00
Joseph Doherty
17ef5f85de docs(requirements): add site-local tracking table and telemetry to Store-and-Forward 2026-05-19 11:42:20 -04:00
Joseph Doherty
5efbb9a985 docs(requirements): name TrackedOperationKind enum and clarify status-enum relationships 2026-05-19 11:40:18 -04:00
Joseph Doherty
397498c120 docs(requirements): add TrackedOperationId and cached-call contracts to Commons 2026-05-19 11:37:04 -04:00
Joseph Doherty
e0026c6da7 docs(requirements): clarify Site Call Audit lifecycle states and actionability 2026-05-19 11:34:44 -04:00
Joseph Doherty
627c48c458 docs(requirements): add Site Call Audit component (#22) 2026-05-19 11:32:00 -04:00
Joseph Doherty
a08ad09514 docs(plans): add cached-call tracking implementation plan 2026-05-19 11:30:21 -04:00
Joseph Doherty
e7ed858920 docs(plans): design cached-call tracking with trackable IDs
Add TrackedOperationId handles to CachedCall/CachedWrite under a unified tracking model. New site-local tracking table is the status source of truth; new central Site Call Audit component (#22) mirrors status via telemetry, exposes KPIs and a Site Calls UI page with central->site Retry/Discard.
2026-05-19 11:26:37 -04:00
Joseph Doherty
f749a5f977 test(central-ui): cover the Notifications nav section in Playwright nav tests 2026-05-19 06:45:55 -04:00
Joseph Doherty
547a7b98e5 fix(central-ui): load notification-list recipients sequentially to avoid concurrent DbContext use 2026-05-19 06:34:32 -04:00
Joseph Doherty
7ecf6448e3 docs(plans): mark Notifications nav group tasks complete 2026-05-19 06:31:23 -04:00
Joseph Doherty
562a1d1678 test(central-ui): assert the Health KPIs link is a real anchor element 2026-05-19 06:24:39 -04:00
Joseph Doherty
82745ef916 feat(central-ui): link Health outbox tiles to the Notification KPIs page 2026-05-19 06:22:02 -04:00
Joseph Doherty
0be1feb561 feat(central-ui): add the Notifications nav section 2026-05-19 06:17:58 -04:00
Joseph Doherty
8bb860ad5f test(central-ui): cover the per-site KPI error path on the Notification KPIs page 2026-05-19 06:14:19 -04:00
Joseph Doherty
22bac058dd feat(central-ui): Notification KPIs page with per-site breakdown 2026-05-19 06:09:43 -04:00
Joseph Doherty
34e464edab refactor(central-ui): split Notification Report out of the Outbox page 2026-05-19 06:03:15 -04:00
Joseph Doherty
016f5d48a6 refactor(central-ui): co-locate NotificationListForm with the Notifications pages 2026-05-19 05:59:40 -04:00
Joseph Doherty
36332e5a94 refactor(central-ui): move Notification List form to /notifications, drop External Systems tab 2026-05-19 05:56:45 -04:00
Joseph Doherty
0fa4ac5525 refactor(central-ui): contextual errors, parallel recipient load, delete-path test for Notification Lists 2026-05-19 05:54:48 -04:00
Joseph Doherty
0f90c0ad9c feat(central-ui): standalone Notification Lists page 2026-05-19 05:49:45 -04:00
Joseph Doherty
25beb833fc refactor(central-ui): move SMTP Configuration page to /notifications/smtp 2026-05-19 05:45:06 -04:00
Joseph Doherty
c95758c6ce feat(notification-outbox): CommunicationService per-site KPI accessor 2026-05-19 05:41:35 -04:00
Joseph Doherty
1629a72093 feat(notification-outbox): actor handler for per-site KPI requests 2026-05-19 05:37:14 -04:00
Joseph Doherty
adcab9dcfc feat(notification-outbox): per-site KPI request/response message contracts 2026-05-19 05:33:37 -04:00
Joseph Doherty
d54c3da291 test(notification-outbox): exercise per-site oldest-age reduction and Retrying status 2026-05-19 05:32:06 -04:00
Joseph Doherty
1bb0e62bb3 feat(notification-outbox): per-site KPI aggregation in the repository 2026-05-19 05:26:20 -04:00
Joseph Doherty
67b86aa683 feat(notification-outbox): per-site KPI snapshot type + repository contract 2026-05-19 05:22:45 -04:00
Joseph Doherty
0904401f1e docs(plans): implementation plan for Notifications nav group 2026-05-19 05:08:52 -04:00
Joseph Doherty
113f00a6fa docs(plans): design for Notifications nav group 2026-05-19 05:01:58 -04:00
Joseph Doherty
17861efa51 test(notification-outbox): assert NotNull in SourceScript negative test 2026-05-19 03:57:38 -04:00
Joseph Doherty
558f9ceb39 feat(notification-outbox): populate SourceScript on outbound notifications
FU3: thread the executing script identifier from the script-execution
context down to the Notify outbox API so NotifyTarget.Send stamps
NotificationSubmit.SourceScript instead of leaving it null.

- ScriptRuntimeContext / NotifyHelper / NotifyTarget take an optional
  sourceScript value, carried through to NotificationSubmit.SourceScript.
- ScriptExecutionActor supplies "ScriptActor:<scriptName>", matching the
  Site Event Logging "Source" convention used for script error events.
- AlarmExecutionActor builds the context without the S&F engine, so its
  Notify API is inert; sourceScript defaults to null there.
2026-05-19 03:54:09 -04:00
Joseph Doherty
a5653b4296 refactor(notification-outbox): drop unused state from sandbox Notify fakes 2026-05-19 03:50:21 -04:00
Joseph Doherty
c8b5871782 fix(notification-outbox): re-align Central UI sandbox Notify API with production
The script-analysis sandbox Notify surface was stale after the Notification
Outbox change: SandboxNotifyTarget.Send returned Task<NotificationResult> and
there was no Status method, while production NotifyTarget.Send returns
Task<string> (a NotificationId) plus NotifyHelper.Status. A script that
test-ran cleanly in the sandbox would not compile against the real site
runtime.

- Move the NotificationDeliveryStatus record from ScadaLink.SiteRuntime.Scripts
  into ScadaLink.Commons.Messages.Notification so both production and the
  CentralUI sandbox reference the exact same type (CentralUI does not, and
  should not, reference SiteRuntime). Production NotifyHelper.Status is
  otherwise untouched.
- Rewrite SandboxNotifyHelper/SandboxNotifyTarget to be a signature-faithful
  no-op fake: Send returns Task<string> (a fake NotificationId), Status returns
  Task<NotificationDeliveryStatus>. Production now enqueues into the site S&F
  engine, which has no central-side equivalent in the sandbox, so the fake no
  longer carries an INotificationDeliveryService.
- Add script-analysis tests proving a script using the new Notify shape both
  diagnoses clean and runs in the sandbox.
2026-05-19 03:44:34 -04:00
Joseph Doherty
4b61e29e27 refactor(notification-outbox): extract EmailAddressValidator helper, drop orphaned using 2026-05-19 03:39:05 -04:00
Joseph Doherty
5e80f64cd8 refactor(notification-outbox): share SMTP helpers between NotificationService and the Email adapter
FU1 of the Notification Outbox follow-ups. EmailNotificationDeliveryAdapter
carried verbatim private copies of credential redaction, SMTP error
classification, and address validation because the NotificationService
helpers were internal. This eliminates the divergence risk by promoting the
helpers to public and deleting the adapter's copies.

- CredentialRedactor: internal -> public.
- Extract SmtpErrorClassifier + SmtpErrorClass enum into a new public static
  class; NotificationDeliveryService now routes classification through it
  (behavior unchanged). Adds focused SmtpErrorClassifierTests.
- NotificationDeliveryService.ValidateAddresses: internal -> public; the
  adapter calls it directly.
- EmailNotificationDeliveryAdapter: deleted ScrubCredentials, ClassifySmtpError,
  SmtpErrorClass, IsTransientSmtpError and ValidateAddresses copies.

No InternalsVisibleTo hack — specific helpers promoted to public. Both test
suites green; full solution builds clean.
2026-05-19 03:34:22 -04:00
Joseph Doherty
213b9c7c0a test(notification-outbox): end-to-end outbox flow integration test 2026-05-19 03:13:37 -04:00
Joseph Doherty
af22aa7ce1 refactor(notification-outbox): clarify Health outbox-KPI seed value 2026-05-19 03:09:44 -04:00
Joseph Doherty
9e7bc7b541 feat(notification-outbox): add outbox KPI tiles to Health dashboard 2026-05-19 03:05:41 -04:00
Joseph Doherty
9b05e48ea6 test(notification-outbox): cover Discard and query-failure paths on the Outbox page 2026-05-19 03:02:48 -04:00
Joseph Doherty
ad9872705d feat(notification-outbox): add Notification Outbox UI page 2026-05-19 02:58:49 -04:00
Joseph Doherty
afdf581e32 feat(notification-outbox): add CommunicationService outbox methods 2026-05-19 02:51:11 -04:00
Joseph Doherty
1d495d1a87 feat(notification-outbox): register NotificationOutbox singleton in Host
Wire the Notification Outbox into the Host central role:
- Program.cs: call AddNotificationOutbox() on the central path (binds
  NotificationOutboxOptions via BindConfiguration; no explicit Configure).
- AkkaHostedService.RegisterCentralActors(): create the NotificationOutboxActor
  as a non-role-scoped central cluster singleton + proxy, then send
  RegisterNotificationOutbox(proxy) to the CentralCommunicationActor.
- appsettings.Central.json: add the ScadaLink:NotificationOutbox section with
  the NotificationOutboxOptions defaults.
- SiteServiceRegistration: remove the now-dead AddNotificationService() call -
  sites forward notifications to central rather than delivering over SMTP, and
  no site component consumes the SMTP machinery.
- Host.csproj: add the ScadaLink.NotificationOutbox project reference.
- Tests: add central outbox singleton/proxy actor-path assertions, drop the
  site OAuth2TokenService/INotificationDeliveryService resolution assertions,
  and add NotificationOutbox to the component-library IConfiguration check.
2026-05-19 02:44:32 -04:00