Chromie/fix zod v3 enum compatibility

Merged
CH
9mo ago
+157-2

why

what changed

test plan


Summary by cubic

Fixes Zod v3 enum handling for method selection in act() and observe() to prevent v3 runtime errors and keep validation consistent across Zod v3 and v4.

  • Bug Fixes
    • Use Object.values(SupportedUnderstudyAction) with z.enum() in inference.ts for act() and observe().
    • Add tests verifying enum validation works in both Zod v3 and v4, including invalid method rejection.
    • Supports Linear STG-1212 by enforcing enum-based method selection in act/observe.