Task · OPN-0073

Make startup and shutdown self-log loss observable

Description

The exporter self-log handler silently overwrites the oldest of its 256 pre-bind records, and submit can snapshot the live enqueue callback immediately before Unbind then push after the pipeline queue closes. Both paths lose an OTLP copy while the wrapped stderr record remains, with no bounded loss reason.

Acceptance Criteria

Definition of Done

Implementation Plan

Add failing overflow and interleaving regressions; emit a bounded direct diagnostic when the pre-bind ring evicts; track in-flight submit callbacks so Unbind waits for callbacks that already acquired enqueue before returning.

Implementation Notes

Implemented at 2389ac3b. Both the 257th-record overflow and submit/Unbind interleaving regressions failed before the fix and pass after it; final just check passed.

Final Summary

Fixed at 2389ac3b. Startup self-log overflow emits one direct bounded diagnostic, and Unbind waits for callbacks admitted before shutdown. Barrier-controlled regressions and final just check passed.

View the source file on GitHub