Commit ab152e9
refactor: address PR #1398 KP13 review (9 items)
- entity_not_verified detection via warnings-substring scan
(#1297-popped flag was dead — VERDICT=VALIDATED could leak silently)
- sample-count invariant: len(samples) + not_verified == N_SAMPLES
- rename "p99" -> "worst" (at N=10 the percentile collapses to max;
the threshold-check name now reflects what it measures)
- per-test try/finally cleanup: cleanup_tracker is a logging-only no-op,
so 10 automations were leaking into the next worker run
- caplog.at_level context manager (set_level mutated worker-wide level
and leaked DEBUG-on-rest_client into every later test)
- 6 comment subtractions per Boy-Scout
Boy-Scout fold per #1389 measurement (RETUNE NEEDED p50>=100ms):
- _POLL_CADENCE: (0.1, 1.0, 4.9) -> (0.025, 1.0, 4.975) — first-poll
pulled to a 5x cushion above the measured ~4ms HA-Core
entity-registration latency
- unit-test pins updated to the new cadence values
- test_proxy_http_request_headers_pass_through: add _wait_for_state
helper + guard for state="started" (HAOS E2E fail: Node-RED was in
"startup" when the strict status_code assertion ran)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 65e6d89 commit ab152e9
5 files changed
Lines changed: 229 additions & 155 deletions
File tree
- src/ha_mcp/client
- tests/src
- e2e
- haos_only
- workflows/automation
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | | - | |
930 | | - | |
931 | | - | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
932 | 935 | | |
933 | 936 | | |
934 | 937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 92 | + | |
| 93 | + | |
99 | 94 | | |
100 | 95 | | |
101 | 96 | | |
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
105 | 100 | | |
106 | | - | |
107 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
| |||
264 | 260 | | |
265 | 261 | | |
266 | 262 | | |
267 | | - | |
| 263 | + | |
| 264 | + | |
268 | 265 | | |
269 | 266 | | |
270 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
91 | 127 | | |
92 | 128 | | |
93 | 129 | | |
| |||
234 | 270 | | |
235 | 271 | | |
236 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
237 | 279 | | |
238 | 280 | | |
239 | 281 | | |
| |||
0 commit comments