[world] When resolveData='none', only strip eventData related to refs, keep other metadata#1364
[world] When resolveData='none', only strip eventData related to refs, keep other metadata#1364karthikscale3 wants to merge 65 commits intomainfrom
resolveData='none', only strip eventData related to refs, keep other metadata#1364Conversation
VaguelySerious
left a comment
There was a problem hiding this comment.
@karthikscale3 I think the right solution here is to generally specifically strip out all refs, and no other metadata, instead of special casing properties we want. That'll be more generic and future-proof. We can call all the filter functions stripEventDataRefs or similar for clarity. I renamed the PR to that affect, leaving implementation to you
Aligned! Will update. |
Updated |
VaguelySerious
left a comment
There was a problem hiding this comment.
LGTM, we do still need a tiny bit of test coverage, and maybe de-duplicate the data, please address those before merging
There was a problem hiding this comment.
@VaguelySerious - FYI I have updated web to fetch data withData: false as this change effectively fixes the core issue and I have verified it.
Changes:
Selective field stripping instead of full eventData removal — When
resolveData='none', previously the entireeventDataobject was stripped. Now only known ref/payload fields (input,output,result,error,metadata,payload) are removed per event type, preserving metadata likestepNameandworkflowName. This allows the UI to display step and workflow names without requiring a full data resolve.Consistent implementation across all three world backends — The new
stripEventDataRefsfunction (renamed fromfilterEventData) with anEVENT_DATA_REF_FIELDSlookup table is applied identically inworld-local,world-postgres, andworld-vercel.Updated test expectations — The
world-localstorage test now asserts thatstep_createdevents retain{ stepName: 'test-step' }ineventDatainstead ofeventDatabeingundefined.web - Update
webto fetch datawithData: false