fix(cron): gate LND maintenance tasks behind cronConfig.lndTasksEnabled#430
Merged
Conversation
The cron server unconditionally ran upstream galoy's LND/bitcoin maintenance tasks (rebalancingInternalChannels, updateEscrows, pending LN invoice/payment updates, LnPayments sync, routing revenues, legacy onchain receipts, LND payment cleanup) plus checkAllLndHealth and activateLndHealthCheck. Flash is IBEX-custodial with no LND nodes, so deleteLndPaymentsBefore2Months throws OffChainServiceUnavailableError on every run — one failed task exits 99, so the daily k8s Job has been crash-looping (masked until now by the chart's missing -c configPath, fixed in charts 3.2.15). Add cronConfig.lndTasksEnabled (schema default true — upstream parity; legacy configs without the key validate and behave unchanged, verified through the real loader) and gate the LND task group and both health checkers behind it. With it false, the cron runs exactly the tasks that apply to Flash: mongo expiry cleanup (deleteExpiredPaymentFlows, deleteExpiredInvoices) and Bridge↔IBEX reconciliation (already self-gated on BridgeConfig.enabled). rebalance/swapOut keep their existing config gates. Deployments follow-up: set cronConfig.lndTasksEnabled=false in the chart config once this image ships. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bobodread876
approved these changes
Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The daily
flash-cronjobk8s Job crash-loops:deleteLndPaymentsBefore2MonthsthrowsOffChainServiceUnavailableError(no LND exists in Flash's IBEX-custodial architecture — it trieslnd1.galoy-dev-bitcoin.svc.cluster.local, upstream galoy's dev default), one failed task →exit 99→ Job retry loop. This was masked until charts 3.2.15 fixed the missing-cconfigPath; with the config finally loading, the task-level failure surfaced.Task audit (what runs on Flash and what shouldn't)
rebalancingInternalChannels,updateEscrows,updateRoutingRevenuesupdatePendingLightningInvoices,updatePendingLightningPayments,updateLnPaymentsCollection,updateLegacyOnChainReceiptdeleteLndPaymentsBefore2Months(the thrower),deleteFailedPaymentsAttemptAllLndscheckAllLndHealth()preamble +activateLndHealthCheck()bootstraprebalance/swapOutJobrebalanceEnabled/swapEnabledgatesreconcileBridgeDepositsJob/reconcileBridgeWithdrawalsJobBridgeConfig.enabled→ unchangeddeleteExpiredPaymentFlows,deleteExpiredInvoicesChange
New
cronConfig.lndTasksEnabled(schema default true — upstream parity). Verified through the real config loader:cronConfig→{rebalanceEnabled:true, swapEnabled:true, lndTasksEnabled:true}(unchanged behavior)cronConfigwithout the key →lndTasksEnabled:trueinjected (backward compatible)false→ gated task list: expiry cleanup + bridge reconciliation onlytsc --noEmitclean; eslint clean.Rollout
After this image ships via the pipeline, set
cronConfig.lndTasksEnabled: falsein the chart'sgaloy.config(charts repo — will ride the auto image-bump PR). Ordering matters: the values change must not land before this image (old schema hasadditionalProperties: falseand would reject the unknown key).🤖 Generated with Claude Code