flake: recovery_runtime_unittest b2 per-test broker-socket ConnectionRefused race (gates FCM-M5-001 completion) #849
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
RecoveryRuntimeBoundaryTest.test_b2_production_observer_promotes_over_private_transport_and_rejects_broker_supplied_messageinpackages/mosaic/src/lease-broker/recovery_runtime_unittest.pyintermittently errors withConnectionRefusedError: [Errno 111] Connection refusedon a per-test Unix-domain-socket connect. This is a pre-existing environmental fixture race, not a content regression. It surfaced as the sole failing case in the completion pipeline for the docs-only merge #789.Evidence (provider-visible)
627cf2bb— FAILURE,teststep id 49576: b2 case ERROR atrecovery_runtime_unittest.py:186register()→:103→:36connection.connect(socket_path)→ConnectionRefusedError [Errno 111]. Same-run sibling marker..E— 2 of 3 boundary cases PASSED; only b2 errored.0582a891— SUCCESS,teststep id 49563: same test invoked and PASSED.2509eb76— SUCCESS,teststep id 49541: same test invoked and PASSED.a39bafb8(#789 head) — SUCCESS,teststep id 49334:recovery_runtime_unittest.pynever invoked (PR suite ≠ push suite).Clincher:
git diff 0582a891..627cf2bb -- packages/mosaic/src/lease-broker/is byte-empty and the test file is byte-identical, yet the identical content PASSED on pushes #1931/#1929 and only b2-errored on #1932. Identical bytes, opposite outcomes → per-test broker-fixture socket-connect race, not a missing service and not a #789 regression.Required fix (bounded, red-first — do NOT skip/quarantine/mute)
Fix the fixture start/teardown readiness so the test connects deterministically:
register(), and/or serialize per-test broker start so a prior test's teardown cannot race the next test's connect.Explicitly forbidden:
unittest.skip, muting,@expectedFailure, retry-to-launder the completion pipeline. De-flake by fixing, not hiding.Completion coupling
Per Mos disposition: FCM-M5-001 is CONTENT-DELIVERED & MERGED @
627cf2bbbut completion is PENDING-GREEN — coupled to this fix's descendant-main pipeline runningrecovery_runtimeGREEN (the honest post-merge completion datapoint;627cf2bbis current tip with no natural later push). No completion is claimed on the current red gate.Process
Priority p2 (gates a completion + security-surface — above the p3 wrapper bugs). Surface = lease-broker recovery runtime (security-adjacent). terra author ≠ reviewer; independent security review; exact-head CI; Mos merge; then terminal-green descendant-main. Keep OUTSIDE #848 tracking and #812. Single owner/card, no duplicate lane.