Repository navigation
Conversation
9dcb76c to
b06248b
Compare
|
@gdluck i double check the firmware oracle and made a fix for the stale who16 please double check with the oracle and fix failing ci |
…p for OWNd OpenWebNet-HA#142) scripts/update_gateway_profiles.py carried a static `queried_whos` list per discovery row next to the derived one, and the oracle check compared the two, so an OWNd profile change (OWNd OpenWebNet-HA#142 drops WHO 16 from the F461 and the MyHomeServer1) turned the check and the docs test red until the list was edited by hand. The rows now come only from the installed OWNd profile over STARTUP_DISCOVERY_WHOS, the rule the startup gate in gateway.py applies, and the sound wording of a row follows `supports_who(16)`. Green against the pinned OWNd today; after OWNd OpenWebNet-HA#142 lands and the pin is bumped, `sync_documentation.py --update` regenerates the two rows and nothing else needs an edit. Tests pin both shapes with a profile double. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
b06248b to
09dd4b5
Compare
…tical with and without OWNd (CI follow-up)
The quality-scale, test-coverage and docs CI jobs run scripts/verify_ha_standards.py and
scripts/sync_documentation.py --check without OWNd installed ("[OWND] Client library
verification skipped (OWNd not in path: No module named 'OWNd')"). The first push derived
the startup discovery rows from the installed OWNd profile only and printed
"unknown (OWNd profile not available)" otherwise, so those jobs regenerated a table that
differed from the committed docs/getting-started/hardware-compatibility.md:
"[RULE_DOCS_ANTI_DRIFT] Gateway Discovery table out of sync".
Each discovery row now carries pinned_whos, the row the pinned OWNd 2.0.0b11 yields; it is
used only when OWNd is not importable, so the generated table is byte-identical with and
without OWNd. With OWNd importable the row is still derived from profile.supports_who over
STARTUP_DISCOVERY_WHOS, as the startup gate does, and notes_without_who16 applies whenever
the row does not carry WHO 16. verify_profiles_against_oracle() flags a row whose
profile_name resolves to the generic profile (get_gateway_profile() never returns None).
Tests: without OWNd every row carries exactly its pinned_whos and the generated block equals
the committed one; with OWNd the derived block equals the committed one (installed profile ==
committed table == pinned_whos); pinned_whos is ignored when OWNd is importable. Fail-before
on the first-push script: 3 of 18 fail; all pass after. sync_documentation.py --check passes
in a venv without OWNd and with OWNd master (f04d8aa) on PYTHONPATH. Against the OWNd OpenWebNet-HA#142
branch (95dc8a5) the two docs-equality tests report the drift that the pin bump resolves
with --update together with pinned_whos.
Oracle re-check at own-firmware-oracle main 72759e8 (results/mcp_index.json, schema 1.2.0,
529 inputs): F461 020011 and MyHomeServer1 028206 still answer nack/silent to all 86 WHO 16
inputs (*OpenWebNet-HA#16*0*5## sound-who16-source.tsv line 16, *OpenWebNet-HA#16*101*5## line 28), unchanged from
53f9514.
Refs OpenWebNet-HA/OWNd#142.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Checked with the refreshed oracle and fixed the CI (head 88ed3fa, rebased on the current base, still draft). CI cause and fix. The quality-scale, test-coverage and docs jobs run the docs check without OWNd installed; this PR's first push derived the discovery rows from the installed profile and, with no OWNd, printed "unknown" rows, so the regenerated table no longer matched Oracle re-check (main 72759e8, after #62). F461 020011 and MyHomeServer1 028206 still answer nack / silent to all 86 WHO 16 inputs (77 in Suite 4514 passed at 100 % coverage against the pinned OWNd; against the OWNd #142 branch the profile, conformance and trace-oracle tests pass (711) and only the docs-equality checks report the expected pin-bump drift, resolved by |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@gdluck please rebase |
Requested by A
Draft: the MyHOME companion of OpenWebNet-HA/OWNd#142 (
fix(profiles): drop WHO 16 from the F461 and MyHomeServer1 profiles). Sequencing: merge this → merge OpenWebNet-HA/OWNd#142 → OWNd release → bump the OWNd pin here, andscripts/sync_documentation.py --updateregenerates the two docs rows together with thepinned_whosfallback below (one edit inscripts/update_gateway_profiles.py).Review follow-up (CI red on the first push)
quality-scale,test-coverageanddocsjobs runscripts/verify_ha_standards.py/scripts/sync_documentation.py --checkwithout OWNd installed ([OWND] Client library verification skipped (OWNd not in path: No module named 'OWNd')in the same log). The first push removed the staticqueried_whosand printedunknown (OWNd profile not available)for every row when OWNd is not importable, so the regenerated table differed from the committed one:[RULE_DOCS_ANTI_DRIFT] Gateway Discovery table out of sync in docs/getting-started/hardware-compatibility.md. Locally the check had only been run with OWNd onPYTHONPATH.pinned_whos, the row the pinned OWNd (OWNd==2.0.0b11inmanifest.json) yields; it is used only when OWNd is not importable, so the generated table is byte-identical with and without OWNd. With OWNd importable the row is still derived from the installed profile. Reproduced and fixed locally:sync_documentation.py --checknow passes both in a venv without OWNd (pyyaml + ruff only, as in the CI jobs) and with OWNd master onPYTHONPATH;tests/test_gateway_profiles.py::test_discovery_table_without_ownd_matches_the_committed_docspins the fallback to the committed table and::test_discovery_table_with_ownd_matches_the_committed_docspins the derived table to it, soinstalled profile == committed table == pinned_whosis asserted explicitly.mainto72759e8, fix(oracle): write a past date in who13-clock so the DIM 1 verdict does not depend on the day own-firmware-oracle#61 and fix(results): refresh 7 stale sound-who22 TSVs and MCP index (#58) own-firmware-oracle#62): the WHO 16 verdicts for the F461 020011 and the MyHomeServer1 028206 are unchanged, see "What does the Firmware Oracle / Encyclopedia say" below.verify_profiles_against_oracle()now flags a discovery row whoseprofile_nameresolves to OWNd's generic profile (get_gateway_profile()never returnsNone, so the earlieris Nonecheck could not fire).What is the problem
scripts/update_gateway_profiles.pykeeps a staticqueried_whoslist per startup discovery row next to the list it derives from the installed OWNd profile, andverify_profiles_against_oracle()compares the two. The derived list is what the generateddocs/getting-started/hardware-compatibility.mdtable shows and what the runtime sends (the startup gate ingateway.pyasksprofile.supports_who(who)for every discovery WHO; #794 reads the same flag for the refused requests). When an OWNd profile changes, the static copy goes stale: with OpenWebNet-HA/OWNd#142 the F461 and MyHomeServer1 rows become[1, 2, 4, 18], the oracle check reportsDiscovery row **F461** queried_whos=[1, 2, 4, 16, 18] disagrees with F461 profile [1, 2, 4, 18],sync_documentation.py --checkfails andtests/test_gateway_profiles.pyasserts the old literal row. Hard-coding the new rows instead would be red against the pinned OWNd 2.0.0b11 today.Refs OpenWebNet-HA/OWNd#142; #794 (the runtime gate); #424 / #459 (the F461 / MyHomeServer1 plants that speak WHO 22 only, and the MyHomeServer1 "firmware discards 5, 16, 22" note). The combined test build (
combined/all-prs-2026-10-24, commit4a79e8cb) showed which files and tests are involved; its hard-coded rows are not used here.What is the solution
scripts/update_gateway_profiles.py:GATEWAY_DISCOVERY_METADATArows carrymodel,profile_name,pinned_whos(the no-OWNd fallback, see below) andnotes; noqueried_whos.discovery_whos_for(profile):[w for w in STARTUP_DISCOVERY_WHOS if profile.supports_who(w)], the ruleMyHOMEGatewayHandler._profile_supports_whoapplies at startup;[]for anything withoutsupports_who.calibrate_discovery_with_ownd()fillsqueried_whosfrom the installed profile for every row; the F461 and MyHomeServer1 rows carry anotes_without_who16text that replacesnoteswhen the row does not carry WHO 16 ("Sound is WHO 22 only (nobt_difson; every WHO 16 frame refused)"), so the wording follows the profile too.quality-scale,test-coverageanddocsCI jobs) every row falls back topinned_whos, the row the pinned OWNd 2.0.0b11 yields, so the generated table is the same either way; nothing else is guessed. At a pin bump that changes a profile,pinned_whosis edited together withsync_documentation.py --update(the tests below fail until both are done).verify_profiles_against_oracle()no longer compares a static list with the profile; it checks that every discovery row names a real OWNd profile (not the generic fallback), and the per-gatewaysupports_who/audio_measured/auth_measuredchecks againstfirmware_oracle.jsonare unchanged.tests/test_gateway_profiles.py: the F461 and MyHomeServer1 cells are asserted against the installed profile (right before and after fix(profiles): drop WHO 16 from the F461 and MyHomeServer1 profiles OWNd#142), the other rows stay literal;discovery_whos_formirrors the runtime gate for six profiles; a profile double without WHO 16 yields[1, 2, 4, 18]and the WHO 22 wording for both rows while the F454 row is unchanged; without OWNd every row carries exactly itspinned_whosand the generated block equals the committed one; with OWNd the derived block equals the committed one;pinned_whosis ignored when OWNd is importable.docs/getting-started/hardware-compatibility.md: unchanged in this PR (against the pinned OWNd the generated table is byte-identical). After the pin bump the F461 and MyHomeServer1 rows regenerate toWHO 1, 2, 4, 18with the WHO 22 note..github/release-notes/2.0.0b16.md: one line under "Other changes".Not changed here, named as follow-ups: the per-zone
*#16*ZONE*5##media-player poll (media_player.py) on a gateway whose profile lacks WHO 16 (one refused frame per configured WHO 16 zone; those entities cannot work on these gateways anyway, and the planned WHO 22 backend is the right gate); and the topology side effect of OpenWebNet-HA/OWNd#142 itself (topology.pydelegation: an F461 primary lets a WHO-16-capable follower own WHO 16 and 22, and a same-tier F454 / F461 pair is now ordered by WHO count rather than by MAC), which is OpenWebNet-HA/OWNd#142's to document and which this PR does not alter.Companion PR: OpenWebNet-HA/OWNd#142 (
fix(profiles): drop WHO 16 from the F461 and MyHomeServer1 profiles, draft). MyHOME #794 is the runtime half (startup requests gated onprofile.supports_who, with a MyHOME fallback table until the OWNd release).State Diagram
stateDiagram-v2 direction LR state "Is OWNd importable" as Check state "Installed OWNd profile" as Profile { [*] --> Pinned : 2.0.0b11 - F461 and MyHomeServer1 supported_who includes 16 [*] --> AfterPinBump : OWNd release with 142 - no 16 } state "Discovery row - docs table, same rule as the startup gate" as Row { Pinned --> Row16 : discovery_whos_for gives 1 2 4 16 18 - notes sound unmeasured class default AfterPinBump --> Row18 : discovery_whos_for gives 1 2 4 18 - notes_without_who16 Sound is WHO 22 only } state "No OWNd - quality-scale, test-coverage and docs CI jobs" as Fallback { [*] --> PinnedRows : pinned_whos per row - the pinned OWNd rows, edited at the pin bump with update PinnedRows --> Row16 : today, identical to the committed table } [*] --> Check Check --> Profile : yes Check --> Fallback : noHardware Verification
*#16*0*5##in 5 ms and*#16*101*5##in 6 ms (run1_oracle_replay_readonly, steporacle_who16, all 18 WHO 16 request forms refused in under 10 ms); the physical MyHomeServer1 3.87.13 NACKs both in 3 ms (run2_reads_thermo_sound_alarm_lights, stepread_who16); the upstreamtests/fixtures/traces/issue_466MyHomeServer1 fixture records the same NACK on*#16*0*5##.*#16*0*5##at startup on the F461 (Skipping WHO=16 discovery: not supported by F461 profile.), the zone and humidity requests were present; other models not tested. This PR's own effect (the regenerated docs row) is not a bus event.How is it tested
tests/test_gateway_profiles.py::test_generate_gateway_discovery_table_and_verify_oracle(updated),::test_discovery_whos_follow_the_runtime_gate,::test_discovery_row_drops_who16_when_the_profile_does,::test_discovery_table_without_ownd_uses_the_pinned_rows,::test_discovery_table_without_ownd_matches_the_committed_docs,::test_discovery_table_with_ownd_matches_the_committed_docs,::test_pinned_rows_are_ignored_when_ownd_is_importable(new); 18 tests in the file.discovery_whos_for, rows hard-code their WHOs); on the first-push script (CI red) 3 fail: the table test (rows carry nopinned_whos), the no-OWNd rows test and the no-OWNd-equals-committed-docs test (unknown (OWNd profile not available)cells). All 18 pass after.scripts/sync_documentation.py --checkandscripts/verify_ha_standards.py: pass without OWNd (a venv with pyyaml + ruff only, the CI jobs' shape; before the fix:Gateway Discovery table out of sync) and with OWNd master (f04d8aa) onPYTHONPATH.master(f04d8aa, the behaviour of the 2.0.0b11 pin), rebased onv2-phase1-architecture31ea9fd: 4514 passed, 1 skipped (first push on ddc6d60: 4421 passed, 1 skipped);scripts/verify_ownd_coverage.py100 % (16,080 / 16,080 statements, 0 missing).gdluck/OWNdfix/profiles-f461-mhs1-no-who16,95dc8a5) onPYTHONPATH:tests/test_gateway_profiles.py+tests/test_firmware_oracle_conformance.py+tests/test_trace_oracle_validation.py+tests/test_golden_conformance.py: 711 passed, 1 skipped before the two docs-equality tests were added;verify_profiles_against_oracle()returns no violation, and the generator yields| **F461** | WHO 1, 2, 4, 18 | Lighting, cover, climate, and energy meter 51 queries. Sound is WHO 22 only (nobt_difson; every WHO 16 frame refused), alarm query omitted. |and the same for the MyHomeServer1. As intended,sync_documentation.py --check,::test_discovery_table_with_ownd_matches_the_committed_docsandtests/test_sync_documentation.py::test_check_all_documentation_real_treethen report the docs drift that the pin bump resolves (--update+pinned_whos).scripts/typing_ratchet.py0 errors (baseline 0),ruff check .,scripts/verify_ha_standards.py,scripts/manage_translations.py checkpass.pypi_standards.ymlinstalls OWNd from git (OWND_REF, the branch named like the MyHOME branch, elsemaster), so once fix(profiles): drop WHO 16 from the F461 and MyHomeServer1 profiles OWNd#142 is on OWNdmasterthat job reports the same docs drift onv2-phase1-architectureuntil the pin bump lands; this was already the case before this PR (the generator derived the rows from the installed profile when importable).Live retest (2026-10-24)
Not exercised live: docs generator and tests only, no bus effect of its own (the gate it documents was confirmed for this startup configuration, above).
Where are the traces
tests/fixtures/traces/f461_live_2026-10-23/runrun1_oracle_replay_readonlysteporacle_who16;tests/fixtures/traces/myhomeserver1_live_2026-10-24/runrun2_reads_thermo_sound_alarm_lightsstepread_who16(trace PR: #799, merged); upstreamtests/fixtures/traces/issue_466/*#16*0*5##NACK 5 ms / 3 ms,*#16*101*5##NACK 6 ms / 3 ms (note: who16_refused_locally)What does the Firmware Oracle / Encyclopedia say
Re-checked against the refreshed
results/mcp_index.jsonat own-firmware-oraclemain72759e8 (schema 1.2.0, 529 inputs; after OpenWebNet-HA/own-firmware-oracle#61 and OpenWebNet-HA/own-firmware-oracle#62): the F461 020011 and the MyHomeServer1 028206 answernack/silentto all 86 WHO 16 inputs (77 insound-who16-source, 9 intrace-corpus),*#16*0*5##atsound-who16-source.tsvline 16 and*#16*101*5##at line 28 on both, no bus frame, no emitted frame; identical to the 53f9514 rows mirrored intests/golden/firmware_oracle.json(schema 1.1.0, 509 inputs). The refresh added the 20who13-clockinputs and foursound-who22rows per gateway and changed nine MH202lights-area0/interface-routing/trace-corpusreplies (nack→ack); nothing about WHO 16 changed. The golden mirror is left as is: it is refreshed by hand in its own commit together withtests/test_firmware_oracle_conformance.py(which pinsschema_versionto 1.0.0 / 1.1.0) andtests/test_trace_oracle_validation.py(which cites 53f9514), not something this PR should fold in.Published rows (
results/<P>/<V>/oracle/full/sound-who16-source.tsv, index 53f9514 and 72759e8 alike),*#16*0*5##:nack/silenton F450 020010, F459 020105, F460 020012, F461 020011, MH202 010024, MyHomeServer1 028206;ack/out(bus24 30 34 42 35 30 30 38 30 38 46 0d) on F453 010100, F453AV 030014, F454 020051, H4684 020054, MH200 020102, MH200N 010108. OpenWebNet-HA/OWNd#142 drops WHO 16 from the F461 and MyHomeServer1 profiles on the strength of all 86 WHO 16 inputs being refused there; it keeps the MH202 (a live MH202 relays WHO 16 state frames from an F441M matrix, MyHOME #669), so the generated MH202 row does not change either. This PR adds no verdict of its own:verify_profiles_against_oracle()keeps checkingaudio_measuredagainst this row andsupports_whoagainst the WHO 1 / 2 / 3 / 4 / 25 probe rows, unchanged.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).pytest,ruff, andscripts/verify_ha_standards.pypass.🤖 Generated with Claude Code