Skip to main content

Attendance Event Contract Versioning

Summary

Attendance contracts inherit the shared IntegrationEvent envelope and are currently emitted with schema version 1.

Audience

  • Contract owners, producer and consumer developers, architects, and release reviewers

Versioning model

The shared envelope defines event identity, type, occurrence time, correlation, causation, tenant/user context, source service, and schema version. Attendance-specific records add lifecycle facts. Attendance Service owns producer mapping; the shared contracts project is the compile-time contract source.

Current mapping hard-codes version 1 for all five contracts. A formal contract registry, compatibility checker, deprecation policy, and automated consumer matrix are Not implemented.

Safe evolution expectations are governance guidance, not an implemented framework:

  • prefer additive optional data and preserve existing meaning;
  • keep event type and version semantics stable;
  • require consumers to tolerate unknown additive fields;
  • use a new version or event type for incompatible meaning or required-shape changes;
  • review producer serialization, Payroll parsing, Integration routing, replay compatibility, and mixed-version deployment before release.

Because some consumers parse JSON by field name rather than the strongly typed record, compile success alone does not establish compatibility. Release evidence should include serialization fixtures and consumer contract tests.

Source References

  • microservices/src/contracts/Events/IntegrationEvent.cs
  • microservices/src/contracts/Events/AttendanceLifecycleEvents.cs
  • microservices/src/attendance-service/Infrastructure/AttendanceDbContext.cs
  • microservices/src/shared-kernel/Outbox/IntegrationEventJsonSerializer.cs

See Also

Keywords

  • Attendance events
  • Integration contracts
  • Eventual consistency

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly