Pin the Python-observable behaviour of the logcontext machinery ahead of
porting it to Rust:
- LogContextErrorMessageTestCase pins the exact logcontext_error message
wording, argument order and the conditions that trigger each abuse
warning. These are load-bearing: tests and downstream log scraping match
on them. Messages interpolating a context via %r embed the object's
repr (id/address), so expected strings are reconstructed from the same
live objects rather than hard-coded.
- LoggingContextFilterTestCase pins LoggingContextFilter — the entire
observable surface for logging: record attributes are filled from a real
logcontext, and (crucially for 3rd-party code) under the sentinel only
absent attributes get defaults.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JFbRtswu7rsHrttJFauUUb