Skip to content

itest: add chancloser aux output regression coverage#2091

Draft
darioAnongba wants to merge 2 commits into
mainfrom
test/chancloser-aux-outputs
Draft

itest: add chancloser aux output regression coverage#2091
darioAnongba wants to merge 2 commits into
mainfrom
test/chancloser-aux-outputs

Conversation

@darioAnongba
Copy link
Copy Markdown
Contributor

@darioAnongba darioAnongba commented Apr 22, 2026

  • added a custom-channels integration test that reproduces the coop-close fee baseline bug for asset channels with auxiliary close outputs
  • added a low-fee coop-close test helper so the test can explicitly close at relay floor
  • narrowed the assertion to the behavior this regression cares about: the cooperative close completes and includes the expected auxiliary output

Why

lnd PR #10615 fixes coop-close fee baseline calculation for channels whose final close transaction includes auxiliary outputs. Before that fix, the initial taproot/custom-channel close offer could be underpriced, causing the responder to reject it with unable to process close msg: insufficient fee.

This PR adds taproot-assets itest coverage for that exact path so we can verify the upstream fix end to end.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request adds a deterministic regression test to the custom-channels integration suite. The purpose is to validate the fix for a cooperative close fee baseline bug that occurred when channels included auxiliary outputs. By simulating a close at the relay fee floor, the test confirms that the fee estimation logic correctly accounts for these outputs, ensuring successful channel closure.

Highlights

  • Regression Test Added: Introduced a new integration test case to verify cooperative close fee estimation for channels with auxiliary outputs.
  • New Test Helper: Added a helper function to facilitate closing asset channels at specific fee rates, enabling testing at the relay floor.
  • Validation: The test ensures that cooperative closes succeed even when auxiliary outputs are present, preventing previous underpricing issues.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a regression test for cooperative close fee estimation when auxiliary outputs are present, ensuring that closing at the relay floor remains successful. It also adds helper functions closeAssetChannelWithFeeAndAssert and waitForClosePendingUpdate to facilitate testing channel closures with specific fee rates. Feedback suggests replacing the magic number 1000 with a named constant for better maintainability and improving the reliability of channel closure operations by using a longer timeout and applying it to the CloseChannel RPC call.

Comment thread itest/custom_channels/fee_test.go
Comment thread itest/custom_channels/helpers.go
@darioAnongba darioAnongba changed the title [codex] itest: add chancloser aux output regression coverage itest: add chancloser aux output regression coverage Apr 22, 2026
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 24788235266

Coverage decreased (-0.005%) to 34.364%

Details

  • Coverage decreased (-0.005%) from the base build.
  • Patch coverage: 91 uncovered changes across 1 file (0 of 91 lines covered, 0.0%).
  • 28 coverage regressions across 5 files.

Uncovered Changes

File Changed Covered %
itest/custom_channels/helpers.go 91 0 0.0%

Coverage Regressions

28 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
authmailbox/server.go 9 76.39%
tapgarden/caretaker.go 8 68.08%
tapchannel/aux_leaf_signer.go 5 43.18%
tapdb/universe.go 4 76.99%
asset/group_key.go 2 62.64%

Coverage Stats

Coverage Status
Relevant Lines: 100263
Covered Lines: 34454
Line Coverage: 34.36%
Coverage Strength: 0.37 hits per line

💛 - Coveralls

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

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

2 participants