Skip to content

Conversation

@martindale
Copy link
Member

General cleanup of Lightning integration to mirror recent work on bitcoind stability.

@martindale martindale requested a review from Copilot June 19, 2025 12:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

General cleanup of Lightning integration to mirror recent work on bitcoind stability.

  • Increased default retry attempts in the internal _waitForBitcoind helper.
  • Introduced a new script to analyze dependency update frequency and added an npm task.
  • Extended CI to install lightningd on both Ubuntu and macOS runners.

Reviewed Changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.

File Description
services/bitcoin.js Bumped default retry count and clarified jsdoc for _waitForBitcoind
scripts/analyze-deps.js New script to report how often dependencies change over history
package.json Added report:noisy script to run analyze-deps.js
.github/workflows/test.yaml Added steps to install Core Lightning on CI agents
Comments suppressed due to low confidence (3)

scripts/analyze-deps.js:1

  • This new script lacks automated tests to verify its functionality; consider adding unit or integration tests to ensure it behaves as expected across various lockfile histories.
#!/usr/bin/env node

package.json:57

  • [nitpick] The script name report:noisy is ambiguous; consider renaming it to something more descriptive like report:dep-updates to clarify its purpose.
    "report:noisy": "node scripts/analyze-deps.js | tee reports/noisy-deps.txt",

.github/workflows/test.yaml:64

  • Using pip3 install --user may install packages to ~/.local/bin, which might not be in the default PATH in CI; consider installing packages globally (omit --user) or updating the PATH explicitly.
          pip3 install --user \

}

async _waitForBitcoind (maxAttempts = 10, initialDelay = 2000) {
async _waitForBitcoind (maxAttempts = 32, initialDelay = 2000) {
Copy link

Copilot AI Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider extracting magic default values like 32 and 2000 into named constants or configuration options to improve readability and ease future adjustments.

Suggested change
async _waitForBitcoind (maxAttempts = 32, initialDelay = 2000) {
async _waitForBitcoind (maxAttempts = DEFAULT_MAX_ATTEMPTS, initialDelay = DEFAULT_INITIAL_DELAY_MS) {

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Jul 20, 2025

Codecov Report

Attention: Patch coverage is 80.10471% with 114 lines in your changes missing coverage. Please review.

Project coverage is 65.14%. Comparing base (647203e) to head (7373d95).
Report is 113 commits behind head on feature/v0.1.0-RC1.

Files with missing lines Patch % Lines
services/lightning.js 82.80% 76 Missing ⚠️
services/bitcoin.js 70.40% 37 Missing ⚠️
types/message.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/v0.1.0-RC1     #161      +/-   ##
======================================================
+ Coverage               60.47%   65.14%   +4.67%     
======================================================
  Files                      65       64       -1     
  Lines                   15731    17093    +1362     
  Branches                    0        1       +1     
======================================================
+ Hits                     9514    11136    +1622     
+ Misses                   6217     5957     -260     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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