feat(spec,schemas): adopt the CloudEvents attributes EEP had skipped - #100
Open
ucekmez wants to merge 1 commit into
Open
feat(spec,schemas): adopt the CloudEvents attributes EEP had skipped#100ucekmez wants to merge 1 commit into
ucekmez wants to merge 1 commit into
Conversation
The envelope defined eight `eep_`-prefixed extensions while using none of the optional CloudEvents attributes that solve the same problems. `subject`, `dataschema` and `dataref` were all absent, as were the Distributed Tracing extension attributes — in a protocol whose whole premise is agents consuming events efficiently across multiple hops. - `subject` — which thing inside `source` changed. Without it a subscriber must parse `data` to decide whether it wanted the event at all, which is exactly the context bloat EEP claims to remove. - `dataschema` — the payload contract travels with the event instead of being documented out of band, so a subscriber can validate or typed-decode a payload it has never seen. - `dataref` — the Claim Check pattern. A publisher sends a reference and only subscribers that need the body pay for it. Notable by its absence in a project whose front-page demo is "2.2 KB instead of 46 KB". Retrieval is an ordinary Layer 1 request and stays subject to the entity's gates, so a claim check does not become a gate bypass. - `traceparent` / `tracestate` — EEP is multi-hop by design (agent → publisher → subscriber → downstream agent) and the causal chain broke at every boundary. `docs/ops/observability.md` said "use OpenTelemetry" but no wire field carried the context. Changes: - `event.envelope.json` gains all five, with a W3C Trace Context pattern on `traceparent`. Types regenerated. - New normative §7.1 covering when to set each, the rule that a `dataref` without `data` MUST be fetched, and the prohibition on sending `data` and a `dataref` that disagree. - `WebhookDispatcher` mirrors trace context into HTTP headers per the CloudEvents Distributed Tracing extension. Only well-formed values are forwarded: a malformed `traceparent` is worse than none, because it silently roots the subscriber's spans under a trace that never existed. - Conformance vectors for the standard attributes, a claim-check event, and a malformed `traceparent`. - §7 records the CloudEvents attribute-naming problem: the existing `eep_`-prefixed names contain underscores, which CloudEvents v1.0.2 excludes. Documented as an open issue rather than renamed — a rename is breaking and deserves its own decision. All additions are optional, so existing publishers stay conformant. Refs: EEP audit 2026-08 findings B5, B6 Signed-off-by: Ugur Cekmez <ucekmez@gmail.com>
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 8 of a stacked series. Base is #99. Not for merge without review.
event.envelope.jsondefines eighteep_-prefixed extensions and uses none of the optional CloudEvents attributes that solve the same problems.subjectsourcechangeddatato decide whether they wanted the event — exactly the context bloat EEP claims to removedataschemadatareftraceparent/tracestategrep -r traceparentreturned zero matches repo-wide.docs/ops/observability.mdsays "Use OpenTelemetry for metrics and traces" — non-normative prose, no wire field.What changed
event.envelope.jsongains all five, with a W3C Trace Context pattern constrainingtraceparent. Types regenerated.datarefwithoutdataMUST be fetched; and the prohibition on sendingdataand adatarefthat disagree. Claim-check retrieval is an ordinary Layer 1 request and stays subject to the entity's gates (§3.4), so it does not become a gate bypass.WebhookDispatchermirrors trace context into HTTP headers per the CloudEvents Distributed Tracing extension. Only well-formed values are forwarded — a malformedtraceparentis worse than none, because it silently roots the subscriber's spans under a trace that never existed.traceparent.Scope
Checklist
additionalPropertieswas alreadytrueon the envelope, so publishers already emitting these attributes were passing validation without the schema describing them.Verification
tests/@eep-dev/middlewarecompliance-cli --fixturestests/cross-impl/test_conformance_fixtures.pycodegen-schema-types --checkNotes for reviewers
The attribute-naming problem is recorded, not fixed. CloudEvents v1.0.2 restricts context attribute names to lowercase ASCII letters and digits — the underscore is excluded — so
eep_version,eep_subscription_idand the rest are not conformant CloudEvents extension names. Every attribute added here uses a compliant name, but the existing eight do not.I added a note in §7 rather than renaming, because a rename is breaking and deserves its own decision. It is harmless in structured mode and becomes load-bearing in binary content mode, where attributes become
ce--prefixed headers. That is the next PR in this series, so the question will need an answer there — I'd rather surface it than have it decided implicitly by whoever writes the binary-mode mapping.datarefsemantics are specified but not implemented in the middleware — there is no payload store to reference. The spec text and vectors are what an implementor needs; the reference stack does not need to grow a blob store to make the pattern usable.