You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address Codex review on #18: all four findings were correct
**Entry title leaked the username (P1).** async_step_user names the entry
after the account, so the title *is* the username, and async_redact_data
only matches keys called username or password. "title" is now redacted
too.
My own test claimed to cover this and did not: the ConfigEntry double
defaulted to title="alice" while the test looked for
"alice@example.com", so the two never met. The double now models what
the config flow actually does.
**Free-form notes could reach a public issue (P1).** The sample bottle
denied three location fields and published everything else, including
prose someone wrote — tasting and cellar notes can say anything about
anyone. A denylist also has to be right about every column CellarTracker
adds in future.
The sample is now an allowlist of the fields the integration itself
reads or derives, which is what debugging it needs. Nothing is lost:
"columns" still lists every column name, and that is the signal schema
drift actually needs.
**Backoff could shorten a long schedule (P2).** The options schema sets
a minimum interval and no maximum, so a daily poll is configurable — and
capping at MAX_BACKOFF turned it into a six-hourly one while being rate
limited. Four times the requests, and the exact opposite of backing off,
in the method whose docstring promises never to poll sooner than
configured. The cap now bounds what the server can ask for, and the
configured interval is applied as the floor on top of it.
**The sync timestamp never reached its sensor (P2).** always_update=False
suppresses listener notification when a payload compares equal to the
previous one, and a cellar's inventory is identical between most polls.
The timestamp was held outside the payload, so it took part in no
comparison and the sensor would have shown the last time a *bottle*
changed while claiming to show the last successful sync — the feature
not working as described.
It is carried inside the payload now. That also means no two payloads
ever compare equal, so always_update=False could never suppress anything
and has been dropped rather than left as a flag that reads like it does
something.
9 tests added, 329 passing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LLPEGFSy3fLEuXNUPAPWR4
0 commit comments