events: metadata in headers, not the body (ADR 0047) #1

Closed
jschoubben wants to merge 0 commits from events/adr-0047-alignment into main
Owner

Aligns the sdk event surface to ADR 0047's wire shape.

  • emit stamps the ADR 0047 headers (x-event-id, x-source, x-node, x-time, content-type; optional x-causation-id / x-schema) and publishes the body as only the domain payload.
  • on reconstructs the Event from those headers.
  • Event gains id (the x-event-id a consumer dedups on) and optional causationId / schema.
  • EventHeaders joins the contracts spine.

Supersedes the first cut that carried source/node/time in the body. Tests assert ids are present, unique, and that the body stays pure payload (sdk suite 7/7).

Part of the ADR-0047 alignment across mesh-sdk / mesh-tools / mesh-catalog.

https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF

Aligns the sdk event surface to ADR 0047's wire shape. - `emit` stamps the ADR 0047 headers (x-event-id, x-source, x-node, x-time, content-type; optional x-causation-id / x-schema) and publishes the body as **only** the domain payload. - `on` reconstructs the `Event` from those headers. - `Event` gains `id` (the x-event-id a consumer dedups on) and optional `causationId` / `schema`. - `EventHeaders` joins the contracts spine. Supersedes the first cut that carried source/node/time in the body. Tests assert ids are present, unique, and that the body stays pure payload (sdk suite 7/7). Part of the ADR-0047 alignment across mesh-sdk / mesh-tools / mesh-catalog. https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
jschoubben added 1 commit 2026-09-03 22:26:24 +00:00
emit stamps the ADR 0047 headers — x-event-id, x-source, x-node, x-time,
content-type, and optional x-causation-id / x-schema — and publishes the
body as only the domain payload. on() reconstructs the Event from those
headers. Event gains id (the x-event-id a consumer dedups on) plus the
optional causation/schema. EventHeaders joins the contracts spine.

Supersedes the first cut that carried source/node/time in the body.

Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
jschoubben closed this pull request 2026-09-05 01:18:51 +00:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-sdk#1