As @zhassan-aws originally posted in #3270 (review)
LGTM. The only thing I'm unsure about is that Invariant is not derived automatically when the attribute is specified. There's also no warning or error message if neither Invariant or Arbitrary is derived.
As @zhassan-aws originally posted in #3270 (review)