Repository navigation
docs(traces): READMEs, docstrings and three assertions say what the fixtures hold (#799 / #810 / #815 follow-up) - #822
Merged
GreenGrassBlueOcean merged 1 commit intoOct 26, 2026
Conversation
…ixtures hold (OpenWebNet-HA#799, OpenWebNet-HA#810, OpenWebNet-HA#815 follow-up) Read against the fixture rows rather than the PR texts: - f461_live_2026-10-23 README: run 1 is 165 read-only requests in total (134 mirrored from the oracle suites plus 31 plant reads), not 165 plus 31; the setpoint write `*michnovka#4*2*OpenWebNet-HA#14*0235*3##` is followed by dimension 12 at once and no dimension 14 is pushed: the "dimension 14 catches up 0.3 s later" was the 12 -> 14 gap inside the reply to the probe's own `*michnovka#4*2##` 2.8 s later. test_setpoint_write_mode_3_restores_the_setpoint_in_force asserted only evt.index(12) < evt.index(14), which the poll reply order satisfies by itself; it now asserts that no dimension 14 follows the write before the next request, and its docstring matches. - test_replay_run4b_zone_2_through_the_climate_entity said "valve off" for a run without any dimension 19 / 20 frame and never asserted the commanded setpoint: the docstring drops the valve, the body asserts _target_temperature == 23.5. - myhomeserver1_live_2026-10-24 README: 33 zones report a temperature (zone 43 has an actuator but no dimension 0), 34 answer the actuator request; the all-zone actuator test's docstring counts the 43 frames its body asserts (44 only with the earlier zone 35 reply). - test_trace_oracle_validation note for `*michnovka#4*0*60##`: the MyHomeServer1 ACK came at 0.50 s with 8 replies; the 17th zone answered by 0.97 s. - test_replay_knob_turn_shows_dimension_12 (OpenWebNet-HA#810) claimed "dimension 14 changes nothing" on a run whose every dimension 14 frame carries the dimension 12 value, 18.0; the values cannot tell the two apart, so the test asserts the dimension 12 hold flag, which only a dimension 12 report sets, and says where the discriminating replay is (OpenWebNet-HA#812). - test_replay_action_sequence_matches_the_recorded_entity_states (OpenWebNet-HA#815) compared the replay and the record with two separate literals; it now compares the recorded actions with the replay's first changes and says the trailing idle was read back, not recorded. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
GreenGrassBlueOcean
approved these changes
Oct 26, 2026
GreenGrassBlueOcean
left a comment
Contributor
There was a problem hiding this comment.
@gdluck Confirmed — verified all 6 fixture readings, docstrings, and assertions directly against the trace rows (trace_payload["rows"] / frames):
f461_live_2026-10-23Run 1 & Run 3:165read-only requests in total (134oracle +31plant), and*#4*2*#14*0235*3##pushes Dim 12 immediately with no pushed Dim 14 before the next*#4*2##poll (not any(f.startswith("*#4*2*14*") ...)).f461_live_2026-10-23Run 4b: Carries no Dim 19/20 actuator frame and leaveszone2._target_temperature == 23.5.myhomeserver1_live_2026-10-24:33zones report Dim 0 temperature while34answer*#4*#0*20##(zone43has43#1only), and43actuator frames follow*#4*#0*20##(44across the run including the earlier*#4*35*20##reply).test_trace_oracle_validation.py(*#4*0*60##): ACK onMyHomeServer1at0.50 swith8replies on the command session and17zones by0.97 s.#810̯assertions:zone._local_target_reported is Truecleanly discriminates Dim 12 from Dim 14 when both equal18.0, and[a.value for a in changes[:len(recorded)]] == [s["hvac_action"] for s in recorded]ties the replay directly to the recorded states.
Merging now (followed by #820 and #817).
GreenGrassBlueOcean
merged commit Oct 26, 2026
661150b
into
OpenWebNet-HA:v2-phase1-architecture
16 checks passed
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.
Requested by A
Before: seven sentences in the trace READMEs and test docstrings of #799, #810 and #815 stated numbers or frames the fixtures do not hold (a request count double-counted, a dimension 14 "catching up 0.3 s later" that is never pushed, 34 zones for 33, 44 actuator frames for 43, "17 zones in 0.5 s" for 8), and three replay tests passed for the wrong reason.
After: every sentence states the fixture fact (each re-derived from the rows with jq before committing), and the three tests assert what their names say.
What is the problem
Docs / test-only follow-up on my trace PRs, found by an adversarial re-read after @GreenGrassBlueOcean's #140 review on OWNd. How it was found: each README sentence and docstring was read against the fixture rows and the question asked was "would this test still pass if the sentence were false?":
f461_live_2026-10-23/README.md:57: run 1 "165 requests mirrored from the oracle suites … plus 31 plant reads" (= 196); run 1 has 165 result rows in total (134 oracle + 31 plant reads).f461_live_2026-10-23/README.md:72andtest_f461_live_2026_10_23_trace.py:413: "*#4*2*#14*0235*3##ACKed in 78 ms, dimension 12 follows at once, dimension 14 catches up 0.3 s later": no dimension 14 follows the write; the only 14 of run 3 is in the reply to the probe's own*#4*2##2.8 s later, and the 0.3 s is the 12 → 14 gap inside that reply; the assertionevt.index(dim12) < evt.index(dim14)is satisfied by the poll order alone.myhomeserver1_live_2026-10-24/README.md:18: "34 zones report a temperature": 33 do (zone 43 has an actuator, no temperature); the PR's own test asserts 33; 34 is the actuator count.test_myhomeserver1_live_2026_10_24_trace.py:217: "ACKed with 44 actuator frames"; the body asserts 43 after that request (44 only with the earlier zone-35 reply).test_f461_live_2026_10_23_trace.py:631(run 4b): "23.5 in force and commanded, heating season, valve off": run 4b has no dimension 19 / 20 and the test asserted neither_target_temperaturenorhvac_action.test_trace_oracle_validation.py:166: "*#4*0*60##… ACK, 17 zones in 0.5 s": ACK at 0.499 s with 8 replies; the 17th zone at 0.97 s.test_f461_live_2026_10_24_trace.py:577(test(trace): ingest live F461 2.0.11 2026-10-24 climate setpoint capture (knob, antifreeze split, presets, bezel, HA write) #810 knob turn): "dimension 14 changes nothing", but every dimension 14 of run 1 carries 18.0 = the dimension 12 value, so the assertions cannot tell which dimension drove the display (a scratch replay with the fix(climate): show the setpoint in force (dimension 12), keep dimension 14 as the commanded value #791 hold disabled passed them).test_f461_actuators_live_2026_10_25_trace.py:529(test(trace): ingest the F461 and MyHomeServer1 captures of 2026-10-25 (actuator status, fan speed and humidity per zone) #815):test_replay_action_sequence_matches_the_recorded_entity_statescompared replay and record as two separate literals.@GreenGrassBlueOcean a quick confirmation is enough here; nothing in the fixtures changes.
What is the solution
5c7474d): "165 read-only requests: 134 mirrored … plus 31 plant reads"; "no dimension 14 is pushed; the next*#4*2##reads 14 = 23.5 (0.3 s after the dimension 12 of its own reply)"; "33 zones report a temperature (34 answer the actuator request)"; "43 actuator frames (44 in the run with the zone 35 reply)"; "ACK after 0.50 s with 8 replies; 17 zones by 0.97 s"; "valve off" dropped.not any(f.startswith("*#4*2*14*") for f in _evt_between(rows, RUN3, write)); run 4b asserts_target_temperature == 23.5; the knob-turn test asserts_target_temperature == 18.0and_local_target_reported is True(a flag only a dimension 12 report sets) and names test(trace): ingest the F461 2.0.11 heating comfort / eco preset capture (dimension 12 split from 14) #812's presets replay as the discriminating one; the test(trace): ingest the F461 and MyHomeServer1 captures of 2026-10-25 (actuator status, fan speed and humidity per zone) #815 test compares the recorded actions with the replay's first changes and says the trailing idle was read back, not recorded.State Diagram
N/A — docs / test-text change only.
Hardware Verification
custom_components/changes). The 2026-10-26 live reads on the F461 and the MyHomeServer1 reproduce the same per-zone dimension 12 / 13 / 14 shapes the fixtures hold.How is it tested
tests/test_f461_live_2026_10_23_trace.py(run 3 write, run 4b),tests/test_myhomeserver1_live_2026_10_24_trace.py,tests/test_trace_oracle_validation.py,tests/test_f461_live_2026_10_24_trace.py::test_replay_knob_turn_shows_dimension_12,tests/test_f461_actuators_live_2026_10_25_trace.py::test_replay_action_sequence_matches_the_recorded_entity_states.pytest tests -n 4 --cov=custom_components/myhome:4991 passed, 1 skipped,TOTAL 16810 0 100.0%;ruff check .clean;scripts/typing_ratchet.pymypy --strict: 0 error(s);scripts/verify_ha_standards.pySUCCESS;scripts/sync_documentation.py --checkSUCCESS;scripts/manage_translations.py checkno drift._local_target_reportedassertion on the knob-turn test (taken).Where are the traces
tests/fixtures/traces/f461_live_2026-10-23/,tests/fixtures/traces/f461_live_2026-10-24/,tests/fixtures/traces/myhomeserver1_live_2026-10-24/,tests/fixtures/traces/f461_actuators_live_2026-10-25/(unchanged).What does the Firmware Oracle / Encyclopedia say
🤖 Generated with Claude Code