e2e/qa: retry seat withdraw while in-flight rejection persists instead of polling pending flag#4065
Closed
thijsvanemmerik wants to merge 5 commits into
Closed
e2e/qa: retry seat withdraw while in-flight rejection persists instead of polling pending flag#4065thijsvanemmerik wants to merge 5 commits into
thijsvanemmerik wants to merge 5 commits into
Conversation
thijsvanemmerik
marked this pull request as draft
July 17, 2026 12:32
Contributor
Author
|
Closing unmerged. This was a QA-environment issue handled separately; no change to land here. |
ben-dz
added a commit
that referenced
this pull request
Jul 17, 2026
…persedes #4065) Co-authored-by: Thijs van Emmerik <thijs@doublezero.xyz>
Contributor
|
Superseded by #4066 |
ben-dz
added a commit
that referenced
this pull request
Jul 17, 2026
…persedes #4065) Co-authored-by: Thijs van Emmerik <thijs@doublezero.xyz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The multicast settlement QA test failed persistently on seat teardown. Two problems in the old flow:
wait_for_seat_allocation_ackedpolled the client seat's pending flag to detect the oracle ack. That flag cannot distinguish "the oracle has not acked yet" from "no allocation request was created" (a re-fund of an already-active seat creates none), so the wait could time out withsaw_pending=falsewhen there was simply nothing to ack.withdraw_seatdid a single-shot withdraw. The CLI preflight rejects with an in-flight error while it reads the allocation request PDA as still present, and that read can lag an already-closed request, so a single attempt fails transiently.Changes:
WithdrawSeatWaitingForAck). The retry absorbs both a slow oracle ack and a lagging RPC read; an in-flight withdraw bails atomically with no state change, so retrying is safe. Any non-in-flight error fails fast.Tradeoff
With the pending-flag ack-wait removed, a genuine oracle outage now surfaces as
validate_tunnel_uptiming out rather than a specific "not acked" error. The withdraw's timeout error calls out a persistent in-flight rejection (a stale RPC view) versus a slow ack.Scope
Self-heal of a seat left active by a prior failed teardown is handled separately and is intentionally not part of this PR.
Testing Verification
Verify with a manual
workflow_dispatchofqa.mainnet-betawithdoublezero_branchset to this PR branch, confirmingTestQA_MulticastSettlementpasses end to end includingwithdraw_seat(baseline is green after the stuck seat was cleared).