Skip to content

promote: hardware preflight to main#11

Merged
fjoelnr merged 3 commits intomainfrom
develop
Mar 22, 2026
Merged

promote: hardware preflight to main#11
fjoelnr merged 3 commits intomainfrom
develop

Conversation

@fjoelnr
Copy link
Copy Markdown
Owner

@fjoelnr fjoelnr commented Mar 22, 2026

Summary

  • add a hardware preflight checker for HiveTech
  • document the preflight path in README, operations, verification, and status docs
  • make the current blockers explicit before OTA upload

Verification

  • python scripts/hardware_smoke_check.py

@fjoelnr fjoelnr requested a review from ha-llm-bot as a code owner March 22, 2026 10:56
Copy link
Copy Markdown
Collaborator

@ha-llm-bot ha-llm-bot left a comment

Choose a reason for hiding this comment

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

Reviewed for develop to main promotion.

Copy link
Copy Markdown
Collaborator

@ha-llm-bot ha-llm-bot left a comment

Choose a reason for hiding this comment

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

Reviewed for develop to main promotion.

@fjoelnr fjoelnr merged commit 6e920a0 into main Mar 22, 2026
4 checks passed
@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 introduces a hardware preflight check to ensure proper configuration and connectivity before performing OTA uploads to HiveTech devices. It also updates documentation to reflect the new preflight process and clarifies current limitations.

Highlights

  • Hardware Preflight Check: Added a hardware preflight checker script (hardware_smoke_check.py) for HiveTech to validate configuration before OTA uploads.
  • Documentation Updates: Documented the preflight path in README.md, docs/operations.md, docs/verification.md, and docs/STATUS.md.
  • Explicit Blocker Identification: The script explicitly checks for missing or placeholder values in src/config.h, OTA target reachability, and MQTT broker availability.

🧠 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 useful hardware preflight check script and updates the documentation accordingly. The script is well-structured, but I've found a logic issue in how it validates the config.h file and checks for MQTT broker connectivity. The current implementation can lead to confusing or incomplete results if multiple configuration issues are present. I've suggested a refactoring to make these checks more robust and independent. The documentation changes are clear and accurate.

Comment on lines +82 to +96
else:
values = _read_config_values(config_path)
missing_keys = [key for key in ("ssid", "password", "mqtt_server") if key not in values]
if missing_keys:
results.append(CheckResult("config.h", False, f"missing keys: {', '.join(missing_keys)}"))
else:
placeholders = [key for key, value in values.items() if value in PLACEHOLDER_VALUES]
if placeholders:
results.append(CheckResult("config.h", False, f"placeholder values still set: {', '.join(placeholders)}"))
else:
results.append(CheckResult("config.h", True, "real local credentials/config detected"))

mqtt_host = values.get("mqtt_server", "")
if mqtt_host:
results.append(_check_host(mqtt_host, 1883))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The logic for checking config.h and the MQTT host can be improved. The current nested structure has a few issues:

  1. If some keys are missing from config.h (e.g., ssid), the check for MQTT host connectivity is skipped, even if mqtt_server is correctly defined. This can lead to incomplete diagnostics.
  2. If mqtt_server is set to a placeholder value, the script reports it as a placeholder but then still attempts a connection to that placeholder value, resulting in a redundant failure message.

I suggest refactoring this block to flatten the logic. This will ensure that all relevant checks are performed independently and that error messages are not duplicated.

Suggested change
else:
values = _read_config_values(config_path)
missing_keys = [key for key in ("ssid", "password", "mqtt_server") if key not in values]
if missing_keys:
results.append(CheckResult("config.h", False, f"missing keys: {', '.join(missing_keys)}"))
else:
placeholders = [key for key, value in values.items() if value in PLACEHOLDER_VALUES]
if placeholders:
results.append(CheckResult("config.h", False, f"placeholder values still set: {', '.join(placeholders)}"))
else:
results.append(CheckResult("config.h", True, "real local credentials/config detected"))
mqtt_host = values.get("mqtt_server", "")
if mqtt_host:
results.append(_check_host(mqtt_host, 1883))
else:
values = _read_config_values(config_path)
missing_keys = {key for key in ("ssid", "password", "mqtt_server") if key not in values}
placeholders = {key for key, value in values.items() if value in PLACEHOLDER_VALUES}
if missing_keys:
results.append(CheckResult("config.h", False, f"missing keys: {', '.join(sorted(missing_keys))}"))
elif placeholders:
results.append(CheckResult("config.h", False, f"placeholder values still set: {', '.join(sorted(placeholders))}"))
else:
results.append(CheckResult("config.h", True, "real local credentials/config detected"))
# Check MQTT host if it is defined and not a placeholder value.
mqtt_host = values.get("mqtt_server")
if mqtt_host and "mqtt_server" not in placeholders:
results.append(_check_host(mqtt_host, 1883))

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