pytest: work around pay flakiness.
What changed, and why it matters
This commit only adds a test-flakiness workaround. It marks an existing test as flaky so the test suite will retry it if it fails. The underlying behavior being tested—a payment command sometimes ignoring an excluded route—was already known and labeled WONTFIX by the project. No production code was changed, and there is no indication this is treated as a security issue.
No security action needed. If the flaky behavior is concerning for operational reliability, consider investigating the `pay` plugin's handling of `exclude` and channel-hint timing, but this commit itself is only a test workaround.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a single pytest decorator @pytest.mark.flaky(reruns=2) to test_pay_manual_exclude in tests/test_pay.py. The commit message explains that pay occasionally ignores the exclude list, causing the test to fail with ‘Ran out of routes to try’ instead of the expected ‘is not reachable directly and all routehints were unusable.’ The author speculates it may be a timing issue with notifications and marks it WONTFIX. No fix to the pay plugin or any other production code is included.
Changed components
tests/test_pay.pyInspect captured patch +1 / −0
diff --git a/tests/test_pay.py b/tests/test_pay.py
index 1b35d509..c921b907 100644
--- a/tests/test_pay.py
+++ b/tests/test_pay.py
@@ -5255,6 +5255,7 @@ def test_sendpay_grouping(node_factory, bitcoind):
assert([p['status'] for p in pays] == ['failed', 'failed', 'complete'])
+@pytest.mark.flaky(reruns=2)
def test_pay_manual_exclude(node_factory, bitcoind):
l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True)
l1_id = l1.rpc.getinfo()['id']
Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.