Files
brent.edwards a0c6ecd3ad fix(di): get_container() permanently caches failed audit subscriber in Singleton provider
Introduced a module-level flag _audit_subscriber_initialized to track
whether audit_event_subscriber() has been successfully called.  When
get_container() is invoked and the flag is False, the subscriber
initialization is reattempted regardless of whether _container already
exists.  On success the flag is set to True so no further attempts
are made; on failure the warning is logged and the flag remains False
so the next get_container() call retries.

Previously, a failed audit subscriber init during the first
get_container() call was permanently cached: _container was set but
the subscriber was never retried.  In CLI mode this is masked because
each invocation is a new process, but in long-lived server processes
the audit subscriber would remain unregistered for the process
lifetime.

Also brings in the TDD regression test from issue #1096 (branch
tdd/m6-di-audit-cache-failure) with the @tdd_expected_fail tag
removed, converting it to a normal passing regression guard.  Added
an ASV benchmark measuring retry-path performance.

ISSUES CLOSED: #992

Reviewed-by: reviewer-pool-1
Closes #992

Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
2026-04-02 16:51:29 +00:00
..
2026-02-22 14:18:24 -05:00
2026-02-20 20:38:53 +00:00
2026-02-22 14:18:24 -05:00
2026-02-23 03:11:12 +00:00
2026-02-22 14:18:24 -05:00