Flips clboss-xmovefunds from plan-only to actually sending the
returned route via sendpay when execute=true. All the masking
and getroutes work from the previous commit is unchanged; this
commit adds the post-getroutes sendpay/waitsendpay machinery
plus the supporting infrastructure for self-payment HTLC
resolution.
Mechanism
Once getroutes returns one or more routes (potentially multi-
part), do_execute:
1. Generates a fresh preimage and payment_secret via the new
XMoveFunds::Claimer (mirroring FundsMover::Claimer's
pattern but maintained independently so the two
subsystems coexist without sharing the entry table). The
preimage is registered in the claim table so that when
the resulting HTLCs arrive at us we auto-resolve them.
2. Constructs a sendpay-format route per part by copying the
askrene path[] hops verbatim (mapping
short_channel_id_dir, amount_out_msat, cltv_out, and
node_id_out into the sendpay hop shape) and appending a
closing hop (fill_peer -> self_id via the dest_scid that
matches the route's last node_id_out).
3. Issues sendpay for each part with shared payment_hash,
payment_secret, label, and groupid. Single-part
payments use partid=0 (non-MPP). Multi-part payments use
partid 1..N and pass amount_msat as the total across all
parts.
4. Waits for every part via waitsendpay. Sendpay or
waitsendpay errors per part are captured into an errors
array so the overall reply can still summarise what
happened to each part instead of bailing on the first
failure.
Label format is "clboss-xrebalance-<unix-ts>" so the eventual
EarningsTracker integration can disambiguate xrebalance-family
payments from FundsMover ones (see R4 in the plan).
execute default flipped to true
Per the plan's "Manual command actually executes (signet)"
decision, the default is now execute=true. Caller explicitly
passes execute=false to get the plan-only response (the
existing "predict-and-compare" mode), which still returns the
askrene plan with no sendpay.
API surface
The reply gains:
status "executed" when sendpay+waitsendpay ran,
"execute_skipped" when execute=true was
requested but getroutes errored, or
"planned" when execute=false.
execution object, only present when status =
"executed":
payment_hash hex
preimage hex
label "clboss-xrebalance-<ts>"
groupid u64
parts number of MPP parts
results array of per-part waitsendpay responses
errors array of per-part error strings
(only present if any failed)