Flaky CI Failure: node-sdk Preferences 'should stream preferences' — expected 4 updates but got 3
Workflow: Test
Failed run: https://github.com/xmtp/libxmtp/actions/runs/29026036425
Commit: f46d623
Failed jobs: test-node-sdk / Test (node-sdk) shard 1
Summary
The Node SDK integration test Preferences > should stream preferences in test/Preferences.test.ts failed because the preference stream delivered only 3 updates instead of the expected 4. The test ran for 3337ms before the assertion fired. All other 182 tests in the shard passed. This is consistent with a race condition or timing issue in the streaming path where one preference update event was not delivered before the assertion ran.
Error Details
FAIL test/Preferences.test.ts > Preferences > should stream preferences
AssertionError: expected 3 to be 4 // Object.is equality
- Expected
+ Received
- 4
+ 3
❯ test/Preferences.test.ts:216:32
214| preferences.push(...update);
215| }
216| expect(preferences.length).toBe(4);
| ^
Test Files 1 failed | 14 passed (15)
Tests 1 failed | 182 passed (183)
Start at 14:42:56
Duration 21.89s
error: recipe `test-node-sdk-ci` failed on line 37 with exit code 1
Analysis
The test collects preference update events via a stream and asserts that exactly 4 are received. Only 3 arrived, meaning one event was either dropped, delayed beyond the collection window, or the stream was closed before the final event was emitted. This is a test/code failure — likely a race condition in the streaming or preference-update delivery path in the Node SDK bindings. The pattern (N-1 events received) is typical of async stream tests that don't wait long enough for the final event.
Related area: sdks/js/node-sdk/test/Preferences.test.ts, Node SDK preference streaming.
Reported by Flaky Failure Watcher
Flaky CI Failure: node-sdk Preferences 'should stream preferences' — expected 4 updates but got 3
Workflow: Test
Failed run: https://github.com/xmtp/libxmtp/actions/runs/29026036425
Commit: f46d623
Failed jobs: test-node-sdk / Test (node-sdk) shard 1
Summary
The Node SDK integration test
Preferences > should stream preferencesintest/Preferences.test.tsfailed because the preference stream delivered only 3 updates instead of the expected 4. The test ran for 3337ms before the assertion fired. All other 182 tests in the shard passed. This is consistent with a race condition or timing issue in the streaming path where one preference update event was not delivered before the assertion ran.Error Details
Analysis
The test collects preference update events via a stream and asserts that exactly 4 are received. Only 3 arrived, meaning one event was either dropped, delayed beyond the collection window, or the stream was closed before the final event was emitted. This is a test/code failure — likely a race condition in the streaming or preference-update delivery path in the Node SDK bindings. The pattern (N-1 events received) is typical of async stream tests that don't wait long enough for the final event.
Related area:
sdks/js/node-sdk/test/Preferences.test.ts, Node SDK preference streaming.Reported by Flaky Failure Watcher