fix(lease-broker): de-flake recovery_runtime b2 broker-socket ConnectionRefused race (#849) #851
Reference in New Issue
Block a user
Delete Branch "fix/849-recovery-runtime-fixture-race"
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
Fixes the environmental per-test broker-socket
ConnectionRefusedrace inrecovery_runtime_unittest.py(b2), which surfaced as intermittent RED on descendant-mainpush CI. Fixture-lifecycle only: the testrequest()helper now bounds the Unix-socket connect with a 5s deadline retry that catches onlyConnectionRefusedErrorand re-raises the real failure at the deadline.Closes #849.
Scope
packages/mosaic/src/lease-broker/recovery_runtime_unittest.py(test fixture). Zero production lease-broker / recovery-runtime source changed.Review provenance — three distinct lanes (author != code-reviewer != security-reviewer)
03234bcf295834e7c98f6ade669976456f9bdabfa15b50badb70ac0d415045c8. Detached exact-head review; AC1-6 + C1-5 all PASS; red-first independently reproduced (base helper RED / head GREEN under an injected pre-listen window); 6x stable; 8 sibling unittests pass; Codex approve 0.94 / 0 findings.cdf4c4d4d143dabfdfcf5005182ce5264644e61f12d1513d7a29f0618ddb206c. S1-S5 all PASS; b2 assertion + WI-6 production transport blobs byte-identical at base/head; retry catches onlyConnectionRefusedError; finite deadline re-raises real failures (independently probed).CI note — read before relying on PR-CI
PR-event CI does not execute
recovery_runtime_unittest.py(thepull_requestpipeline does not invoke it). PR-CI green here is the general merge gate only. Therecovery_runtimeGREEN datapoint that validates this fix comes from the post-merge descendant-mainpush pipeline. Do not treat PR-CI green as proof the flake is fixed.No self-merge; no completion claim. Merge and FCM-M5-001 completion ownership retained by the coordinator.
Durable exact-head review binding — do not merge without the coordinator 6-check
Exact head bound:
cbacd10a6601b223cb61d5303b4761e0385a54eeThree distinct review lanes (author != code-reviewer != security-reviewer):
03234bcf295834e7c98f6ade669976456f9bdabfa15b50badb70ac0d415045c8. Detached exact-head; AC1-6 + C1-5 PASS; red-first independently reproduced (base helper RED / head GREEN under an injected pre-listen window); 6x stable; 8 sibling unittests pass; Codex approve 0.94 / 0 findings.cdf4c4d4d143dabfdfcf5005182ce5264644e61f12d1513d7a29f0618ddb206c. S1-S5 PASS; b2 assertion + WI-6 production transport blobs byte-identical at base/head; retry catches onlyConnectionRefusedError; finite deadline re-raises real failures (independently probed).CI distinction: PR-event CI does not run
recovery_runtime_unittest.py(proven by prior pipeline #1907). PR-CI green = general merge gate only. Therecovery_runtimeGREEN datapoint that validates this fix arrives from the post-merge descendant-mainpush pipeline (the FCM-M5-001 completion gate). This binding does not claim FCM-M5-001 done.Posted via Gitea REST (the framework
pr-review.shcomment path is the subject of #812).