return original zod schema after app module validation#6889
return original zod schema after app module validation#6889ryancbahan wants to merge 1 commit intomainfrom
Conversation
8e6e893 to
087fef7
Compare
| }, | ||
| } | ||
|
|
||
| // When |
There was a problem hiding this comment.
deleting some unneeded llm output as i pass by
There was a problem hiding this comment.
I don't think this is llm 😅, is something we used to do as a team to separate the different parts of a test. And llm's have picked it up when adding new tests
There was a problem hiding this comment.
Yeah, it's actually part our testing conventions: https://shopify.github.io/cli/cli/testing-strategy.html
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
Coverage report
Test suite run success3771 tests passing in 1448 suites. Report generated by 🧪jest coverage report action from 087fef7 |

WHY are these changes introduced?
See incident notes. The current validation mutates data in-place twice: once for zod.transform and once during json schema validation. We can keep the json schema validation approach as-is with its stripping behavior (sohuld we long term? IMO no, but different discussion) so long as we return the zod object, which we don't strip. This is a least-we-can-do approach to gain some safety back by reducing the amount of mutation to data happening inside a validation loop. I've also added a check to run transforms on the data pre-json schema validation only if a transform function is provided. This allows us a migration path to get things on contracts.
WHAT is this pull request doing?
How to test your changes?
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist