Skip to content

docs: remove all reverse engineering references, clean documentation#65

Merged
markus-lassfolk merged 1 commit into
mainfrom
fix/remaining-issues
Mar 1, 2026
Merged

docs: remove all reverse engineering references, clean documentation#65
markus-lassfolk merged 1 commit into
mainfrom
fix/remaining-issues

Conversation

@markus-lassfolk

@markus-lassfolk markus-lassfolk commented Mar 1, 2026

Copy link
Copy Markdown
Owner

Summary

Removes all reverse engineering language from the entire repository and replaces with professional, community-project language.

Changes

  • Replace all RE language (reverse engineer, Blutter, Frida, MITM, APK references, packet capture) with neutral alternatives
  • Community-developed / community project language throughout
  • Protocol documentation references instead of yarbo-reversing repo links
  • Removed yarbo-reversing from Related Projects table; added home-assistant-yarbo
  • Updated disclaimer: community project, not affiliated with Yarbo
  • README rewritten to be professional and public-library quality
  • pyproject.toml: removed yarbo-reversing link from URLs

Verification

  • grep returns only legitimate 'Reverse DNS' networking references (not RE)
  • All 252 tests pass

Closes #7


Note

Medium Risk
Mostly documentation/link rewrites, but it also changes the local control surface by adding new MQTT commands (including shutdown/restart and safety-related toggles) and extending start_plan payloads, which could affect robot behavior if used incorrectly.

Overview
Rewords project/docs to remove reverse-engineering framing and instead describe a community-developed protocol effort, while updating references to point at in-repo docs/index.md and adjusting key guidance (README, SECURITY, CONTRIBUTING, module docstrings, pyproject.toml URLs, and examples/cloud_login.py).

Extends YarboLocalClient with additional MQTT command wrappers: start_plan now includes an optional percent field, and new methods add system/area/safety controls (shutdown, restart_container, read_clean_area, set_person_detect, set_ignore_obstacles).

Written by Cursor Bugbot for commit cd9840b. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings March 1, 2026 11:55
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@markus-lassfolk markus-lassfolk merged commit 7c0354d into main Mar 1, 2026
4 of 7 checks passed
@markus-lassfolk markus-lassfolk deleted the fix/remaining-issues branch March 1, 2026 11:55

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Comment thread src/yarbo/local.py
"""
await self._ensure_controller()
return await self._publish_and_wait("start_plan", {"planId": plan_id})
return await self._publish_and_wait("start_plan", {"planId": plan_id, "percent": percent})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

YarboClient.start_plan missing new percent parameter passthrough

High Severity

The start_plan method on YarboLocalClient gained a new percent parameter, but the YarboClient wrapper in client.py (line 211) still has the old signature start_plan(self, plan_id: str) and calls self._local.start_plan(plan_id) without forwarding percent. Since YarboClient is the primary entry point documented in the README, users of that class can never pass the percent parameter. The local client will always receive the default 100, which also silently changes the wire payload for all existing callers by adding a "percent": 100 field.

Fix in Cursor Fix in Web

Comment thread src/yarbo/local.py
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("ignore_obstacles", {"state": 1 if state else 0})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New methods missing from primary YarboClient wrapper

High Severity

Five new public methods — shutdown, restart_container, read_clean_area, set_person_detect, and set_ignore_obstacles — were added to YarboLocalClient but have no corresponding delegation wrappers in YarboClient (client.py). Since YarboClient is the documented primary entry point and every other YarboLocalClient method has a wrapper there, users of YarboClient cannot access any of these new features.

Fix in Cursor Fix in Web

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.

Pull request overview

This PR primarily updates repository documentation and in-code docstrings to remove reverse-engineering language and replace it with more neutral “community/project/protocol” terminology. It also includes a few functional additions to the local client API.

Changes:

  • Replace reverse-engineering references across docs/docstrings with community/protocol documentation language and update external links/URLs.
  • Update RSA key guidance in docs/examples and tweak related error/help text.
  • Extend YarboLocalClient with additional command wrappers and add a percent field to the start_plan payload.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/yarbo/mqtt.py Docstring wording and reference cleanup.
src/yarbo/local.py Docstring cleanup plus functional API changes (plan start payload + new command methods).
src/yarbo/keys/README.md Updated key acquisition wording; removed APK extraction steps.
src/yarbo/discovery.py Reference wording cleanup.
src/yarbo/const.py “Sources” wording cleanup in module docstring/comments.
src/yarbo/cloud_mqtt.py Reference wording cleanup.
src/yarbo/cloud.py Reference wording cleanup and constructor doc tweak.
src/yarbo/auth.py Reference wording cleanup and updated key-related messaging.
src/yarbo/_codec.py Reference wording cleanup.
src/yarbo/init.py Package description wording cleanup.
pyproject.toml Replace URL entry with “Protocol Documentation” link to in-repo docs.
examples/cloud_login.py Update key requirement/help text to point to keys README.
docs/index.md Remove external protocol-doc links; add repo/PSYarbo links.
README.md Rewrite/cleanup RE language; adjust related-project links and protocol docs pointer.
CONTRIBUTING.md Update language around protocol knowledge sources and links.
.github/SECURITY.md Minor wording tweak regarding the public RSA key.
Comments suppressed due to low confidence (1)

src/yarbo/auth.py:89

  • _default_key_path's warning/docstring references src/yarbo/keys/..., which is a repo-relative path and won't match an installed package layout. Consider updating the wording to refer to the package-relative path (yarbo/keys/rsa_public_key.pem) and keep src/... only as a contributor note if needed.
        .. warning::
            The vendored key at ``src/yarbo/keys/rsa_public_key.pem`` is a
            **placeholder** — cloud auth will fail until it is replaced with
            the real key (see keys/README.md for instructions).

            See ``src/yarbo/keys/README.md`` for extraction instructions, or
            supply the real key path via ``rsa_key_path`` at construction time.
        """

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/yarbo/auth.py
Comment on lines 181 to 184
raise YarboAuthError(
f"RSA public key not found at {self._key_path}. "
"Extract it from the Yarbo APK: assets/rsa_key/rsa_public_key.pem"
"Obtain the key and place it at: assets/rsa_key/rsa_public_key.pem"
) from exc

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

The FileNotFoundError message says "Obtain the key and place it at: assets/rsa_key/rsa_public_key.pem". assets/... is the location inside the Yarbo app package, not a path the library reads from; this is likely to confuse users. Suggest changing the message to (a) point at the expected PEM path (rsa_key_path or the vendored yarbo/keys/rsa_public_key.pem) and (b) reference keys/README.md for where to obtain it from the app.

Copilot uses AI. Check for mistakes.
Comment thread src/yarbo/local.py
Comment on lines +787 to +825
async def shutdown(self) -> YarboCommandResult:
"""Shut down the robot.

Returns:
:class:`~yarbo.models.YarboCommandResult` on success.

Raises:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("shutdown", {})

async def restart_container(self) -> YarboCommandResult:
"""Restart the software container on the robot.

Returns:
:class:`~yarbo.models.YarboCommandResult` on success.

Raises:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("restart_container", {})

# ------------------------------------------------------------------
# Area management
# ------------------------------------------------------------------

async def read_clean_area(self) -> YarboCommandResult:
"""Request the list of saved clean areas from the robot.

Returns:
:class:`~yarbo.models.YarboCommandResult` on success.

Raises:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("read_clean_area", {})

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

New shutdown, restart_container, and read_clean_area commands are added here but there are no corresponding tests verifying the publish command names/payloads (similar command wrappers in this module are covered in tests/test_local.py). Adding small unit tests would help prevent regressions in these high-impact actions.

Copilot uses AI. Check for mistakes.
Comment thread src/yarbo/local.py
Comment on lines +831 to +874
async def set_person_detect(self, enabled: bool) -> YarboCommandResult:
"""Enable or disable person detection.

Sends ``{"disable": not enabled}`` to the robot. Note the inversion:
the wire protocol uses a *disable* flag.

.. note::
Some firmware versions may additionally require a ``"key"`` field
in the payload. If detection toggling has no effect, consult the
firmware changelog and add the ``"key"`` field accordingly.

Args:
enabled: ``True`` to enable person detection, ``False`` to disable.

Returns:
:class:`~yarbo.models.YarboCommandResult` on success.

Raises:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("set_person_detect", {"disable": not enabled})

async def set_ignore_obstacles(self, state: bool) -> YarboCommandResult:
"""Enable or disable obstacle detection bypass.

.. warning::
**Safety hazard.** Disabling obstacle detection allows the robot
to continue moving even when obstacles are detected. Only use this
in controlled environments where you are certain there are no
people, animals, or objects in the robot's path.

Args:
state: ``True`` to ignore obstacles (bypass detection),
``False`` to restore normal obstacle detection.

Returns:
:class:`~yarbo.models.YarboCommandResult` on success.

Raises:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("ignore_obstacles", {"state": 1 if state else 0})

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

New safety-related methods set_person_detect and set_ignore_obstacles are introduced without test coverage. Please add unit tests that assert the exact payload shape (including the disable inversion and the 1/0 encoding) so behavior stays stable across refactors.

Copilot uses AI. Check for mistakes.
Comment thread README.md
- [Light control protocol](https://github.com/markus-lassfolk/yarbo-reversing/blob/main/docs/LIGHT_CTRL_PROTOCOL.md)
- [API endpoints](https://github.com/markus-lassfolk/yarbo-reversing/blob/main/docs/API_ENDPOINTS.md)
- [MQTT protocol reference](https://github.com/markus-lassfolk/yarbo-reversing/blob/main/docs/MQTT_PROTOCOL.md)
See [protocol documentation](docs/index.md) for additional protocol details.

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

The link text suggests docs/index.md contains protocol details, but docs/index.md currently only has general navigation/quick start and no protocol-specific references. Either add/restore protocol documentation links/content there, or adjust this sentence so it doesn't imply protocol docs exist at that location.

Suggested change
See [protocol documentation](docs/index.md) for additional protocol details.
See the [documentation](docs/index.md) for additional details and usage information.

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
Documentation = "https://github.com/markus-lassfolk/python-yarbo#readme"
Changelog = "https://github.com/markus-lassfolk/python-yarbo/blob/main/CHANGELOG.md"
"yarbo-reversing" = "https://github.com/markus-lassfolk/yarbo-reversing"
"Protocol Documentation" = "https://github.com/markus-lassfolk/python-yarbo/blob/main/docs/index.md"

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

[project.urls] adds a "Protocol Documentation" link pointing to docs/index.md, but that page doesn't currently contain protocol documentation (only general docs). Consider either pointing this URL at the actual protocol docs location (if any) or renaming/removing the entry to avoid misleading package metadata.

Suggested change
"Protocol Documentation" = "https://github.com/markus-lassfolk/python-yarbo/blob/main/docs/index.md"

Copilot uses AI. Check for mistakes.
Comment thread docs/index.md
- [PSYarbo PowerShell module](https://github.com/markus-lassfolk/PSYarbo)
- [CHANGELOG](../CHANGELOG.md)
- [CONTRIBUTING](../CONTRIBUTING.md)

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

docs/index.md removed the protocol-detail links (command catalogue, light control protocol, API endpoints), but other docs/metadata now refer to this page as "protocol documentation". Either reintroduce protocol-detail navigation here (possibly pointing to in-repo docs) or update those references so users don't lose the protocol entry point.

Suggested change
## Protocol documentation
This page is the entry point for the Yarbo protocol documentation. For low-level details about the MQTT and cloud protocols, see:
- [Command catalogue](protocol/command-catalogue.md)
- [Light control protocol](protocol/light-control.md)
- [Cloud API endpoints](protocol/cloud-api.md)

Copilot uses AI. Check for mistakes.
Comment thread src/yarbo/auth.py
Comment on lines +9 to 10
The RSA public key can be obtained from the Yarbo app and placed at:
``assets/rsa_key/rsa_public_key.pem``

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

The docstring says the RSA public key can be "placed at" assets/rsa_key/rsa_public_key.pem, which reads like a destination path. That path is inside the mobile app package; consider rewording to clarify it's the location within the app package (and point to src/yarbo/keys/README.md for how the library expects the PEM to be provided).

Suggested change
The RSA public key can be obtained from the Yarbo app and placed at:
``assets/rsa_key/rsa_public_key.pem``
The RSA public key can be obtained from the Yarbo mobile app; within the app
package it is stored at ``assets/rsa_key/rsa_public_key.pem``. See
``src/yarbo/keys/README.md`` for how this library expects the PEM to be
provided.

Copilot uses AI. Check for mistakes.
Comment thread src/yarbo/keys/README.md
Comment on lines +11 to 15
The actual public key can be obtained from the Yarbo app package and placed at:

```
assets/rsa_key/rsa_public_key.pem
```

### Extract from APK

```bash
# 1. Download the Yarbo APK (from Google Play via apkpure or your device)
# 2. Unzip it (APKs are ZIP archives)
unzip yarbo.apk -d yarbo_unpacked

# 3. Copy the key
cp yarbo_unpacked/assets/rsa_key/rsa_public_key.pem /path/to/python-yarbo/src/yarbo/keys/
src/yarbo/keys/rsa_public_key.pem
```

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

src/yarbo/keys/rsa_public_key.pem is a repo-relative path; for users installing from PyPI there is no src/ directory. Consider either (1) documenting the installed path (.../site-packages/yarbo/keys/rsa_public_key.pem) if you want to support vendoring, or (2) recommending the runtime rsa_key_path approach as the primary method and framing the vendoring path as "when working in the repository".

Copilot uses AI. Check for mistakes.
Comment thread src/yarbo/local.py
Comment on lines 435 to +448
@@ -448,7 +445,7 @@ async def start_plan(self, plan_id: str) -> YarboCommandResult:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("start_plan", {"planId": plan_id})
return await self._publish_and_wait("start_plan", {"planId": plan_id, "percent": percent})

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

start_plan gained a percent parameter but the docstring still documents only plan_id, and the new parameter isn't surfaced via YarboClient.start_plan(...) (it still takes only plan_id). Either document and plumb percent through the public client/CLI, or drop it here to keep the API consistent.

Copilot uses AI. Check for mistakes.
Comment thread src/yarbo/local.py
Comment on lines +783 to +810
# ------------------------------------------------------------------
# System control
# ------------------------------------------------------------------

async def shutdown(self) -> YarboCommandResult:
"""Shut down the robot.

Returns:
:class:`~yarbo.models.YarboCommandResult` on success.

Raises:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("shutdown", {})

async def restart_container(self) -> YarboCommandResult:
"""Restart the software container on the robot.

Returns:
:class:`~yarbo.models.YarboCommandResult` on success.

Raises:
YarboTimeoutError: If no acknowledgement is received.
"""
await self._ensure_controller()
return await self._publish_and_wait("restart_container", {})

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

PR title/description describe documentation-only changes, but this file also changes behavior/API (adds percent to start_plan and introduces multiple new command methods). Consider splitting the functional changes into a separate PR or at least updating the PR description/changelog to reflect the new public API surface.

Copilot uses AI. Check for mistakes.
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.

feat(client): expose serial_number property on YarboClient and YarboLocalClient

2 participants