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
{{ message }}
Repository navigation
[Bug]: messaging-remote-send test intermittently reports an unhandled remote_auth_failed #7809
tests/codex-integration/messaging-remote-send.test.ts ("revoked peers and missing owners cannot submit, enable/start is never inferred") failed once on Linux CI (run 40419760194, job 121911066526) with an unhandled LocalMessagingError code remote_auth_failed raised from src/messaging/remote-auth.ts (fail()), although sendRemoteMessage maps that failure into its receipt. A source review found no second escaping promise, and the test passed 100/100 repeats on WSL and in its full 12-file CI batch with Bun 1.4.4, so the mechanism is still unknown. This issue tracks the root cause; the code has not changed since #6891.
Reproduction
Not consistently reproducible. Seen once in CI on Linux; repeated local runs pass.
Fixed on dev by #7820 (a5ecb912928df697ec0bb0645ff74e6e121b8a5a).
The mechanism was a fixture port collision. remoteMessagingPair() chose both co-located owner ports with remotePortCandidate(), which binds port 0, reads the number and releases it, so two back-to-back calls could return the same port. Bun binds both owners to it without EADDRINUSE, so connections reached the wrong owner. Authentication then failed during the awaited owner setup, before the sendRemoteMessage receipt mapping, which is why the failure surfaced as an unhandled remote_auth_failed. Forcing equal owner ports reproduces the CI stack. The fixture now holds the first port exclusively while choosing the second. No product promise escapes: 180 forced event orderings in authenticatedRemoteSocket produced no unhandled rejection.
The same release-before-bind pattern in the product's SSH tunnel setup is tracked separately in #7845.
Activity
lidge-jun commentedon Oct 27, 2026
Fixed on dev by #7820 (a5ecb91); details below.
lidge-jun commentedon Oct 27, 2026
Fixed on
devby #7820 (a5ecb912928df697ec0bb0645ff74e6e121b8a5a).The mechanism was a fixture port collision.
remoteMessagingPair()chose both co-located owner ports withremotePortCandidate(), which binds port 0, reads the number and releases it, so two back-to-back calls could return the same port. Bun binds both owners to it withoutEADDRINUSE, so connections reached the wrong owner. Authentication then failed during the awaited owner setup, before thesendRemoteMessagereceipt mapping, which is why the failure surfaced as an unhandledremote_auth_failed. Forcing equal owner ports reproduces the CI stack. The fixture now holds the first port exclusively while choosing the second. No product promise escapes: 180 forced event orderings inauthenticatedRemoteSocketproduced no unhandled rejection.The same release-before-bind pattern in the product's SSH tunnel setup is tracked separately in #7845.