You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(coverage/logctx): drive logctx to ≥95% (was 87.1%)
Adds tests for the uncovered branches in common/logctx:
- WithGroup on the wrapper handler (was 0% — entire function uncovered)
now exercised via TestHandler_WithGroupPreservesService, which also
asserts that service + commit_id continue to be injected on records
emitted through a grouped child handler.
- The `if ctx == nil` guards in WithTraceID / WithTID / WithTeamID
(each 66.7% — only the happy path was hit) covered by
TestKeys_WithSettersAcceptNilCtx, which passes an explicitly nil
context to each setter and round-trips through the matching getter.
Result: logctx coverage 87.1% → 100.0%.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments