What changed, and why it matters
This commit only changes how the project's automated test suite handles a few tests that sometimes fail randomly. It removes the 'flaky' test dependency from the project configuration and instead marks five specific tests as flaky directly. There is no change to the actual Core Lightning software that users run, so there is no security impact.
No security action required. This is a routine CI/test reliability change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes the ‘flaky>=3.7.0’ pytest plugin from pyproject.toml dev dependencies and adds @pytest.mark.flaky(reruns=5) decorators to five existing tests across test_coinmoves.py, test_invoices.py, test_plugin.py, test_reckless.py, and test_splicing.py. This is a CI/test-infrastructure change only; no production code, protocol logic, or cryptographic handling is modified.
Changed components
pyproject.tomltests/test_coinmoves.pytests/test_invoices.pytests/test_plugin.pytests/test_reckless.pytests/test_splicing.pyInspect captured patch +5 / −1
diff --git a/pyproject.toml b/pyproject.toml
index ad0b9d3e..f86ef78e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -30,7 +30,6 @@ dev = [
"pytest-timeout>=2.4.0",
"flake8>=7.0",
"pytest-custom-exit-code==0.3.0",
- "flaky>=3.7.0",
"requests>=2.32.0",
"flask-socketio>=5",
"tqdm",
diff --git a/tests/test_coinmoves.py b/tests/test_coinmoves.py
index 291f857b..dc5abb04 100644
--- a/tests/test_coinmoves.py
+++ b/tests/test_coinmoves.py
@@ -681,6 +681,7 @@ def test_coinmoves_unilateral_htlc_before_included(node_factory, bitcoind):
check_balances(l1, l2, fundchannel['channel_id'], 0)
+@pytest.mark.flaky(reruns=5)
@pytest.mark.openchannel('v1')
@pytest.mark.openchannel('v2')
@unittest.skipIf(TEST_NETWORK != 'regtest', "Amounts are for regtest.")
diff --git a/tests/test_invoices.py b/tests/test_invoices.py
index 68df91c4..6f4bc3ca 100644
--- a/tests/test_invoices.py
+++ b/tests/test_invoices.py
@@ -927,6 +927,7 @@ def test_invoices_wait_db_migration(node_factory, bitcoind):
@unittest.skipIf(os.getenv('TEST_DB_PROVIDER', 'sqlite3') != 'sqlite3', "This test is based on a sqlite3 snapshot")
@unittest.skipIf(TEST_NETWORK != 'regtest', "The DB migration is network specific due to the chain var.")
+@pytest.mark.flaky(reruns=5)
def test_invoice_botched_migration(node_factory, chainparams):
"""Test for grubles' case, where they ran successfully with the wrong var: they have *both* last_invoice_created_index *and *last_invoices_created_index* (this can happen if invoice id 1 was deleted, so they didn't die on invoice creation):
Error executing statement: wallet/db.c:1684: UPDATE vars SET name = 'last_invoices_created_index' WHERE name = 'last_invoice_created_index': UNIQUE constraint failed: vars.name
diff --git a/tests/test_plugin.py b/tests/test_plugin.py
index 143069de..47546029 100644
--- a/tests/test_plugin.py
+++ b/tests/test_plugin.py
@@ -2191,6 +2191,7 @@ def test_plugin_fail(node_factory):
l1.daemon.wait_for_log(r': exited during normal operation')
+@pytest.mark.flaky(reruns=5)
@pytest.mark.openchannel('v1')
@pytest.mark.openchannel('v2')
def test_coin_movement_notices(node_factory, bitcoind, chainparams):
diff --git a/tests/test_reckless.py b/tests/test_reckless.py
index 10ade362..7fb04d74 100644
--- a/tests/test_reckless.py
+++ b/tests/test_reckless.py
@@ -351,6 +351,7 @@ def test_tag_install(node_factory):
header = line
+@pytest.mark.flaky(reruns=5)
@unittest.skipIf(VALGRIND and SLOW_MACHINE, "node too slow for starting plugin under valgrind")
def test_reckless_uv_install(node_factory):
node = get_reckless_node(node_factory)
diff --git a/tests/test_splicing.py b/tests/test_splicing.py
index 966c75f6..0c5b71ac 100644
--- a/tests/test_splicing.py
+++ b/tests/test_splicing.py
@@ -499,6 +499,7 @@ def test_splice_stuck_htlc(node_factory, bitcoind, executor):
assert l1.db_query("SELECT count(*) as c FROM channeltxs;")[0]['c'] == 0
+@pytest.mark.flaky(reruns=5)
@unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need')
def test_route_by_old_scid(node_factory, bitcoind):
l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts={'experimental-splicing': None, 'may_reconnect': True})
Why this scored 15/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.