Skip to main content

Event Standard: CloudEvents 1.0 is the ONLY event envelope

Mandatory, fleet-wide

Every Kafka message any warehouse-systems service produces or consumes — integration topics warehouse.<ctx>.events and analytics topics warehouse.<ctx>.analytics — is a CloudEvents 1.0 event in structured content mode. There is no flat envelope, no dual-write, no dual-read and no envelope toggle (EVENT_ENVELOPE_MODE is gone). Each service repository records this standard as its own ADR, "CloudEvents 1.0 as the mandatory event envelope" (see the ADR index).

This page is the fleet-level copy of the standard. The per-context Async API pages describe each context's own topics and payloads; the generated Async API reference is rendered from each context's apis/asyncapi.yaml.

Example on the wire​

Kafka header content-type: application/cloudevents+json; charset=UTF-8 (plus traceparent/tracestate), key = aggregate id, value:

{
"specversion": "1.0",
"id": "1d7e4b90-3c58-4d22-9a6f-8b1c0e5d7a23",
"source": "/warehouse/wes-work-planning",
"type": "com.warehouse.wes.work-planning.workunit.WorkReleased",
"subject": "wu-10231",
"time": "2026-08-21T22:12:30Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:wes-work-planning:events:WorkReleased:v1",
"data": {
"path_id": "pick-to-tote",
"work_unit_id": "wu-10231",
"cpt": "2026-08-22T02:00:00Z",
"ref": "order-88421-line-3"
}
}

Status: Accepted, fleet-wide, 2026-09-30. Supersedes every "flat envelope" (event_id/event_type/occurred_at/source/data), the analytics "Envelope v1" (schema_version), and the dual-envelope migrations (fulfillment-execution ADR-0027, wes-work-planning ADR-0021).

1. Scope​

EVERY message any warehouse-systems service writes to or reads from Kafka is a CloudEvents 1.0 event. That includes integration topics (warehouse.<ctx>.events) AND internal analytics topics (warehouse.<ctx>.analytics). No exceptions, no coexistence.

  • There is NO flat envelope, NO dual-write, NO dual-read, NO EVENT_ENVELOPE_MODE (or any other envelope toggle). Delete them.
  • Publishers emit only CloudEvents. Consumers accept only CloudEvents.

2. Encoding: Kafka protocol binding, structured content mode​

  • Structured mode per the CloudEvents Kafka Protocol Binding: the Kafka message VALUE is the JSON event format (application/cloudevents+json).
  • Every produced message carries Kafka header content-type: application/cloudevents+json; charset=UTF-8.
  • Kafka message KEY is unchanged from each publisher's current partition-affinity choice (aggregate id). Keep kafkago.Hash{} balancer.
  • W3C trace context stays in Kafka headers (traceparent/tracestate) as today. Do NOT duplicate it into CloudEvents extension attributes.
  • Build, validate and (un)marshal events with the official SDK event package github.com/cloudevents/sdk-go/v2/event (latest v2, currently v2.16.2): event.New(), setters, e.Validate(), json.Marshal(e) / json.Unmarshal(b, &e), e.DataAs(&payload). Do NOT use the sdk-go protocol/client packages; transport stays segmentio/kafka-go. Do NOT hand-roll CloudEvent structs.
  • Put the CloudEvents helpers in ONE place per repo: internal/adapters/kafka/cloudevents/ (constants, New(...) builder, Decode([]byte) (event.Event, error) which validates). Publishers and consumers both use it.

3. Context attributes (all REQUIRED in this fleet)​

attributevalue
specversion1.0
idUUID v4, minted ONCE per domain event and persisted with the outbox row, so a redelivery carries the same id. (source, id) is the consumer idempotency key.
source/warehouse/<repo-name> (URI-reference), e.g. /warehouse/order-management, /warehouse/wes-work-planning. Same for integration and analytics topics.
typecom.warehouse.<subdomain>.<bounded-context>.<entity>.<EventName> (§4)
subjectid of the aggregate instance the event is about (order id, task id, path id, slot code, ...). Never empty.
timethe domain event's occurred-at instant, UTC, RFC 3339
datacontenttypeapplication/json
dataschemaurn:warehouse:<repo-name>:<stream>:<EventName>:v<N> where <stream> is events or analytics, N starts at 1. Absolute URI (spec requirement). This is what distinguishes the integration payload from the analytics payload of the same occurrence.
  • data is the event payload JSON object, byte-for-byte the same payload shape each service publishes today (this is an envelope migration; do not rename payload fields).
  • No custom extension attributes unless an ADR justifies one. Extension names must be lowercase [a-z0-9], at most 20 chars. The old analytics schema_version field is REMOVED (replaced by dataschema).

4. The type attribute​

Convention (pre-existing platform standard, unchanged):

com.warehouse.<subdomain>.<bounded-context>.<entity>.<EventName>
  • all segments lowercase except <EventName> (PascalCase, past tense, exactly the domain event name).
  • <entity> = the aggregate that raised it, lowercase, no separators.
  • The SAME type is used for the occurrence on both the integration and the analytics topic (type names the occurrence; dataschema names the shape).
  • Versioning: additive payload changes keep the type and dataschema. A BREAKING payload change requires a new dataschema version AND a new type with a .v2 suffix (e.g. ...order.OrderAllocated.v2), published as a new event, never by mutating the old one.

Subdomain and bounded-context segments (authoritative):

reposubdomainbounded-context segmentsource
facility-layoutwmsfacility-layout/warehouse/facility-layout
inventory-storagewmsinventory-storage/warehouse/inventory-storage
product-masterwmsproduct-master/warehouse/product-master
inbound-receivingwmsinbound-receiving/warehouse/inbound-receiving
slotting-optimizationwmsslotting-optimization/warehouse/slotting-optimization
pick-face-replenishmentwmspick-face-replenishment/warehouse/pick-face-replenishment
returns-processingwmsreturns-processing/warehouse/returns-processing
dock-schedulingwmsdock-scheduling/warehouse/dock-scheduling
yard-managementwmsyard-management/warehouse/yard-management
order-managementwesorder-management/warehouse/order-management
process-path-managementwesprocess-path-management/warehouse/process-path-management
warehouse-planningweswarehouse-planning/warehouse/warehouse-planning
network-fulfillmentwesnetwork-fulfillment/warehouse/network-fulfillment
labor-performanceweslabor-performance/warehouse/labor-performance
workforce-managementwesworkforce-management/warehouse/workforce-management
fulfillment-executionwesfulfillment-execution/warehouse/fulfillment-execution
wes-work-planningweswork-planning/warehouse/wes-work-planning
network-inventory-planningwesnetwork-inventory-planning/warehouse/network-inventory-planning
task-interleavingwestask-interleaving/warehouse/task-interleaving
asrs-controlwesasrs-control/warehouse/asrs-control
exception-managementwesexception-management/warehouse/exception-management
outbound-shippingwmsoutbound-shipping/warehouse/outbound-shipping

dock-scheduling and yard-management (wms, proposed 2026-11-05, built on develop and merged 2026-11-08, registered in warehouse-infra develop since #193, released at v0.1.2 and applied to the k3s cluster on 2026-11-10 in a reduced footprint: dock-scheduling api only, yard-management api and relay): the type prefixes com.warehouse.wms.dock-scheduling. and com.warehouse.wms.yard-management. and the topics warehouse.dock-scheduling.events / .analytics and warehouse.yard-management.events / .analytics were pinned here before any event shipped, so producers and consumers build against identical strings. The design is the yard instance. The harness template's copy of the managed fleet rule (warehouse-harness-template main, .claude/rules/fleet/cloudevents.md) does not list the two names yet (checked 2026-11-10).

pick-face-replenishment and task-interleaving: both merged on develop 2026-10-17 (each publishes through a transactional outbox) and both run in the reference cluster since 2026-10-20/21 (warehouse-infra#116, #121). Topics: warehouse.pick-face-replenishment.events / .analytics (type prefix com.warehouse.wms.pick-face-replenishment.) and warehouse.task-interleaving.events / .analytics (type prefix com.warehouse.wes.task-interleaving.).

returns-processing (wms) and exception-management (wes): scaffolded on develop 2026-10-20 (ADR 0001 in each repo); contracts, domain and consumers are in progress — their type prefixes com.warehouse.wms.returns-processing. and com.warehouse.wes.exception-management. are PINNED here so consumers and producers build against identical strings before the first event ships.

outbound-shipping (wms): built on develop (2026-11-05 to 2026-11-09, ADR 0005 in its repository pins the catalogue), released as v0.1.0 (2026-11-11), registered and image-pinned in warehouse-infra develop (PR 205) and applied to the k3s cluster on 2026-11-12 (one api replica at 857edfd, so its events are published in the reference cluster; re-read 2026-11-13). Topics: warehouse.outbound-shipping.events / .analytics (type prefix com.warehouse.wms.outbound-shipping., thirteen types, each on both topics).

What the subdomain segment means​

The <subdomain> segment is a fixed label of the published contract, not an industry software category (decided 2026-10-17):

  • wms marks the WMS tier: the item, location and inventory masters and the contexts that keep stock in place (receiving, slotting, replenishment, returns).
  • wes marks every other context, whether it executes work, manages labor, takes orders, plans capacity or balances the network.

A new context takes wms only under that definition. An existing segment is never renamed to match an industry classification: every producer and consumer matches the full type, so a rename is a breaking change everywhere at once and tells no consumer anything new. By the industry definitions, only three of the wes contexts are warehouse execution software; the qualification records each context's industry category (WMS, WES, labor management, above the WMS) with the evidence.

Entity segments for repos that had no catalogue yet:

  • order-management: every Order* event → order
  • process-path-management: ProcessPath* → processpath; CPTScheduleChanged → cptschedule
  • network-fulfillment: NetworkOrder* → networkorder
  • warehouse-planning: CapacityPlan* / CapacityShortageDetected / BottleneckDetected → capacityplan
  • labor-performance: LaborStandardDefined/LaborStandardRevised → standard; TaskPerformanceRecorded → performance
  • product-master: every Product* event → product (product-master ADR 0004)
  • network-inventory-planning: TransferPlanApproved / TransferAllocationRequested → transfer; WorkDemandReleased → workdemand (the name wes-work-planning's consumed contract uses); the analytics occurrences TransferStateAdvanced / TransferStuckDetected / RebalanceRunCompleted → saga (network-inventory-planning ADR 0004)
  • inbound-receiving: ASN* → asn; DockAppointment* → dockappointment (retired: the four types are no longer published, ADR 0022); Receipt* → receipt (inbound-receiving ADR 0004)
  • slotting-optimization: every SlotPlan* event → slotplan (slotting-optimization ADR 0004)
  • pick-face-replenishment (built and deployed): ReplenishmentRequested / ReplenishmentCompleted / ReplenishmentCancelled → replenishment; ReplenishmentPolicyDeclared (analytics only) → policy
  • task-interleaving (built and deployed): InterleavingHintIssued / InterleavingHintConsumed / InterleavingHintExpired → stationtrip; InterleavingPolicyDeclared (analytics only) → policy
  • outbound-shipping (released v0.1.0, applied to k3s since 2026-11-12): every Load* event and ShipmentConfirmed → outboundload; Package* → shippingpackage; BillOfLading* → billoflading (outbound-shipping ADR 0005)

Repos that already have an AsyncAPI catalogue keep the entity segments already documented there. Events not yet in a catalogue get the entity of the aggregate that raises them.

Cross-service contract: these exact strings are consumed by another repo​

Consumers MUST dispatch on the FULL type string (never a short name, never a suffix match) and these must be byte-identical on both sides:

typeconsumed by
com.warehouse.wms.facility-layout.locationslot.LocationSlotRegisteredinventory-storage, warehouse-planning, inbound-receiving, slotting-optimization; pick-face-replenishment and task-interleaving (consumers deployed); outbound-shipping (consumer running (applied to k3s 2026-11-12))
com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissionedinventory-storage, warehouse-planning, inbound-receiving, slotting-optimization; pick-face-replenishment and task-interleaving (consumers deployed)
com.warehouse.wms.facility-layout.zone.ZoneRegisteredinventory-storage, slotting-optimization; pick-face-replenishment and task-interleaving (consumers deployed); outbound-shipping (consumer running (applied to k3s 2026-11-12))
com.warehouse.wms.facility-layout.locationslot.LocationGeometryUpdatedtask-interleaving (consumer deployed; no other consumer); published by facility-layout
com.warehouse.wms.facility-layout.site.SiteCapabilityChangednetwork-inventory-planning
com.warehouse.wms.inventory-storage.reservation.StockReservedwes-work-planning
com.warehouse.wms.inventory-storage.reservation.ReservationRevokedwes-work-planning
com.warehouse.wms.inventory-storage.reservation.TransferStockAllocatednetwork-inventory-planning
com.warehouse.wms.inventory-storage.reservation.TransferStockAllocationRejectednetwork-inventory-planning
com.warehouse.wms.inventory-storage.stock.TransferReceiptStagednetwork-inventory-planning
com.warehouse.wms.inventory-storage.stock.TransferStockStowednetwork-inventory-planning
com.warehouse.wms.inventory-storage.stock.StockRelocatedslotting-optimization (plan execution progress; inventory-storage ADR 0039, slotting-optimization ADR 0010); pick-face-replenishment (consumer deployed; closes a request only on reason == REPLENISHMENT, which inventory-storage records for a completed REPLENISH task, its ADR 0041, and which slotting-optimization ignores since its PR #35)
com.warehouse.wms.inventory-storage.stock.BinStockLevelChangedpublished by inventory-storage since its ADR 0040 (key <bin>:<sku>): pick-face-replenishment (consumer deployed)
com.warehouse.wms.inventory-storage.product.ProductClassifiedretiring: backfill-only after inventory-storage ADR 0034, consumed by product-master's legacy importer until stage E
com.warehouse.wms.product-master.product.ProductRegisteredinbound-receiving
com.warehouse.wms.product-master.product.ProductDescriptionChanged(published contract; no consumer yet)
com.warehouse.wms.product-master.product.ProductClassifiedinventory-storage, order-management, wes-work-planning, fulfillment-execution (local copies; inventory-storage ADR 0034, order-management ADR 0036, wes-work-planning ADR 0035, fulfillment-execution ADR 0039), slotting-optimization
com.warehouse.wms.product-master.product.ProductDimensionsDeclaredslotting-optimization
com.warehouse.wms.product-master.product.ProductMeasuredslotting-optimization
com.warehouse.wms.product-master.product.ProductPackLevelDeclaredinbound-receiving, inventory-storage, pick-face-replenishment, slotting-optimization, wes-work-planning, fulfillment-execution, network-inventory-planning (local pack views; context map K62)
com.warehouse.wms.product-master.product.ProductPackLevelRetiredthe same seven consumers (context map K62)
com.warehouse.wms.product-master.product.ProductPackLevelMeasuredwes-work-planning, slotting-optimization (context map K62)
com.warehouse.wms.inbound-receiving.asn.ASNRegistereddock-scheduling, yard-management (the yard section; no row on the context map)
com.warehouse.wms.inbound-receiving.asn.ASNCancelleddock-scheduling, yard-management (the yard section; no row on the context map)
com.warehouse.wms.inbound-receiving.dockappointment.DockAppointmentBookedretired (inbound-receiving ADR 0022, stage E, on develop 2026-11-10): no longer declared or published; warehouse-planning read it under its ADR 0017 until its ADR 0020 switched the source to dock-scheduling (context map K28)
com.warehouse.wms.inbound-receiving.dockappointment.DockAppointmentCheckedInretired (ADR 0022); had no consumer
com.warehouse.wms.inbound-receiving.dockappointment.DockAppointmentCancelledretired (ADR 0022); warehouse-planning read it under its ADR 0017 until its ADR 0020 switched the source to dock-scheduling (K28)
com.warehouse.wms.inbound-receiving.dockappointment.DockAppointmentCompletedretired (ADR 0022); had no consumer
com.warehouse.wms.inbound-receiving.receipt.ReceiptOpenedyard-management (the yard section; no row on the context map)
com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceivedinventory-storage (its ADR 0037)
com.warehouse.wms.inbound-receiving.receipt.ReceiptClosedyard-management (the yard section; no row on the context map)
com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaisedexception-management (its ADR 0006, one case per receipt, SSCC and kind; context map K66)
com.warehouse.wms.slotting-optimization.slotplan.SlotPlanGenerated(published contract; no consumer yet)
com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApprovedwes-work-planning (one RELOCATE work unit per move, its ADR-0040; slotting-optimization ADR 0010); pick-face-replenishment (forward map; consumer deployed)
com.warehouse.wms.slotting-optimization.slotplan.SlotPlanRejected(published contract; no consumer yet)
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequestedwes-work-planning (one REPLENISH work unit per request id, its ADR 0042; opt-in REPLENISHMENT_MODE=kafka, set in the reference deployment; the producer is deployed; context map K44, live)
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCompleted(published contract; no consumer: wes-work-planning reads the topic and ignores this type, its ADR 0042)
com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelledwes-work-planning (cancels the request's REPLENISH unit while it is still Pending, its ADR 0042; same opt-in as ReplenishmentRequested; producer deployed)
com.warehouse.wes.order-management.order.OrderAllocatedwes-work-planning
com.warehouse.wes.order-management.order.OrderPartiallyAllocatedwes-work-planning
com.warehouse.wes.order-management.order.OrderRepromisedexception-management (auto-resolve correlation only, never a case source; context map K58)
com.warehouse.wes.order-management.siteskudemand.SiteSkuDemandChangednetwork-inventory-planning, slotting-optimization
com.warehouse.wes.process-path-management.processpath.ProcessPathCreatedfulfillment-execution, wes-work-planning, workforce-management, order-management
com.warehouse.wes.process-path-management.processpath.ProcessPathUpdatedsame four
com.warehouse.wes.process-path-management.processpath.ProcessPathDeactivatedsame four
com.warehouse.wes.process-path-management.cptschedule.CPTScheduleChangedorder-management; outbound-shipping (cutoff schedule copy; consumer running (applied to k3s 2026-11-12))
com.warehouse.wes.labor-performance.performance.TaskPerformanceRecordedworkforce-management (and labor-performance itself)
com.warehouse.wes.workforce-management.shiftplan.ShiftPlanCommittedwes-work-planning, warehouse-planning
com.warehouse.wes.fulfillment-execution.task.TaskCompletedwes-work-planning, labor-performance, inventory-storage (picks, and RELOCATE moves via the additive RELOCATE fields, fulfillment-execution ADR 0047, and REPLENISH moves via the additive request_ref, fulfillment-execution ADR 0050 and inventory-storage ADR 0041); task-interleaving (consumer deployed); warehouse-planning (observed capacity, its ADR 0017)
com.warehouse.wes.fulfillment-execution.task.TaskAvailablepublished by fulfillment-execution since its ADR 0049, for RELOCATE and REPLENISH tasks only (the tasks that carry bins; ADR 0050): task-interleaving (consumer deployed)
com.warehouse.wes.fulfillment-execution.task.TaskClaimedpublished on the integration topic by fulfillment-execution since its ADR 0049 (the analytics-topic occurrence is separate): task-interleaving (consumer deployed)
com.warehouse.wes.fulfillment-execution.task.TaskCPTMissedorder-management
com.warehouse.wes.fulfillment-execution.package.PackageManifestedorder-management; returns-processing; outbound-shipping (plans the load; consumer running (applied to k3s 2026-11-12); ignores a manifest without site_id, which the producer omits today)
com.warehouse.wes.fulfillment-execution.package.PackageDivertedexception-management; outbound-shipping (short-ships the package with reason DIVERTED; consumer running (applied to k3s 2026-11-12))
com.warehouse.wes.fulfillment-execution.transfer.TransferPickednetwork-inventory-planning
com.warehouse.wes.fulfillment-execution.transfer.TransferDispatchednetwork-inventory-planning
com.warehouse.wes.fulfillment-execution.transfer.TransferArrivednetwork-inventory-planning (reserved kind; scan-driven receiving can bypass it)
com.warehouse.wes.work-planning.workunit.WorkReleasedfulfillment-execution (also the additive relocation object on the RELOCATE path, its ADR 0047, and the additive replenishment object on the REPLENISH path, its ADR 0050, produced by wes-work-planning's ADR 0042)
com.warehouse.wes.work-planning.workunit.WorkUnitCreatedorder-management (its ADR 0043; reads only the optional reference and line_no that wes-work-planning's ADR 0041 added; off by default, RELEASE_CONFIRMATION_MODE, not set in the reference deployment)
com.warehouse.wes.work-planning.workpool.PathCapacityChangedorder-management
com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanCreatedorder-management (its ADR 0031; opt-in PLANNED_CAPACITY_CONSUMER_GROUP, set in the reference deployment)
com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanPublishednetwork-inventory-planning (needs the additive site_id; a legacy event without it is excluded); order-management (its ADR 0031; opt-in PLANNED_CAPACITY_CONSUMER_GROUP, set in the reference deployment)
com.warehouse.wes.warehouse-planning.capacityplan.CapacityShortageDetectedorder-management (its ADR 0031; opt-in PLANNED_CAPACITY_CONSUMER_GROUP, set in the reference deployment)
com.warehouse.wes.warehouse-planning.capacityplan.BottleneckDetected(published contract; order-management's planned-capacity consumer reads the topic but ignores this type)
com.warehouse.wes.network-inventory-planning.transfer.TransferPlanApproved(published contract; no consumer yet)
com.warehouse.wes.network-inventory-planning.transfer.TransferAllocationRequestedinventory-storage
com.warehouse.wes.network-inventory-planning.workdemand.WorkDemandReleasedwes-work-planning
com.warehouse.wes.task-interleaving.stationtrip.InterleavingHintIssuedpublished by task-interleaving (deployed); consumed by fulfillment-execution (advisory tie-break inside one priority band; its ADR 0051, context map K47, live)
com.warehouse.wes.task-interleaving.stationtrip.InterleavingHintConsumed and ...InterleavingHintExpired, com.warehouse.wes.task-interleaving.policy.InterleavingPolicyDeclared(analytics topic only; read by task-interleaving's own analytics projector; no other consumer)
com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBookedoutbound-shipping (OUTBOUND appointments naming a cpt_id assign the load's door; consumer running (applied to k3s 2026-11-12))
com.warehouse.wms.yard-management.trailer.TrailerDockedoutbound-shipping (attaches the trailer and starts loading; consumer running (applied to k3s 2026-11-12))
com.warehouse.wms.yard-management.trailer.DoorWorkCompletedoutbound-shipping (stored as a local copy; consumer running (applied to k3s 2026-11-12))
com.warehouse.wms.yard-management.trailer.TrailerDepartedoutbound-shipping (confirms a CLOSED load; consumer running (applied to k3s 2026-11-12); pinned and tested against the producer's contract, its ADR 0006)
com.warehouse.wms.outbound-shipping.outboundload.ShipmentConfirmedorder-management (its ADR 0051; dark unless OUTBOUND_SHIPPING_CONSUMER_MODE=kafka); network-fulfillment is named by outbound-shipping ADR 0004 but has no handler
com.warehouse.wms.outbound-shipping.shippingpackage.PackageMissedLoadorder-management (re-promise, its ADR 0051); exception-management (one case per package, its ADR 0011)
com.warehouse.wms.outbound-shipping.outboundload.LoadingStarted, ...LoadClosed, ...LoadReopened(published contract; yard-management is named by outbound-shipping ADR 0005 but has no handler)
the other eight com.warehouse.wms.outbound-shipping. types (LoadPlanned, LoadDoorAssigned, LoadCancelled, PackageStaged, PackageLoaded, PackageUnloaded, BillOfLadingIssued, BillOfLadingVoided)(analytics only by design; outbound-shipping's own projector reads them from its analytics topic)

5. Consumer rules​

  1. Decode with the SDK and Validate(). A message that is not a valid CloudEvents 1.0 event (missing specversion, legacy flat shape, bad JSON) is a deterministic poison message: send it to the repo's existing DLQ path if the consumer has one, otherwise log at WARN with topic/partition/offset and commit past it. NEVER crash, NEVER block the partition, NEVER fall back to parsing a flat envelope.
  2. Dispatch on full type. Unknown types are ignored silently (forward compatibility), not errors.
  3. Idempotency/dedupe keys use the CloudEvents id (existing processed-event tables keep their column, now populated from id).
  4. Read time/subject from the context attributes, payload from DataAs.

6. Tests (required)​

  • Golden-file / exact-JSON unit test per published event type asserting all §3 attributes, the type string, and the content-type header.
  • A test that a legacy flat-envelope message is rejected (DLQ/skip) by every consumer, not parsed.
  • Existing Kafka integration tests (testcontainers, never skip-gated, never hardcoded localhost:9092) updated to the CloudEvents wire format.
  • Repo's full local gate green (make check / lefthook pre-push).

7. Documentation (required)​

  • apis/asyncapi.yaml: defaultContentType: application/cloudevents+json, one CloudEvents envelope schema with every §3 attribute required, every message has its exact type const and dataschema. Remove flat-envelope schemas and any "planned/ahead of the wire" caveats.
  • New ADR "CloudEvents 1.0 as the mandatory event envelope" (next number in the repo's sequence) stating this standard; mark older envelope ADRs (fe 0027, wes 0021, and any ADR describing the flat envelope) as "Superseded by ADR-NNNN". Register it in the ADR index/sidebar.
  • README / docs pages / .claude/rules / .claude/skills that show the flat envelope are rewritten to the CloudEvents shape.
  • CLAUDE.md and AGENTS.md carry the mandatory rule section (see CLAUDE-SECTION.md, verbatim, with the repo's own row filled in).

8. Cutover (no coexistence)​

All service PRs merge and deploy as ONE set. Before deploying: drain each service's outbox (rows were pre-encoded in the flat shape), then delete and recreate the warehouse.*.events and warehouse.*.analytics topics and re-seed the process-path catalogue, so no flat message remains for a FirstOffset replay. See warehouse-infra docs/cloudevents-cutover.md.