From 2af3e29f15b46dba2f66daf382649c2bca3a529a Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 2 Jul 2026 21:13:41 +0200 Subject: [PATCH] chore(machine): log operator-pubkey provenance so the config gap is loud (#70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relay + server pubkey already log (env)/(pairing)/(default) provenance; operator pubkeys did not. An empty operator set silently disables the fees/operator-config services → the machine sits at "awaiting configuration" with no signal why. Log the resolved operator pubkey(s) and their source, and flag the empty case explicitly (pending the #70 P1 server-delivered operator pubkey). Co-Authored-By: Claude Opus 4.8 --- apps/machine/src/services/lightning.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/machine/src/services/lightning.ts b/apps/machine/src/services/lightning.ts index 1f5f6fc..6509031 100644 --- a/apps/machine/src/services/lightning.ts +++ b/apps/machine/src/services/lightning.ts @@ -441,6 +441,16 @@ export async function initializeLightningServices(options?: { CONFIG.lnbitsServerPubkey || '(not configured)', envPubkey ? '(env)' : transport?.lnbitsServerPubkey ? '(pairing)' : '', ) + // Operator pubkey provenance. Today the ONLY source is VITE_OPERATOR_PUBKEYS + // (env). An empty set disables the fees/operator-config services → the machine + // sits at "awaiting configuration" — so log it loudly rather than fail silent. + // (aiolabs/bitspire#70 P1 will source this from LNbits over the transport.) + console.log( + '[Lightning] Operator pubkey(s):', + CONFIG.operatorPubkeys.length + ? CONFIG.operatorPubkeys.join(', ') + ' (env)' + : '(none — fee/operator config gated until a server-delivered operator pubkey; #70 P1)', + ) // Strict mode: validate the RESOLVED config is production-ready (no // localhost). Values may come from env or the pairing seed (#70).