mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-16 06:50:30 +00:00
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