Create initiative

Initiative Brief: Complete the OutShine Notification Runtime and External Event Ingestion

COMPLETED
Intent— the specification (6,271 chars); the plan below decomposes it into work items. Click to expand.

# Initiative Brief: Complete the OutShine Notification Runtime and External Event Ingestion ## Desired outcome Complete the existing OutShine notification subsystem so that notification-worthy events reliably flow from creation through routing and delivery, and expose a safe service-to-service ingestion contract that other Xyence services can use. This initiative should **finish and harden the notification architecture already present in OutShine rather than replace it**. The immediate cross-service consumer is `Xyence/orchestrator#355`, which needs to raise operator-facing notifications for events such as provider usage limits, unrecoverable work-item failures, human-required merge conflicts, and stalled runs. ## Current state - OutShine already contains a substantial notification foundation: - durable `NotificationEvent` records; - declarative notification routes; - delivery records and retries; - correlation-key deduplication; - payload redaction; - message templates; - email-provider abstraction; - rate-limiting seams; - administrative APIs for inspecting events, routes, deliveries, and templates; - Console UI for operational notification management; - notification emission from existing domains such as Work Items. The architecture is directionally correct: **event → route resolution → delivery → provider** OutShine should remain the canonical owner of this pipeline. However, the subsystem is incomplete in several important ways. Event creation does not itself complete notification delivery — `create_notification_event()` persists a durable event, but routing and delivery happen separately through `process_notification_event()`. Several internal callers appear to emit events without clearly ensuring they are subsequently processed. An external ingestion endpoint that merely calls `create_notification_event()` would therefore accept an event successfully while potentially leaving it indefinitely in `pending`. There is no service-to-service notification ingestion API — Current notification APIs are primarily administrative/read/operational APIs. External services cannot safely raise a platform notification through OutShine. This is the direct blocker for `Xyence/orchestrator#355`. Notification preferences appear only partially implemented — The schema and documentation describe per-user notification preferences, but the current routing path does not appear to consistently enforce them. The initiative should reconcile the implementation with the intended contract rather than leaving a feature that exists in schema and documentation but not reliably in behavior. Multi-channel support is mostly a future seam — The data model anticipates channels beyond email, but email is currently the only meaningful outbound provider. Unsupported channels are intentionally suppressed. This initiative should preserve that extensibility without expanding scope into implementing SMS, chat, push, or other channels. ## Rejected / deferred alternatives - replacing the notification architecture; - implementing a notification subsystem inside Orchestrator; - SMS delivery; - chat delivery; - mobile push; - browser push; - generalized webhook delivery unless already present and trivially supported; - introducing Kafka, SQS, Redis queues, Celery, or another worker architecture solely for notifications; - building a full consumer-facing notification inbox; - broad UI redesign of the Console Notifications area; - notification of every routine platform event; - workflow authoring redesign. ## Repository scope - In Scope - canonical raise-and-process notification service operation; - service-authenticated external event ingestion; - mandatory/strong correlation-key deduplication for service producers; - redaction and payload validation; - synchronous route/delivery processing; - existing producer audit and migration; - Work Item notification-path verification/fix; - notification preference completion or explicit reconciliation; - route/target contract reconciliation; - operational logging and tests; - documentation of the external producer contract; - support necessary for `Xyence/orchestrator#355`. ## Expected behavior - [ ] OutShine has one canonical service operation for raising a notification-worthy event through persistence, routing, and supported delivery. - [ ] Existing code can still create a durable event without processing only where that lower-level behavior is explicitly required. - [ ] `POST /api/notifications/events` or the equivalent service API accepts authenticated events from trusted Xyence services. - [ ] Service-ingested events require or strongly enforce deterministic correlation-key deduplication. - [ ] The ingestion path validates payload size/shape and redacts prohibited sensitive data before persistence. - [ ] Successfully ingested events are processed through routing and delivery rather than being left indefinitely `pending`. - [ ] Email remains the supported outbound channel; unsupported channels remain explicit, observable suppressed seams. - [ ] Notification provider failure preserves the durable event and delivery failure state. - [ ] Producer operations remain unaffected by notification failure. - [ ] Existing OutShine notification-event producers are inventoried. - [ ] Existing callers that intend actual notification delivery use the canonical processed path. - [ ] Work Item notifications are verified to reach the routing/delivery pipeline. - [ ] `NotificationPreference` behavior is either fully enforced according to a documented contract or explicitly removed from claims of current runtime behavior. - [ ] Route target types are consistent across schema, models, service validation/resolution, APIs, and documentation. - [ ] Console operators can inspect accepted events, routing outcomes, suppressed deliveries, failed deliveries, and retries. - [ ] Tests cover event creation, processing, dedupe, redaction, route resolution, preference behavior, provider failure, retry, service authentication, malformed payloads, abuse/flood protection, and fail-open producer behavior. - [ ] Documentation defines the service producer contract and includes a safe example payload. - [ ] The resulting API satisfies the OutShine dependency in `Xyence/orchestrator#355`.

hints: In Scope, canonical raise-and-process notification service operation;, service-authenticated external event ingestion;, mandatory/strong correlation-key deduplication for service producers;, redaction and payload validation;, synchronous route/delivery processing;, existing producer audit and migration;, Work Item notification-path verification/fix;, notification preference completion or explicit reconciliation;, route/target contract reconciliation;, operational logging and tests;, documentation of the external producer contract;, support necessary for `Xyence/orchestrator#355`.created 8/12/2026, 11:47:22 PMby human:workspaces-orchestrator-app

Repository scope

targets the work spans — independent of where the brief was authored

Primary repository: In Scope

  • In Scopeexpected · primary
  • canonical raise-and-process notification service operation;expected
  • service-authenticated external event ingestion;expected
  • strong correlation-key deduplication for service producers;expected
  • redaction and payload validation;expected
  • delivery processing;expected
  • existing producer audit and migration;expected
  • fix;expected
  • notification preference completion or explicit reconciliation;expected
  • target contract reconciliation;expected
  • operational logging and tests;expected
  • documentation of the external producer contract;expected
  • orchestrator#355`.expected
  • outshinediscovered

brief revision 1 assessed as delivered

assessed with 74% confidence

The initiative’s goal — finish and harden OutShine’s notification runtime and provide a safe external ingestion contract — is met end to end. The repository now has a canonical, fail‑open raise‑and‑process operation; a trusted service‑to‑service POST /api/notifications/events that validates, redacts, dedupes, and immediately processes events; and migrations of internal producers so notification‑intending callers use the canonical path. Per‑user NotificationPreference enforcement is implemented and documented, route target‑type consistency is enforced across schema/model/service/docs, and console/admin visibility was expanded to show routing outcomes, derived suppression/failure reasons, and retry state. Work Item notifications and other producers are verified via tests to traverse persistence → routing → delivery; provider failures preserve durable state and never break producers. Documentation includes the external producer contract with safe examples and explicit guidance for Xyence/orchestrator#355. Tests cover creation/processing, dedupe (including deduped‑but‑pending processing), redaction (including delivery bodies), route resolution, preference suppression, provider failure, fail‑open semantics, malformed inputs, and service‑ingest validations; admin reprocess/retry surfaces are exercised and reason‑code/retriable exposure is verified. No rejected/deferred scope was reintroduced.

Plan waves — 1 approved wave

planning closed
  1. Wave 1completeAPPROVED10 work items

    Finish and harden OutShine's existing notification runtime, add a safe service-to-service ingestion API, enforce strong deduplication and payload hygiene, reconcile preferences/route contracts, migrate internal producers (especially Work Items) to the canonical processed path, and document the producer contract so Orchestrator can raise operator-facing notifications.

Work items

#TitleRepositoryStateIssuePR / CIReview
0Introduce a canonical raise-and-process notification service operationoutshineCOMPLETED#431#441merged · CI passedc1: request_changes, c2: approve
1 ⛓Add authenticated external notification event ingestion API using the canonical operationoutshineCOMPLETED#432#448merged · CI passedc1: approve
2 ⛓Enforce NotificationPreference during route resolution or reconcile contract explicitlyoutshineCOMPLETED#433#442merged · CI passedc1: approve
3 ⛓Reconcile route target type contract across schema, models, service validation, and docsoutshineCOMPLETED#434#443merged · CI passedc1: approve
4 ⛓Inventory existing internal notification producers and author a migration planoutshineCOMPLETED#435#444merged · CI passedc1: approve, c2: approve
5 ⛓Verify and fix Work Item notification path to use canonical processed operationoutshineCOMPLETED#436#446merged · CI passedc1: approve
6 ⛓Migrate remaining internal producers to the canonical processed operationoutshineCOMPLETED#437#447merged · CI passedc1: comment
7 ⛓Enhance operational visibility: logging and admin APIs for suppressed/failed deliveries and retriesoutshineCOMPLETED#438#445merged · CI passedc1: approve
8 ⛓Document the external producer contract with a safe exampleoutshineCOMPLETED#439#449merged · CI passedc1: request_changes, c2: approve
9 ⛓Augment test coverage: end-to-end, malformed inputs, abuse cases, and fail-open semanticsoutshineCOMPLETED#440#450merged · CI passedc1: approve

Release candidate

ELIGIBLE

All work complete — merged, reviewed, and unblocked. Release and deployment remain manual.

outshinePR #441 · merged 61347f7bca · review approve
outshinePR #448 · merged d0af6416a1 · review approve
outshinePR #442 · merged ffd36a3d4f · review approve
outshinePR #443 · merged 747816c766 · review approve
outshinePR #444 · merged eb9e5b2c8f · review approve
outshinePR #446 · merged ea6026d0c4 · review approve
outshinePR #447 · merged 20324af15b · review comment
outshinePR #445 · merged e7d234f78b · review approve
outshinePR #449 · merged 7b6b7722de · review approve
outshinePR #450 · merged b4bf288387 · review approve

Release planning

Releases are cut in the Release planning section. Associating this initiative requires an admin role.

Associating an initiative to a release only records the link — it never changes the initiative’s own state or work. Releases are optional.

Timeline

No events yet.

    ← All initiatives