Skip to content

Sync changes from internal dev branch.#84

Merged
kaishi05 merged 17 commits intomainfrom
copybara_HEAD
Mar 25, 2026
Merged

Sync changes from internal dev branch.#84
kaishi05 merged 17 commits intomainfrom
copybara_HEAD

Conversation

@lip-liu
Copy link
Copy Markdown
Collaborator

@lip-liu lip-liu commented Mar 25, 2026

No description provided.

Google and others added 3 commits March 25, 2026 01:19
PiperOrigin-RevId: 879233823
PiperOrigin-RevId: 879700946
PiperOrigin-RevId: 881057993
@gemini-code-assist
Copy link
Copy Markdown
Contributor

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 enhances the Wi-Fi environment validation process by transitioning from counting SSIDs to counting BSSIDs. This change provides a more precise and unique identifier for wireless access points, leading to a more accurate assessment of the test environment's cleanliness. The modifications ensure that Wi-Fi scan results consistently include BSSID information and that all related checks and reporting mechanisms leverage this improved metric.

Highlights

  • Refactored Wi-Fi Environment Threshold: The constant MAX_SSID_THRESHOLD was renamed to _CLEAN_WIFI_ENV_CHECK_BSSID_THRESHOLD and its value adjusted from 10 to 5, to more accurately reflect its purpose in checking Wi-Fi environment cleanliness based on BSSIDs.
  • BSSID Inclusion in Wi-Fi Scan Results: The _parse_wifi_scan function was modified to extract and include the BSSID (Basic Service Set Identifier) in the Wi-Fi scan results, providing more granular network identification.
  • Updated Wi-Fi Environment Check Logic: The check_wifi_env function was updated to count BSSIDs instead of SSIDs for environment checks and to store this count in a device-specific information dictionary, device_specific_info['wifi_env_bssid_count'], for better data management.
  • Consistent Wi-Fi AP Number Reporting: The gen_basic_test_summary function was updated to retrieve the Wi-Fi Access Point number from the new device_specific_info['wifi_env_bssid_count'], ensuring consistency with the refined Wi-Fi environment checks.

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

lip-liu added 10 commits March 25, 2026 01:19
PiperOrigin-RevId: 881605491
PiperOrigin-RevId: 882066915
PiperOrigin-RevId: 882174457
PiperOrigin-RevId: 883154882
PiperOrigin-RevId: 883207368
PiperOrigin-RevId: 883333904
PiperOrigin-RevId: 883346864
PiperOrigin-RevId: 884570001
PiperOrigin-RevId: 885670011
PiperOrigin-RevId: 885927851
Copy link
Copy Markdown
Contributor

@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 Wi-Fi environment check to count BSSIDs instead of SSIDs, updating relevant constants, parsing logic, and how the count is stored and reported in the test summary. A review comment points out that the current implementation for reporting the BSSID count in the test summary will not include a count of zero, which is meaningful information, and suggests modifying the conditional check to ensure zero counts are also reported.

Comment on lines 893 to +894
try:
current_gms_info = nc_constants.GmsInfo()
current_gms_info = constants.GmsInfo()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The current conditional if wifi_env_bssid_count := ... will evaluate to False if wifi_env_bssid_count is 0. This means the 'wifi_ap_number' key will not be included in the summary when no BSSIDs are detected. A count of 0 is meaningful information and should likely be reported.

To ensure the count is always reported when available (including 0), you should explicitly check if the value is not None. This will align with the previous behavior of reporting the count even when it is zero.

Suggested change
try:
current_gms_info = nc_constants.GmsInfo()
current_gms_info = constants.GmsInfo()
if (wifi_env_bssid_count := device_specific_info.get('wifi_env_bssid_count')) is not None:
basic_test_summary['wifi_ap_number'] = f'{wifi_env_bssid_count}'

kaishi and others added 4 commits March 25, 2026 01:21
PiperOrigin-RevId: 887112662
PiperOrigin-RevId: 888834441
PiperOrigin-RevId: 888919028
PiperOrigin-RevId: 888919551
@kaishi05 kaishi05 merged commit 291ac74 into main Mar 25, 2026
2 checks passed
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