Files
synapse/tests/util
Erik JohnstonandClaude Fable 5 9b9a00178c Add characterization tests for logcontext error messages and the filter
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
2026-07-17 11:14:06 +00:00
..
2023-11-21 15:29:58 -05:00