From 332ae984c341f3c9172e1c20cf098c72e7bbadcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Manciot?= Date: Tue, 16 Jun 2026 07:53:36 +0200 Subject: [PATCH] feat(audit): correlation_id on CronTab + carry into derived Schedule (Story 13.7 Phase B) - CronTab.correlation_id (#7) so cron-based recurring renewals reach the consumer with the originating id. - cronTabToSchedule carries cronTab.correlationId onto the derived Schedule. Co-Authored-By: Claude Opus 4.8 (1M context) --- common/src/main/protobuf/model/schedule.proto | 4 ++++ .../main/scala/app/softnetwork/scheduler/model/package.scala | 1 + 2 files changed, 5 insertions(+) diff --git a/common/src/main/protobuf/model/schedule.proto b/common/src/main/protobuf/model/schedule.proto index 02a8a41..23ea5d0 100644 --- a/common/src/main/protobuf/model/schedule.proto +++ b/common/src/main/protobuf/model/schedule.proto @@ -47,6 +47,10 @@ message CronTab { required string cron = 4; optional google.protobuf.Timestamp lastTriggered = 5 [(scalapb.field).type = "java.util.Date"]; optional google.protobuf.Timestamp nextTriggered = 6 [(scalapb.field).type = "java.util.Date"]; + // Story 13.7 — cross-service correlation id. Carried onto the derived Schedule in + // cronTabToSchedule so cron-based recurring renewals reach the consumer with the originating + // id. ScalaPB → correlationId: Option[String] + withCorrelationId. + optional string correlation_id = 7; } // Scheduler diff --git a/common/src/main/scala/app/softnetwork/scheduler/model/package.scala b/common/src/main/scala/app/softnetwork/scheduler/model/package.scala index dabd9ad..770de1f 100644 --- a/common/src/main/scala/app/softnetwork/scheduler/model/package.scala +++ b/common/src/main/scala/app/softnetwork/scheduler/model/package.scala @@ -116,6 +116,7 @@ package object model { .withScheduledDate(date) // .withRepeatedly(true) .withCronTab(cronTab.uuid) + .copy(correlationId = cronTab.correlationId) ) case _ => None }