Skip to content

Conversation

@EskoDijk
Copy link
Contributor

@EskoDijk EskoDijk commented Dec 8, 2025

Some OT CLI commands were missing as 'background' commands - this adds a few.
Also the list of background commands is more clear now with one command per line.

@gemini-code-assist
Copy link

Summary of Changes

Hello @EskoDijk, 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 refines how background CLI commands are identified and managed within the system. It introduces a more structured approach to defining these commands and expands the set of commands that are recognized as background operations, ensuring better command handling and system responsiveness.

Highlights

  • Improved Background Command Definition: The definition of CLI background commands has been refactored from a single regular expression into an explicit string slice, enhancing readability and maintainability.
  • Expanded Background Command List: Several new OpenThread CLI commands have been added to the list of recognized background commands, including various DNS, Link Metrics, Mesh Diagnostics, MLR, P2P, and SNTP commands.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/develop.yml
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.

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 refactors the definition of background CLI commands by moving them to a string slice, which greatly improves maintainability and readability. It also correctly expands the list of recognized background commands. This is a solid improvement. I have one suggestion to make the regular expression generation even more robust.

@EskoDijk EskoDijk force-pushed the pr-bg-commands branch 5 times, most recently from a5f4d83 to 96cb395 Compare December 10, 2025 20:50
@EskoDijk
Copy link
Contributor Author

@jwhui Just fixed and rebased this PR - should now be ready to review. This adds more OT CLI commands (that run in the 'background' producing results onto the CLI) to the set of working background commands.

@EskoDijk EskoDijk force-pushed the pr-bg-commands branch 2 times, most recently from aefe270 to 0b895ab Compare December 13, 2025 19:05
…round commands

Improves the detection of background OT CLI commands by checking command output of potential OT CLI
background commands for the 'Done' string at the end. If 'Done' is present, the command is marked
as a foreground (non-background) command at that point. This allows a simpler definition of the list
of (potential) background commands and fixes the issue that some commands may not work correctly
when used with the 'async' flag.

Also a unit test is added to exercise various background commands.
@EskoDijk
Copy link
Contributor Author

@jwhui Issue in the commits was fixed 4 days ago (there was a test commit unintentionally included). Now ready for approval or another review if needed.

@jwhui
Copy link
Member

jwhui commented Dec 19, 2025

/gemini review

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 refactors the definition of background CLI commands, making them clearer and easier to maintain by moving them into a string slice. It also expands the list of background commands. The logic for handling these commands is improved to correctly identify when a potential background command behaves like a foreground command by returning 'Done' immediately. New tests have been added to cover this new functionality.

I've found a couple of minor issues: one in the implementation of background command detection logic which could fail with certain output formats, and another in the test suite with an incorrect assertion. My review includes suggestions to fix these.

bug fix in final 'Done' string detection - now ignores any newlines or white space that may follow after the final 'Done' line.
bugfix in CLI regexp's; updated tests.
@EskoDijk
Copy link
Contributor Author

EskoDijk commented Jan 9, 2026

@jwhui Now updated based on the last Gemini review comments.

@EskoDijk
Copy link
Contributor Author

EskoDijk commented Jan 9, 2026

@jwhui We have 2 test failures on the compiled (webpack) Javascript result, but this PR doesn't change anything there!
This might be due to some change of support level for the webpack/JS/nodejs tools available on the web? E.g. our CI may request an old version of certain libraries and that version got auto-replaced by a newer one.
(Or someone's injected a malicious version of a JS library somewhere ... heard about such things)

In any case it shouldn't affect this PR I think.

@EskoDijk
Copy link
Contributor Author

... We have 2 test failures on the compiled (webpack) Javascript result, but this PR doesn't change anything there! This might be due to some change of support level for the webpack/JS/nodejs tools available on the web? ...

Now created issue #737 to record the details for this issue. Not related to the present PR.

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