From dd63812827d431b36c70f50e9ba39b0a9b21b4bd Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Fri, 24 Jul 2026 15:36:32 -0400 Subject: [PATCH 1/3] feat(webhook): ACTIVATE SHOC WO webhook emitter (enabled=True) The deliberate one-line activation flip (plan Phase 3). Turns on both DynamoDB stream event-source mappings for workorder-shoc-emitter, which shipped dark (enabled=False) in PR-2. LATEST start position => the live feed begins at deploy, no historical flood; SHOC loads history via the procurement read API first. DO NOT MERGE until: (1) PR-2 (feat/shoc-wo-webhook) is merged to main; (2) SHOC's receiver passes the shared HMAC test vectors (docs/shoc-webhook-test-vectors.json) at the target endpoint; (3) the cross-account secret read from shoc-backend-dev is confirmed working. Draft, gated on Luby. --- cdk/wo_stack.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/cdk/wo_stack.py b/cdk/wo_stack.py index 7d6bbc0..0f5ee16 100644 --- a/cdk/wo_stack.py +++ b/cdk/wo_stack.py @@ -750,14 +750,12 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to shoc_emitter_rejected_queue.grant_send_messages(shoc_emitter) # ------------------------------------------------------------------ - # SHIPS DARK: both event source mappings deploy with enabled=False, - # deliberately. The full stack (Lambda, queues, alarms, secret, - # rotation) deploys and is testable with zero deliveries while SHOC - # has no receiver, so our merge cadence never depends on Luby's. - # Activation is a one-line enabled=True PR gated on the SHOC receiver - # passing the shared HMAC test vectors (plan Phase 3). LATEST start - # position => no historical flood at activation; SHOC loads history - # via the procurement read API instead. + # ACTIVATED (enabled=True) 2026-XX-XX after SHOC's receiver passed the + # shared HMAC test vectors. Shipped DARK originally (enabled=False) so the + # stack could deploy and be tested with zero deliveries while SHOC had no + # receiver; this activation PR is the deliberate one-line flip (plan Phase + # 3). LATEST start position => the feed begins now, no historical flood; + # SHOC loaded history via the procurement read API before this flip. # Ordering knobs: parallelization_factor=1, bisect_batch_on_error= # False and retry_attempts=-1 (retry until the 24h record age) are # REQUIRED for strict per-work-order in-order delivery -- a retryable @@ -775,7 +773,7 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to max_record_age=Duration.hours(24), parallelization_factor=1, report_batch_item_failures=True, - enabled=False, + enabled=True, on_failure=lambda_event_sources.SqsDlq(shoc_emitter_failures_queue), ) ) @@ -789,7 +787,7 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to max_record_age=Duration.hours(24), parallelization_factor=1, report_batch_item_failures=True, - enabled=False, + enabled=True, on_failure=lambda_event_sources.SqsDlq(shoc_emitter_failures_queue), ) ) From bc6b4ef50eac4944ded4e404dd07ab8a64a74931 Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Mon, 27 Jul 2026 16:56:43 -0400 Subject: [PATCH 2/3] docs(webhook): stamp activation date and correct backfill wording --- cdk/wo_stack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdk/wo_stack.py b/cdk/wo_stack.py index 0f5ee16..a0f4b98 100644 --- a/cdk/wo_stack.py +++ b/cdk/wo_stack.py @@ -750,12 +750,12 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to shoc_emitter_rejected_queue.grant_send_messages(shoc_emitter) # ------------------------------------------------------------------ - # ACTIVATED (enabled=True) 2026-XX-XX after SHOC's receiver passed the + # ACTIVATED (enabled=True) 2026-07-27 after SHOC's receiver passed the # shared HMAC test vectors. Shipped DARK originally (enabled=False) so the # stack could deploy and be tested with zero deliveries while SHOC had no # receiver; this activation PR is the deliberate one-line flip (plan Phase # 3). LATEST start position => the feed begins now, no historical flood; - # SHOC loaded history via the procurement read API before this flip. + # SHOC backfills history via the procurement read API, not the stream. # Ordering knobs: parallelization_factor=1, bisect_batch_on_error= # False and retry_attempts=-1 (retry until the 24h record age) are # REQUIRED for strict per-work-order in-order delivery -- a retryable From c64b2999ceec34ca7ca13c72d62d50a08b6439be Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Thu, 30 Jul 2026 11:51:42 -0400 Subject: [PATCH 3/3] docs(webhook): adjust activation comment date to 2026-07-30. Signed-off-by: Adam Moussa --- cdk/wo_stack.py | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/cdk/wo_stack.py b/cdk/wo_stack.py index a0f4b98..bb133c5 100644 --- a/cdk/wo_stack.py +++ b/cdk/wo_stack.py @@ -1,29 +1,56 @@ """CDK stack for the work order email ingestion pipeline.""" import aws_cdk as cdk +import common from aws_cdk import ( Duration, RemovalPolicy, Stack, +) +from aws_cdk import ( aws_cloudwatch as cloudwatch, +) +from aws_cdk import ( aws_cloudwatch_actions as cw_actions, +) +from aws_cdk import ( aws_dynamodb as dynamodb, +) +from aws_cdk import ( aws_iam as iam, +) +from aws_cdk import ( aws_kms as kms, +) +from aws_cdk import ( aws_lambda as lambda_, +) +from aws_cdk import ( aws_lambda_event_sources as lambda_event_sources, +) +from aws_cdk import ( aws_s3 as s3, +) +from aws_cdk import ( aws_s3_notifications as s3n, - aws_ses as ses, - aws_ses_actions as ses_actions, +) +from aws_cdk import ( aws_secretsmanager as secretsmanager, +) +from aws_cdk import ( + aws_ses as ses, +) +from aws_cdk import ( + aws_ses_actions as ses_actions, +) +from aws_cdk import ( aws_sns as sns, +) +from aws_cdk import ( aws_sqs as sqs, ) from constructs import Construct -import common - class WorkorderIngestStack(Stack): def __init__(self, scope: Construct, construct_id: str, **kwargs): @@ -750,7 +777,7 @@ def _add_shoc_webhook_emitter(stack, work_orders_table, comments_table, alarm_to shoc_emitter_rejected_queue.grant_send_messages(shoc_emitter) # ------------------------------------------------------------------ - # ACTIVATED (enabled=True) 2026-07-27 after SHOC's receiver passed the + # ACTIVATED (enabled=True) 2026-07-30 after SHOC's receiver passed the # shared HMAC test vectors. Shipped DARK originally (enabled=False) so the # stack could deploy and be tested with zero deliveries while SHOC had no # receiver; this activation PR is the deliberate one-line flip (plan Phase