Conversation
This was referenced Sep 21, 2026
rbavery
force-pushed
the
codex/wbc-1051-session-diagnostics
branch
from
September 21, 2026 21:40
0e2ec7f to
4576820
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What/Why
Follow-up for WBC-1051: after a SQL connection is lost, report the backend's observed session status and recorded first failure without delaying cursor errors or shutdown.
Depends on PR #74; merge that first. This draft targets upstream
main, so its current diff includes the prerequisite commits. The diagnostics-only change is commit 4576820. After #74 merges, rebase this branch onto upstream main if needed to remove the prerequisite commits from the diff. Deploy the companion session-status backend changes before enabling/releasing this follow-up.How
Deliver cursor failures first, then schedule a best-effort diagnostic log correlated by session ID. Diagnostic details do not modify already-delivered exceptions. Explicit close and direct connections without a status URL do not trigger lookups.
Share in-flight/recent requests by exact URL and a digest of the credential/header context. Limit each process to four daemon workers and 128 registry entries, retain completed attempts for 30 seconds, and add up to 500ms of worker-side jitter. No retries or waiting on the caller; stalled requests retain their worker slot and further optional requests are skipped at capacity.
Use a one-second HTTP socket timeout, disable redirects, stream at most 64KiB, and bound status and failure-message fields to 128 and 4096 characters. Log lookup and thread-start failures at DEBUG without request credentials or arbitrary exception text. Per-process sharing doesn't deduplicate across processes.
Co-authored with Codex.