[codex] Resolve flaky race in check_channels missing actor test#1435
Open
jjyr wants to merge 1 commit into
Open
[codex] Resolve flaky race in check_channels missing actor test#1435jjyr wants to merge 1 commit into
jjyr wants to merge 1 commit into
Conversation
a258bda to
587420e
Compare
quake
approved these changes
Jun 11, 2026
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
Resolves a flaky race in
test_check_channels_does_not_fallback_when_channel_actor_missing.Root Cause
The test injected an expired TLC into a live channel actor via
update_channel_actor_stateimmediately before stopping it. Each channel actor runs periodicMaintainChannelTlcseveryCHECK_CHANNELS_INTERVAL(3s in debug builds), which detects and removes expired received TLCs. When the interval ticked during the test sleep window, the actor sent a peerRemoveTlcbefore it was stopped, moving the offered TLC on node A fromCommittedtoRemoveWaitAckand failing the assertion.Fix
Swap the sequence: stop the channel actor before writing the expired TLC into persisted state. Removes the race window entirely.
Validation
cargo fmt --all -- --checkgit diff --checkcargo nextest run -p fnn --features rocksdb test_check_channels_does_not_fallback_when_channel_actor_missing