Skip to content

Drop legacy JSON protocol support - #7

Open
puddly wants to merge 1 commit into
devfrom
puddly/drop-legacy-json-protocol
Open

puddly wants to merge 1 commit into
devfrom
puddly/drop-legacy-json-protocol

Conversation

@puddly

@puddly puddly commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

#3 brought support for Ziggurat's binary protocol while adding a transparent shim to support the provisional JSON format. It's been a few releases and I think anybody using Ziggurat would have updated their Ziggurat addon a few times by now. It's time we remove the backwards compat.

Copilot AI lite review requested due to automatic review settings September 17, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The only remaining finding is a non-blocking test-coverage nit.

Pull request overview

Removes legacy JSON WebSocket protocol support, leaving binary protocol transport only.

Changes:

  • Removes legacy transport models and tests.
  • Removes the mashumaro dependency and lockfile entries.
  • Updates transport tests for binary frames and handler errors.

Review note: Add coverage rejecting the former JSON text hello; this is a non-blocking nit.

File summaries
File Description
zigpy_ziggurat/zigbee/transport.py Restricts transport to binary frames.
zigpy_ziggurat/zigbee/legacy.py Removes legacy JSON models.
uv.lock Updates locked dependencies.
tests/test_transport.py Updates binary transport coverage.
tests/test_legacy.py Removes obsolete legacy tests.
pyproject.toml Removes mashumaro.
Review details

Suppressed comments (1)

zigpy_ziggurat/zigbee/transport.py:180

  • The legacy-removal behavior is not covered by the updated transport tests: they only exercise a binary hello and a closing handshake. Please add a server/test case that sends the former JSON text hello and asserts connect_transport() rejects it, so the compatibility boundary is protected against accidental reintroduction or incorrect handshake handling.
    if hello.type != aiohttp.WSMsgType.BINARY:
  • Files reviewed: 5/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c92f735) to head (dabb663).

Additional details and impacted files
@@            Coverage Diff             @@
##               dev        #7    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            7         6     -1     
  Lines         1681      1185   -496     
==========================================
- Hits          1681      1185   -496     

☔ View full report in Codecov by Harness.
📢 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.

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