[bridge] test_sui_bridge_paused still races the owned-object index after #27229
Problem
sui_bridge::e2e_tests::complex::test_sui_bridge_paused can fail before it attempts to pause the bridge. After the initial ETH-to-Sui transfer, it immediately queries the owned-object index and asserts that exactly one ETH coin is visible. The assertion at crates/sui-bridge/src/e2e_tests/complex.rs:77 fails with expected 1, actual 0.
Independent upstream CI evidence
- Upstream
mainatc0d62e960fe63033cc0019db52af04458311bfa9: Native Bridge failure on September 10, 2026. The test failed all four attempts. Suite summary: 110 tests, 109 passed (4 flaky), 1 failed. - PR #27595 at
afe6d9a790865f524d863ff6ae11c95cfcc77b8e: same failure on September 10, 2026. The test failed all four attempts. Suite summary: 110 tests, 109 passed (5 flaky), 1 failed.
Both logs report:
panicked at crates/sui-bridge/src/e2e_tests/complex.rs:77:5:
assertion `left == right` failed
left: 1
right: 0The upstream-main failure establishes that this is not introduced by #27595. No new local build was needed for this report; the evidence is from the linked GitHub Actions runs.
Likely cause and existing partial fix
initiate_bridge_eth_to_sui waits for the transfer's on-chain status to become Claimed, which does not guarantee that the owned-object index has caught up. The immediate query in test_sui_bridge_paused is consistent with the indexing race already documented and addressed for other bridge tests in #27229.
That PR is already merged and included in both revisions above. It introduced the bounded wait_for_eth_coin_owned_by helper and converted five reads, but did not convert this read in test_sui_bridge_paused. A follow-up should wait for index visibility here as well, while preserving the later pause assertions. This diagnosis is based on the failing assertion and existing synchronization contract, not an instrumented reproduction of the index update.
I searched issues, PRs, commits, and the affected file's history for test_sui_bridge_paused, wait_for_eth_coin_owned_by, and bridge owned-object/indexing fixes; I found #27229 but no follow-up covering this remaining call site.
Existing CI command
SUI_SKIP_SIMTESTS=1 cargo nextest run --profile ci --cargo-quiet \
-E 'package(sui-bridge) | package(sui-bridge-indexer)'Run in the environment provisioned by .github/workflows/bridge.yml, including its pinned Foundry installation and PostgreSQL setup.
Source: MystenLabs/sui