Commit 90bba12
debug: A/B-diag log for SHC privacy_mode write-lock race
The SHC fetcher in shc.py overwrites _shc_state_cache.privacy_mode without
honoring the _privacy_set_at write-lock that __init__.py:1690 respects.
Suspected cause of the "privacy flips back ON after user-toggle OFF" bug
(second OFF-toggle works on retry).
Pure debug-only patch — no behavior change. When debug logging is enabled
on the integration, logs an "AB-DIAG privacy_mode race" line whenever the
fetcher would have flipped a privacy state that was within the active
write-lock window. Lets us confirm the hypothesis before applying the
actual FORCE-RULE fix.
Behavior is unchanged: entry["privacy_mode"] = new_priv is still written.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 21650da commit 90bba12
1 file changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
226 | 245 | | |
227 | 246 | | |
228 | 247 | | |
| |||
0 commit comments