🐛 fix: harden stream parsing (native booleans, malformed frames) #196
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/stream-parsing-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two parsing-hardening fixes in the stream generator:
Evidence
_try_bool(_streaming.py:65-70) matched only the strings"true"/"false";measure["value"]/payload["gatewayUid"]raised a bareKeyErrorthat killed the reconnect loop (#178, #179).After: TDD — 3 failing tests written first (native bool, missing gatewayUid frame, malformed measure among valid ones), then the fix.
pytest -q→ 246 passed (+4),mypy→ clean.Merge Danger
Door: two-way
Blast Radius: low — malformed/boolean measures previously crashed the stream (or silently lost the flag); well-formed string frames behave identically (regression test included).
Closes #178. Closes #179.
WIP: 🐛 fix: harden stream parsing (native booleans, malformed frames)to 🐛 fix: harden stream parsing (native booleans, malformed frames)