Make ContextMetadata traceId optional - #2157
Conversation
✅ Deploy Preview for fdc3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2157 +/- ##
=======================================
Coverage 95.03% 95.03%
=======================================
Files 73 73
Lines 4251 4251
Branches 596 604 +8
=======================================
Hits 4040 4040
Misses 211 211 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kriswest
left a comment
There was a problem hiding this comment.
I expected traceId to be required in ContextMetadata as it was to be generated by the DA if not provided - and thought that was what was agreed in the working group. It is already optional in AppProvidableContextMetadata (https://fdc3.finos.org/docs/next/api/ref/Types#appprovidablecontextmetadata).
The docs are not currently in agreement with sources as they do say the DA may provide a traceId - but I think that is the error, not the sources requiring it on output. The conformance tests agree with the sources, whicch you change in this PR. Generation of a UIUD is if it was not provided seems a lesser burden on DAs than apps checking for its existence on using it. So I think we should be making the alternative change and updating the API overview content to require DAs to generate it if not present.
I note that the Agent Proxy is generating traceIds for raiseIntent if one is not provided at:
The reference implementation generates one for a raiseIntent request if not provided:
and for a result if not provided:
I don't see the same on broadcast in the proxy:
The reference implementation handles generation for a broadcast:
While I think we should go the other way here and require DAs to generate the traceId if not present - were we to go this way, more work is required IMHO,
|
Can we get an issue open for this. |
Describe your change
Makes
ContextMetadata.traceIdoptional across the API schema, generated BrowserTypes and BridgingTypes, public typings, documentation, and conformance checks. Desktop Agents may generate a trace ID, so callers can construct anIntentEventPayloadwithout supplying one.Related Issue
N/A — reported as a mismatch between the public
ContextMetadatatype and the generated browser protocol payload.Contributor License Agreement
Validation
npm run buildinpackages/fdc3-schemanpm run buildinpackages/fdc3-standardnpm run buildintoolbox/fdc3-conformanceContextMetadatawithouttraceIdis assignable toBrowserTypes.IntentEventPayload.metadataIntentEventruntime conversion accepts metadata withouttraceId