Skip to content

Conversation

@CoMPaTech
Copy link
Owner

@CoMPaTech CoMPaTech commented Aug 22, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility with Prism and LiteBeam devices on firmware 8.7.8 by allowing antenna gain and DFS/NOL-related values to be optional, preventing errors when absent.
  • Documentation
    • Updated changelog with entry for version 0.4.3 (2025-08-22).
  • Chores
    • Bumped version to 0.4.3.

@coderabbitai
Copy link

coderabbitai bot commented Aug 22, 2025

Walkthrough

Fields antenna_gain and nol_* in airos/data.py are changed from required ints to optional (int | None). Project version bumped to 0.4.3 in pyproject.toml. CHANGELOG.md updated with entry for 2025-08-22 noting these changes. No exported/public API signatures beyond field optionality adjustments.

Changes

Cohort / File(s) Summary
Data schema updates
airos/data.py
Made Remote.antenna_gain, Wireless.antenna_gain, Wireless.nol_state, and Wireless.nol_timeout optional (`int
Release/versioning
pyproject.toml
Bumped version from 0.4.2 to 0.4.3.
Changelog
CHANGELOG.md
Added entry for 0.4.3 (2025-08-22) noting optionality of antenna_gain and nol_* fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears at version three,
Optional gains set data free.
NOLs can nap—None’s okay,
Prism, LiteBeam hop away.
I stamp a paw: 0.4.3!
Changelog carrots, tea for me.
(_/) ✅ data fits neatly.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch antenna_and_nol_optional

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.36%. Comparing base (4f55c35) to head (f1e8746).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #77   +/-   ##
=======================================
  Coverage   91.36%   91.36%           
=======================================
  Files           4        4           
  Lines         730      730           
=======================================
  Hits          667      667           
  Misses         63       63           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
CHANGELOG.md (1)

5-10: Changelog entry is clear and tied to actual code changes.

The “Changed” note concisely communicates the optionality of antenna_gain and nol_*; date is explicit (2025-08-22). LGTM.

If you maintain compare links, consider adding a reference link for [0.4.3] at the bottom for easier diff navigation.

airos/data.py (2)

385-385: Make antenna_gain optional in Remote: correct and consistent.

Setting antenna_gain: int | None = None matches the stated device behavior and avoids deserialization failures on Prism/LiteBeam firmwares. LGTM.

The trailing comment contains uncertainty (“6.3.5?”). Consider clarifying to keep comments authoritative.

Apply this small comment tweak:

-    antenna_gain: int | None = None  # Reported on Prism 6.3.5? and LiteBeam 8.7.8
+    antenna_gain: int | None = None  # Observed on Prism (FW 6.3.5) and LiteBeam (FW 8.7.8)

387-391: Docstring mismatch in Remote.pre_deserialize.

Minor copy/paste issue: the docstring says “Wireless” while the method belongs to Remote. Quick fix below.

-    def __pre_deserialize__(cls, d: dict[str, Any]) -> dict[str, Any]:
-        """Pre-deserialize hook for Wireless."""
+    def __pre_deserialize__(cls, d: dict[str, Any]) -> dict[str, Any]:
+        """Pre-deserialize hook for Remote."""
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4f55c35 and f1e8746.

📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • airos/data.py (2 hunks)
  • pyproject.toml (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
airos/data.py (2)
airos/airos8.py (1)
  • AirOS (32-349)
tests/test_airos8.py (1)
  • test_status_missing_required_key_in_json (251-282)
🔇 Additional comments (2)
pyproject.toml (1)

7-7: Confirm version bump is consistent and ready for release

✓ pyproject.toml (line 7): version = "0.4.3"
✓ CHANGELOG.md (line 5): ## [0.4.3] – 2025-08-22
✓ No stray __version__ constants found outside build/dist directories

All references align with the 0.4.3 release.

airos/data.py (1)

482-485: Wireless optional fields scan complete—no unsafe usages found.

Making nol_state, nol_timeout, and antenna_gain optional is appropriate and consistent with the rest of the model. I ran a grep for any direct attribute accesses (e.g. x.nol_state, x.nol_timeout, x.antenna_gain) and found none, so there are no consumers that assume these are always non-None. LGTM.

• Optional follow-up: add a unit test to ensure that when those keys are omitted or null in input data, the corresponding attributes deserialize to None (as in the example test in the original comment).

@CoMPaTech CoMPaTech merged commit 3c683b4 into main Aug 22, 2025
14 checks passed
@CoMPaTech CoMPaTech deleted the antenna_and_nol_optional branch August 22, 2025 13:34
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