From fbc72dfd9e42c02c435cbc0bbf503bfd7e9bd0d1 Mon Sep 17 00:00:00 2001 From: James Mackay Date: Sun, 11 Oct 2026 06:38:48 +0100 Subject: [PATCH] docs: correct two stale claims about a tier and a red proof (t44 0b/0c) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit media_player.py's module docstring still described the command path as "protocol key push → ADB keyevent → external androidtv_remote", calling the last tier "transitional; removed in Phase 4". t41 removed it, so the sentence documented a path that no longer exists; it now names the two real tiers. tests/test_module_coverage.py recorded the sweeps' red proof as the pre-t41 commit. That commit cannot prove either sweep: at c588a7c ``helpers.py`` still DEFINED ``discover_adb_host`` (line 45, and button.py imported it successfully), so there was no broken relative import to find — and that commit's ``ha_api_drift.py`` predates BOTH passes (no entity-contract check, no package-import check), so a real-HA run there is clean: verified just now, exit 0, "no Home-Assistant API drift (13 modules, 60 imports, 35 call arguments, 7 awaited HA calls)". The docstring now says the proof is built rather than borrowed, which is what the two red-proof tests actually do (a copy of the tree with the reference reverted). Verified: 362 passed / 2 skipped, ruff clean. --- custom_components/nvidia_shield/media_player.py | 5 +++-- tests/test_module_coverage.py | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/custom_components/nvidia_shield/media_player.py b/custom_components/nvidia_shield/media_player.py index ef59357..7f372ab 100644 --- a/custom_components/nvidia_shield/media_player.py +++ b/custom_components/nvidia_shield/media_player.py @@ -9,8 +9,9 @@ State architecture: - Power ladder: protocol is_on push → ADB wake (exact mWakefulness) → plug off - Playback state: Jellyfin (polling, slow 10-30s) or ADB media session - Metadata: Jellyfin attributes - - Commands: protocol key push → ADB keyevent → external androidtv_remote - (the last tier is transitional; removed in Phase 4) + - Commands: protocol key push → ADB keyevent. The external androidtv_remote + entity tier that used to back this is gone — t41 removed it with the entity, + so there is no third command path to keep in step. Intent tracking bridges the gap between instant commands and slow Jellyfin polling: 1. User presses pause → intent recorded → UI shows paused immediately diff --git a/tests/test_module_coverage.py b/tests/test_module_coverage.py index 8159a3a..c29c7fe 100644 --- a/tests/test_module_coverage.py +++ b/tests/test_module_coverage.py @@ -15,8 +15,14 @@ Two defects motivated this file, and both shipped with a green suite: layer up. ``ha_api_drift.scan_package_imports`` now resolves the package's own imports from the AST, with no Home Assistant and therefore no stub needed. -Each sweep carries its own red proof: a copy of the tree with the reverted -``discover_adb_host`` reference must fail it, or the check is decoration. +Each sweep carries its own red proof, and nothing about the pre-t41 tree supplies +it. At ``c588a7c`` ``helpers.py`` still DEFINED ``discover_adb_host``, so there was +no broken relative import to find; and that commit's engine predates BOTH passes +(its ``ha_api_drift.py`` has no entity-contract check and no package-import check +at all), so a real-HA run there is simply clean — exit 0, "no Home-Assistant API +drift (13 modules …)", no findings. The proof is therefore built, never borrowed: +a copy of the tree with the ``discover_adb_host`` reference actually reverted must +fail each sweep, or the check is decoration. """ import shutil