The Update examples in doc schemas job fails intermittently: regenerating the examples flips one direction of the l3-l4 channel (132x1x0) in doc/schemas/listchannels.json between disabled and enabled:
"message_flags": 1,
- "channel_flags": 3,
- "active": false,
- "last_update": 1738000002,
+ "channel_flags": 1,
+ "active": true,
+ "last_update": 1738000001,
Two occurrences today on unrelated PRs, with byte-identical diffs (aa81c794..d7ed1e9b):
Root cause: tests/autogenerate-rpc-examples.py generates the recoverchannel example by stopping l4, deleting its database, and restarting it. From l3's point of view the peer is gone, and l3 eventually broadcasts a disabled channel_update for its side of the channel - but that disable is lazy (channel_gossip.c only emits it via an error reply or the refresh timer). The committed example captured the post-disable state, so whether the disable lands in l3's gossip store before the listchannels snapshot later in the script is a race.
Proposed fix: wait for l3's own direction of the l3-l4 channel to show active: false before taking the listchannels snapshot, matching the existing wait_for pattern the script already uses for the post-close listchannels race.
Part of #9222.
The
Update examples in doc schemasjob fails intermittently: regenerating the examples flips one direction of the l3-l4 channel (132x1x0) indoc/schemas/listchannels.jsonbetween disabled and enabled:Two occurrences today on unrelated PRs, with byte-identical diffs (
aa81c794..d7ed1e9b):Root cause:
tests/autogenerate-rpc-examples.pygenerates therecoverchannelexample by stopping l4, deleting its database, and restarting it. From l3's point of view the peer is gone, and l3 eventually broadcasts a disabledchannel_updatefor its side of the channel - but that disable is lazy (channel_gossip.conly emits it via an error reply or the refresh timer). The committed example captured the post-disable state, so whether the disable lands in l3's gossip store before thelistchannelssnapshot later in the script is a race.Proposed fix: wait for l3's own direction of the l3-l4 channel to show
active: falsebefore taking thelistchannelssnapshot, matching the existing wait_for pattern the script already uses for the post-close listchannels race.Part of #9222.