Repository navigation
chore(scripts): align discovery doc check across OWNd==2.0.0b11 WHO 16 transition - #831
Merged
GreenGrassBlueOcean merged 1 commit intoOct 29, 2026
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
GreenGrassBlueOcean
deleted the
chore/sync-docs-pinned-ownd-discovery-window
branch
October 29, 2026 19:07
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the problem
In
OpenWebNet-HA/OWNd#142(fix(profiles): drop WHO 16 from the F461 and MyHomeServer1 profiles), 7 of 8 CI jobs pass and 5,072 of 5,073 tests inMyHOME conformance / MyHOME test suitepass, leaving a single failure:tests/test_sync_documentation.py::test_check_all_documentation_real_tree—Gateway Discovery table out of sync in docs/getting-started/hardware-compatibility.md.OpenWebNet-HA/MyHOME#808addedpinned_whos+notes_without_who16inscripts/update_gateway_profiles.py,tolerated = {16}inverify_profiles_against_oracle(), androws_off_the_pintolerance intests/test_gateway_profiles.py::test_discovery_table_with_ownd_matches_the_committed_docsspecifically to bridge the transition window between the pinnedOWNd==2.0.0b11release andOWNd#142. However,scripts/sync_documentation.py::get_gateway_discovery_block()still callsbuild_discovery_block()unconditionally using the installedOWNdinstead ofpinned_whos.Furthermore, merging
OWNd#142toOWNd@masterbeforeOWNd 2.0.0b12is released and pinned inmanifest.jsonwould otherwise trigger a CI catch-22 acrossMyHOME:pypi_standards.yml,test-coverage.yaml(viatests/conftest.py), and all 3 matrix legs ofha-upstream-compat.ymlinstallOWNd@master(expecting no WHO 16 onF461/MyHomeServer1), whiletest-coverage.yaml(sync_documentation.py --check),quality-scale.yml, anddocs.ymlrunsync_documentation.py --checkwithoutOWNdinstalled (checkinghardware-compatibility.mdagainstpinned_whos, which still includes WHO 16 forOWNd==2.0.0b11).Unblocks
OpenWebNet-HA/OWNd#142(comment6477040171).What is the solution
scripts/update_gateway_profiles.py):PRE_WHO16_OWND_PIN = "OWNd==2.0.0b11"andmanifest_pins_pre_who16_ownd(manifest_path=MANIFEST_JSON) -> bool.*, use_pinned: bool = Falsetocalibrate_discovery_with_ownd(),generate_gateway_discovery_table(), andbuild_discovery_block()so callers that validate the committed docs can pin table generation topinned_whoswhilemanifest.jsonstill pinsOWNd==2.0.0b11, without changing default unit-test behavior (use_pinned=False).tolerated = {16}inverify_profiles_against_oracle(oracle_path=ORACLE_JSON, manifest_path=MANIFEST_JSON)tomanifest_pins_pre_who16_ownd(manifest_path)so that oncemanifest.jsonbumps pastOWNd==2.0.0b11, stalepinned_whos/sweep_omitsentries onF461andMyHomeServer1are immediately flagged.sync_documentation.pyacross with-OWNdand no-OWNdCI jobs (scripts/sync_documentation.py):manifest_path=CUSTOM_COMPONENTS_DIR / "manifest.json"intoverify_profiles_against_oracle().get_gateway_discovery_block()callbuild_discovery_block(use_pinned=manifest_pins_pre_who16_ownd(manifest_path)), keeping CI jobs withOWNd@masterand CI jobs withoutOWNdaligned on the committedOWNd==2.0.0b11table until the pin bump, and automatically enforcing regeneration (--update+pinned_whos/sweep_omitsupdate) as soon asmanifest.jsonmoves toOWNd==2.0.0b12.tests/test_gateway_profiles.py,tests/test_sync_documentation.py):rows_off_the_pinintest_discovery_table_with_ownd_matches_the_committed_docsonmanifest_pins_pre_who16_ownd().OWNd==2.0.0b11and after bumpingmanifest.jsontoOWNd==2.0.0b12).State Diagram
flowchart TD Check["sync_documentation.py --check / pytest"] --> PinGate{"manifest.json pins OWNd==2.0.0b11?"} PinGate -- "Yes (Transition Window)" --> UsePinned["build_discovery_block(use_pinned=True)"] PinGate -- "Yes (Transition Window)" --> Tolerate["verify_profiles_against_oracle: tolerate WHO 16 delta on F461 / MyHomeServer1"] UsePinned --> Agree["OWNd@master jobs & no-OWNd jobs agree on committed hardware-compatibility.md"] Tolerate --> Agree PinGate -- "No (Bumped >= OWNd==2.0.0b12)" --> LiveProfile["build_discovery_block(use_pinned=False)"] PinGate -- "No (Bumped >= OWNd==2.0.0b12)" --> StrictOracle["verify_profiles_against_oracle: zero WHO 16 tolerance"] LiveProfile --> Enforce["Enforces regenerating hardware-compatibility.md + updating pinned_whos & sweep_omits"] StrictOracle --> EnforceHardware Verification
custom_components/myhome/is untouched.How is it tested
tests/test_gateway_profiles.py::test_calibrate_discovery_use_pinned_overrides_installed_ownd:build_discovery_block(use_pinned=True)matchesdocs/getting-started/hardware-compatibility.mdbyte-for-byte even whenF461andMyHomeServer1dropWHO = 16, whilebuild_discovery_block(use_pinned=False)reflects the updated profile rows.tests/test_gateway_profiles.py::test_oracle_check_enforces_who16_pin_once_manifest_bumps_past_2_0_0b11:manifest_pins_pre_who16_ownd()edge cases (missing file, malformed JSON, bumped pin) and confirmsverify_profiles_against_oracle()tolerates theWHO = 16delta underOWNd==2.0.0b11, flags bothF461andMyHomeServer1immediately upon bumping toOWNd==2.0.0b12, and clears oncepinned_whosandsweep_omitsare updated.tests/test_sync_documentation.py::test_check_all_documentation_stays_green_against_ownd_142_until_pin_bump:check_all_documentation(update=False)passes on the real repository tree againstOWNd#142profiles whilemanifest.jsonpinsOWNd==2.0.0b11, and that bothsync_gateway_discovery(update=False)andsync_gateway_profiles(update=False)fail with actionable drift errors as soon asmanifest.jsonbumps toOWNd==2.0.0b12.Python 3.14.7) against bothOWNd 2.0.0b11andOpenWebNet-HA/OWNd#142(2210296):ruff check custom_components tests scripts: passed (0violations).scripts/verify_ha_standards.py: passed (all checks green).scripts/sync_documentation.py --check: passed (0drift).pytest tests/test_gateway_profiles.py tests/test_sync_documentation.py tests/test_startup_requests_per_firmware.py:129 passed.Where are the traces
tests/golden/firmware_oracle.json.What does the Firmware Oracle / Encyclopedia say
WHO = 16vsWHO = 22):WHO = 16covers legacy 2-wire sound diffusion (F441/F441Mmatrix & amplifiers, status probe*#16*0*5##), whereasF461andMyHomeServer1(bt_multion emulated firmware028206) route NuVo /WHO = 22sound only.*#16*0*5##):NACK *#*0##/SILENTbus drop):F461(020011, SHA1ecabc82832a) andMyHomeServer1(028206, SHA5d511f9f848f).ACK *#*1##/OUT24 30 34 42 35 30 30 38 30 38 46 0d):F453(020025),F453AV(010220),F454(020055),H4684(060024),MH200(010019), andMH200N(020112).Checklist
What is the problem,What is the solution,State Diagram,How is it tested,Where are the traces,What does the Firmware Oracle / Encyclopedia say).handle_event()and do not manually subscribe viaasync_dispatcher_connect.pytest,ruff, andscripts/verify_ha_standards.pypass.