Skip to content

Conversation

@ziggie1984
Copy link
Collaborator

Due to the signaling period expiring tests had to be adopted bc
they were not taking the activation time period into account.

@gemini-code-assist
Copy link

Summary of Changes

Hello @ziggie1984, 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 resolves an issue in the experimental endorsement integration tests where they did not properly consider the feature's activation time period. By implementing a mechanism to check if the experimental endorsement window is still active, the tests and related utility functions now dynamically adjust their behavior, ensuring correct operation and preventing erroneous signaling or validation once the experimental period has expired.

Highlights

  • Conditional Endorsement Logic: The integration tests for experimental endorsement now correctly account for the feature's activation time period, ensuring that endorsement signaling and validation only occur when the experiment is active.
  • New Utility Function: A new utility function, ExperimentalEndorsementActive(), has been introduced to determine if the experimental endorsement window is currently open.
  • Test Adaptation: The testEndorsement function has been updated to utilize the new ExperimentalEndorsementActive() utility, preventing endorsement checks from being performed once the experimental period has concluded.
  • Custom Record Handling: The CustomRecordsWithUnendorsed function was modified to prevent the addition of unendorsed signals to custom records if the experimental endorsement period has ended.

🧠 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@ziggie1984 ziggie1984 requested a review from carlaKC January 5, 2026 12:52
@ziggie1984 ziggie1984 self-assigned this Jan 5, 2026
@ziggie1984
Copy link
Collaborator Author

This is a quick fix, maybe we should think of removing those time based endorsement tests completely ?

Copy link

@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 addresses failing integration tests for the endorsement feature by making them aware of the feature's activation period. The changes correctly adapt the test logic to only expect endorsement signals when the feature is active. The implementation is sound, and I have a couple of suggestions to enhance code clarity and simplify some of the new logic.

@ziggie1984 ziggie1984 force-pushed the fix-endorsement-testcases branch from 04122e3 to b6df199 Compare January 5, 2026 12:54
@ziggie1984 ziggie1984 marked this pull request as ready for review January 5, 2026 12:54
@ziggie1984 ziggie1984 force-pushed the fix-endorsement-testcases branch from b6df199 to abd8086 Compare January 5, 2026 12:56
@ziggie1984 ziggie1984 requested a review from hieblmi January 5, 2026 12:57
Due to the signaling period expiring tests had to be adopted bc
they were not taking the activation time period into account.
@ziggie1984 ziggie1984 force-pushed the fix-endorsement-testcases branch from abd8086 to 5f30797 Compare January 5, 2026 13:28
Copy link
Collaborator

@bitromortac bitromortac left a comment

Choose a reason for hiding this comment

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

This is a quick fix, maybe we should think of removing those time based endorsement tests completely?

LGTM as a fix 🎉, but I agree that we could remove the tests (and code?) if the experiment was done.

Copy link
Collaborator

@hieblmi hieblmi left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes, besides nits this LGTM!

t := uint64(lnwire.ExperimentalEndorsementType)
sendReq.FirstHopCustomRecords = map[uint64][]byte{
t: expectedValue,
var expectedValue []byte
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: could do a var-block

t: expectedValue,
}
} else {
expectedValue = []byte{lnwire.ExperimentalUnendorsed}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can remove this else if we initialize expectedValue with []byte{lnwire.ExperimentalUnendorsed}.

@ziggie1984 ziggie1984 merged commit 801de79 into lightningnetwork:master Jan 5, 2026
40 of 41 checks passed
@ziggie1984 ziggie1984 deleted the fix-endorsement-testcases branch January 5, 2026 15:58
@ziggie1984 ziggie1984 added the backport-v0.20.x-branch This label is used to trigger the creation of a backport PR to the branch `v0.20.x-branch`. label Jan 5, 2026
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Successfully created backport PR for v0.20.x-branch:

@github-project-automation github-project-automation bot moved this to Done in lnd v0.20 Jan 5, 2026
@ziggie1984 ziggie1984 added this to the v0.20.1 milestone Jan 5, 2026
ziggie1984 added a commit that referenced this pull request Jan 5, 2026
…20.x-branch

[v0.20.x-branch] Backport #10476: itest: fix endorsement itests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v0.20.x-branch This label is used to trigger the creation of a backport PR to the branch `v0.20.x-branch`. no-changelog

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants