Skip to content

[world] When resolveData='none', only strip eventData related to refs, keep other metadata#1364

Open
karthikscale3 wants to merge 65 commits intomainfrom
karthik/attach-stepname
Open

[world] When resolveData='none', only strip eventData related to refs, keep other metadata#1364
karthikscale3 wants to merge 65 commits intomainfrom
karthik/attach-stepname

Conversation

@karthikscale3
Copy link
Collaborator

@karthikscale3 karthikscale3 commented Mar 13, 2026

Changes:

  • Selective field stripping instead of full eventData removal — When resolveData='none', previously the entire eventData object was stripped. Now only known ref/payload fields (input, output, result, error, metadata, payload) are removed per event type, preserving metadata like stepName and workflowName. 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 stripEventDataRefs function (renamed from filterEventData) with an EVENT_DATA_REF_FIELDS lookup table is applied identically in world-local, world-postgres, and world-vercel.

  • Updated test expectations — The world-local storage test now asserts that step_created events retain { stepName: 'test-step' } in eventData instead of eventData being undefined.

  • web - Update web to fetch data withData: false

Copy link
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

@karthikscale3
Copy link
Collaborator Author

@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.

@karthikscale3
Copy link
Collaborator Author

@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

Copy link
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we do still need a tiny bit of test coverage, and maybe de-duplicate the data, please address those before merging

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VaguelySerious - FYI I have updated web to fetch data withData: false as this change effectively fixes the core issue and I have verified it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants