Skip to content

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Jan 20, 2026

Related to #663

This PR adds a defensive check to the node start retry logic to prevent unnecessary retries when the node is already starting or running.

Description

Adds a guard in the .onFailure block of the start() function that checks if nodeLifecycleState.isRunningOrStarting() before triggering a retry. If the node is in a Starting or Running state when an error occurs, the function returns success instead of retrying, which could cause issues like NodeException.AlreadyRunning.

Preview

restart.webm
restore.webm
migration.webm

QA Notes

  1. Run unit tests

    • ./gradlew testDevDebugUnitTest --tests LightningRepoTest
    • Verify start should not retry when node lifecycle state is Starting test passes
  2. Verify the fix

    • The defensive check prevents retry loops when errors occur while the node is starting
    • This complements the existing fix that made sync non-fatal

Base automatically changed from fix/bitkit-not-responding to master January 20, 2026 14:36
@jvsena42 jvsena42 self-assigned this Jan 20, 2026
@claude

This comment has been minimized.

@jvsena42 jvsena42 marked this pull request as draft January 20, 2026 14:41
@jvsena42 jvsena42 changed the title fix: add defensive check to skip retry when node is starting chore: add defensive check to skip retry when node is starting Jan 20, 2026
@jvsena42 jvsena42 marked this pull request as ready for review January 20, 2026 17:00
@claude
Copy link

claude bot commented Jan 20, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants