Skip to content

MO-523: Align analytics event envelope - #238

Open
tjpeel-ee wants to merge 3 commits into
mainfrom
MO-523-align-final-ai-team-integration
Open

MO-523: Align analytics event envelope#238
tjpeel-ee wants to merge 3 commits into
mainfrom
MO-523-align-final-ai-team-integration

Conversation

@tjpeel-ee

@tjpeel-ee tjpeel-ee commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Align the published compliance-declaration analytics envelope with the EPR event-envelope interface.
  • Preserve the existing transactional outbox and SNS publication path.

Implemented

  • Map the persisted outbox insert operation to published create, retain update and delete, and emit UTC timestamps with millisecond precision.
  • Populate correlationId from the propagated x-cdp-request-id trace value when present.
  • Emit user:<UUID> actors for user submissions and status amendments, while retaining service:waste-obligations for the system-driven delete flow.
  • Qualify schema versions as compliance_declaration_v<major>.<minor> and keep embedded-schema lookup compatible with previously stored dotted values.
  • Validate the supported entity, operations, event types, actor prefixes, deletion reason, and schema versions before publication.
  • Rename the deletion reason to elevated_system_allowed_removal and normalise undispatched legacy outbox records during publication.
  • Document that the renamed deletion reason must be added to the shared governed schema vocabulary.
  • Restore Sonar coverage reporting by passing coverage options to the Microsoft Testing Platform and writing both reports to the workspace root.

Scope Decisions

  • Ignore PII classification, field protection, and piiKeyRef population under the agreed instruction; piiKeyRef remains null.
  • Do Not Implement cdec_<ULID> entity IDs because the specification is incompatible with the service's immutable Mongo ObjectId model. Published IDs remain compliance_declaration_<ObjectId> until the specification is corrected.

Verification

  • Pass Docker Compose image build and CSharpier gate.
  • Pass dotnet build.
  • Pass Api.Tests: 620 tests.
  • Pass Api.IntegrationTests: 247 tests.
  • Produce API and integration XML coverage reports with the corrected CI commands; the new analytics vocabulary and timestamp converter are fully covered.

@tjpeel-ee
tjpeel-ee marked this pull request as ready for review September 11, 2026 17:22
@tjpeel-ee
tjpeel-ee force-pushed the MO-523-align-final-ai-team-integration branch from 253266f to e0d967e Compare September 12, 2026 09:06
@sonarqubecloud

Copy link
Copy Markdown

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