Skip to content

fix(trace): record transport-flake retries in the session trace - #173

Merged
justrach merged 1 commit into
mainfrom
fix/flake-retry-tracer
Jul 12, 2026
Merged

justrach merged 1 commit into
mainfrom
fix/flake-retry-tracer

Conversation

@justrach

Copy link
Copy Markdown
Owner

What

One breadcrumb: the transport-flake retry branch (HttpConnectionClosing, resets, truncated TLS reads) now leaves the same {ev:"retry", detail:<error>} note in harness.trace.jsonl that the 429/5xx branch already leaves.

Why

A flaky provider was invisible in the session trace — the retries printed to the screen but left no trace record, so post-hoc diagnosis of a slow/flaky session couldn't see how many transport retries a turn ate.

Verification

Pointed graff at an accept-then-close socket: all 6 flake retries appear as {ev:retry, detail:HttpConnectionClosing} with backoff-spaced timestamps (41ms, 318ms, 851ms, 1.9s, 4.1s, 8.4s). zig build + zig build test clean.

The 429/5xx retry branch leaves a 'retry' trace note; the transport-flake
branch (HttpConnectionClosing, resets, truncated TLS reads) said so on
screen but wrote nothing to harness.trace.jsonl, so provider flakiness was
invisible when diagnosing a session after the fact. Leave the same
breadcrumb with the error name.

Verified against an accept-then-close socket: all 6 flake retries now show
as {ev:retry, detail:HttpConnectionClosing} with backoff-spaced timestamps.

Co-Authored-By: blackfloofie <265516171+blackfloofie@users.noreply.github.com>
@justrach
justrach merged commit 5b91feb into main Jul 12, 2026
6 checks passed
@justrach
justrach deleted the fix/flake-retry-tracer branch July 15, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant