Skip to content

Avoid Internet version checks when displaying local radio information - #996

Open
the8thbit wants to merge 1 commit into
meshtastic:masterfrom
the8thbit:fix/offline-info
Open

the8thbit wants to merge 1 commit into
meshtastic:masterfrom
the8thbit:fix/offline-info

Conversation

@the8thbit

@the8thbit the8thbit commented Oct 21, 2026 •

Copy link
Copy Markdown

The local --info command currently contacts PyPI after printing radio information. Off-grid users must wait for the request to fail before the command returns.

Remove that lookup from --info. Radio and node information still print and the connection still closes normally. The existing version check in --support remains available.

Fixes #826.

Validation:

  • Added serial and TCP CLI regressions that assert no HTTP request occurs while both information outputs and connection cleanup still run. Both tests fail on the baseline and pass with this change.
  • Full default pytest run with optional dependencies installed: 487 passed, 90 deselected (Python 3.12).
  • Whole-project mypy: success across 84 source files.
  • Pylint on meshtastic and examples, excluding generated protobuf files as in CI: 10.00/10.
  • Independent adversarial review and diff check passed.
  • No physical-radio test was performed. Hosted CI and the Python-version matrix still await maintainer workflow approval.

The contributor agreement check is satisfied. The earlier local type-check errors were resolved by installing missing optional dependencies and matching the relevant locked dependency versions; no additional source changes were needed.

Summary by CodeRabbit

  • Bug Fixes

    • The --info command no longer checks for newer versions online or displays upgrade notices.
    • Local node information can now be viewed without Internet access, including when connected over serial or TCP.
    • Radio and node details continue to display correctly, with connections closing cleanly and no unexpected error output.
  • Tests

    • Added coverage for offline --info usage across serial and TCP connections.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: meshtastic/python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 99b83d46-2574-4753-8f1b-18cf0e80a9d5
📥 Commits

Reviewing files that changed from the base of the PR and between 0a18357 and 8d09c7d.

📒 Files selected for processing: 2
  • meshtastic/__main__.py
  • meshtastic/tests/test_main.py
💤 Files with no reviewable changes: 1
  • meshtastic/main.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The local --info path no longer checks PyPI for a newer Meshtastic version or prints an upgrade notice. A parameterized test covers serial and TCP connections and verifies local information output, no HTTP request, and interface cleanup.

Changes: Local info behavior

Layer / File(s) Summary
Remove the version check and validate local info
meshtastic/__main__.py, meshtastic/tests/test_main.py
The local --info path no longer checks for a newer version. Tests cover serial and TCP connections, confirm no HTTP request is made, and verify information output and interface cleanup.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 8d09c

The change removes the Internet lookup from local --info while retaining information output and connection cleanup in the described test coverage. No issue requiring resolution before merge is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: removing Internet version checks from local radio information display.
Linked Issues check Passed Issue #826 requires --info to avoid the PyPI/Internet version lookup while preserving local radio and node information. The supplied PR summary states that the lookup and upgrade notice were removed…
Out of Scope Changes check Passed The reported changes are limited to removing the version lookup from the --info path and adding focused serial and TCP regression coverage. The tests directly support issue #826 by checking the HTTP…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
Full details: Linked Issues check

Explanation

Issue #826 requires --info to avoid the PyPI/Internet version lookup while preserving local radio and node information. The supplied PR summary states that the lookup and upgrade notice were removed from meshtastic/__main__.py. The added parameterized regression in meshtastic/tests/test_main.py covers serial and TCP paths, asserts no HTTP request, checks both information outputs, and checks connection cleanup. The existing --support version check remains available as required by the PR scope.

Full details: Out of Scope Changes check

Explanation

The reported changes are limited to removing the version lookup from the --info path and adding focused serial and TCP regression coverage. The tests directly support issue #826 by checking the HTTP request, information output, and connection cleanup behavior. No unrelated source or test changes are identified in the supplied evidence.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CLAassistant

CLAassistant commented Oct 21, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@the8thbit
the8thbit marked this pull request as ready for review October 21, 2026 08:41

This branch has not been deployed

No deployments
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.

Running "--info" command takes 16 seconds when there is no internet

2 participants