Pin down behaviour that later refactors (notably porting the switch machinery
to Rust) must preserve but which the suite didn't yet cover:
- the exact `logcontext_error` message shapes and the conditions that trigger
them: wrong previous context on enter; lost/mismatched context on exit and
in PreserveLoggingContext; start/stop on the wrong thread; re-starting a
finished or already-active context; stop without a recorded start.
- LoggingContextFilter: fills record attributes from a real logcontext, and
under the sentinel only sets defaults for attributes not already present
(the `safe_set` no-clobber contract that 3rd-party log records rely on).
These strings are load-bearing for downstream log scraping, so we assert them
verbatim (reconstructing `%r` interpolations from the same live objects rather
than hard-coding addresses).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LnJSXQ86AAWNtihR4C5PH