Follow-up from PR #914 review (@cbeach47).
components/lif/mdr_auth/workspace_cookie.py currently dedupes cookie-decode-failure INFO logs by maintaining a bounded set (_LOGGED_DECODE_FAILURES) and bulk-clearing it when it hits 256 entries. This is a crude eviction that works for the common case but has a sharp edge: if a process sees 256 distinct bad cookies quickly, the next batch re-logs them all when the set clears.
A TTL-based eviction (e.g., evict entries older than N minutes) would smooth this out and avoid the burst re-log behavior, while still capping memory.
Not critical — the bulk-clear path is correct, just suboptimal. Worth picking up next time we touch this file.
Follow-up from PR #914 review (@cbeach47).
components/lif/mdr_auth/workspace_cookie.pycurrently dedupes cookie-decode-failure INFO logs by maintaining a bounded set (_LOGGED_DECODE_FAILURES) and bulk-clearing it when it hits 256 entries. This is a crude eviction that works for the common case but has a sharp edge: if a process sees 256 distinct bad cookies quickly, the next batch re-logs them all when the set clears.A TTL-based eviction (e.g., evict entries older than N minutes) would smooth this out and avoid the burst re-log behavior, while still capping memory.
Not critical — the bulk-clear path is correct, just suboptimal. Worth picking up next time we touch this file.