You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(fanout): conditional UpdateItem race + dup-delete coverage (aws-samples#79 test gap)
Adds 4 tests covering the lifecycle-persist conditional path that
review fix#1 introduced and review fixaws-samples#6 hardened. Pre-PR-aws-samples#79 the
only ConditionalCheckFailed coverage was the terminal-dedup path;
the new lifecycle-persist + dup-delete code lacked direct assertions
and was flagged 9/10 criticality by the reviewer.
- task_created persist ConditionalCheckFailed → posts duplicate
then deletes it: pins the cleanup behaviour that prevents ghost
task_created posts in the channel
- session_started persist ConditionalCheckFailed → posts duplicate
then deletes it: parallel coverage for the other lifecycle
attribute (slack_session_msg_ts)
- dup-delete failure emits fanout.slack.dup_delete_failed with
error_id: pins the operator-alarm signal added in review fixaws-samples#6;
asserts both the event key and the FANOUT_SLACK_DUP_DELETE_FAILED
error_id propagate
- chat.delete returning message_not_found is treated as success
(no dup_delete_failed): negative-class assertion. Prevents
false-positive alarms when the race resolves cleanly (the
duplicate was already deleted by a prior retry).
The ghost / message_not_found tests use ``fetchMock.mockImplementation``
URL-routing rather than ``.mockResolvedValueOnce`` chains because
``updateReaction`` issues 2-3 reaction-API fetches between
chat.postMessage and chat.delete; routing by URL keeps the test
focused on the load-bearing chat.delete behaviour without coupling
to reaction call order.
0 commit comments