fix: fail invalid polling state#575
Conversation
Propagate checkpoint deserialization failures through the existing terminal operation error path instead of restarting from the initial state.\n\nUpdate the regression test to require a FAIL checkpoint and typed wait-for-condition error.
yaythomas
left a comment
There was a problem hiding this comment.
![]()
thank you so much @Sanjays2402, great contribution, welcome to dex!
I also ran the compliance test suite myself, no regression:
--- Validating test description 6-1 (WaitForConditionBasic) ---
Invoking WaitForConditionBasic with event from 6-1.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-2 (WaitForConditionImmediate) ---
Invoking WaitForConditionImmediate with event from 6-2.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-3 (WaitForConditionWithName) ---
Invoking WaitForConditionWithName with event from 6-3.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-4 (WaitForConditionCustomInitialState) ---
Invoking WaitForConditionCustomInitialState with event from 6-4.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-5 (WaitForConditionFixedDelay) ---
Invoking WaitForConditionFixedDelay with event from 6-5.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-6 (WaitForConditionMaxAttempts) ---
Invoking WaitForConditionMaxAttempts with event from 6-6.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-7 (WaitForConditionCheckThrows) ---
Invoking WaitForConditionCheckThrows with event from 6-7.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-8 (WaitForConditionCheckThrowsCaught) ---
Invoking WaitForConditionCheckThrowsCaught with event from 6-8.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-9 (WaitForConditionComplexObject) ---
Invoking WaitForConditionComplexObject with event from 6-9.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-10 (WaitForConditionNullResult) ---
Invoking WaitForConditionNullResult with event from 6-10.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-11 (WaitForConditionCustomSerdes) ---
Invoking WaitForConditionCustomSerdes with event from 6-11.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97'}
--- Validating test description 6-12 (WaitForConditionThenStep) ---
Invoking WaitForConditionThenStep with event from 6-12.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97', 'ID2': 'c5faca15ac2f93578b39ef4b6bbb871bdedce4ddd584fd31f0bb66fade3947e6'}
--- Validating test description 6-13 (WaitForConditionMultipleSequential) ---
Invoking WaitForConditionMultipleSequential with event from 6-13.yaml ...
✅ PASSED
Placeholders: {'ID1': '1ced8f5be2db23a6513eba4d819c73806424748a7bc6fa0d792cc1c7d1775a97', 'ID2': 'c5faca15ac2f93578b39ef4b6bbb871bdedce4ddd584fd31f0bb66fade3947e6'}
Closes #574
Checkpoint deserialization failures now follow the existing terminal failure path, recording a
FAILcheckpoint and surfacingWaitForConditionErrorinstead of restarting polling frominitial_state.Tests: 37 focused tests passed; Ruff check and format passed.