[Bug] Non-deterministic behavior with multiple transforms #340
sadsciencee
started this conversation in
Feedback: Cart Transform API
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I hope this is a skill issue but I think I've discovered a bug with transforms.
I'm experiencing non deterministic behavior when multiple transforms are activated from the same function. It appears that in some cases, my transform function will receive a cart that is already affected by the same transform.
For example I have a merge that takes 3x variant A and 1x variant B.
If the cart line makeup is
A x 3
B x 1
This is successfully transformed to
AB x1
If the cart line makeup is
A x 4
B x 1
This is successfully transformed to
AB x 1
A x 1
However I've noticed that when there are more combinations and instances of bundles, the input logs show the cart lines in the input are pre-transformed based on previous transforms in the cart
For example if I take the lines
AB x 1
A x 1
And increase the quantity of AB by one I would expect
AB x 2
A x 1
However instead I get a cart error and either the transform is dropped or misapplied in the cart.
I would expect my input in this situation to look like
A x 7
B x 2
But instead it comes in from the logs as
A x 1
A x 3
B x 1
A x 1
B x 1
And it's unclear from documentation as to the best method to transform this type of input into the correct output transform.
Beta Was this translation helpful? Give feedback.
All reactions