AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 14 Bitcoin

pytest: explicitly test failed case exposed by race.

Public commit record

What the developer wrote

Authored by Rusty Russell

83/100 · Strong
pytest: explicitly test failed case exposed by race.

This showed up as a flake, where we "got lucky" and the sendpay resolved before waitsendpay was called. Instead, make this race explicit, so we can test it.

```
# FIXME: #define PAY_UNPARSEABLE_ONION 202
PAY_UNPARSEABLE_ONION = 202
> assert err.value.error['code'] == PAY_UNPARSEABLE_ONION
E assert 204 == 202

tests/test_misc.py:2152: AssertionError
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit only adds a new test case to the project's test suite. It does not change any production code. The test is marked as expected to fail (xfail) and documents a race condition where a second call to check a failed payment can return a different error code than the first call. There is no fix or security-relevant change to the software itself.

Recommended action

No immediate action required for security. Treat as a test-quality issue. If the underlying race is later determined to have security implications, a separate fix would be needed.

Security signals we found

01

No production code changed

02

Test-only commit

03

Race condition documented in test, not fixed

04

Expected-fail marker indicates known behavioral inconsistency

Risk score

Why this scored 14/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.