Skip to content

feat(dbapi): log bounded session diagnostics after connection loss - #1

Closed
rbavery wants to merge 1 commit into
codex/wbc-1051-disconnectfrom
codex/wbc-1051-session-diagnostics
Closed

rbavery wants to merge 1 commit into
codex/wbc-1051-disconnectfrom
codex/wbc-1051-session-diagnostics

Conversation

@rbavery

@rbavery rbavery commented Sep 21, 2026

Copy link
Copy Markdown
Owner

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.

This is a stacked draft on codex/wbc-1051-disconnect, the head of upstream PR #74. Its diff contains only diagnostics. It is hosted in this fork because upstream branch creation is unavailable. After wherobots#74 merges, this commit can be proposed against upstream main. 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.

@rbavery

rbavery commented Sep 21, 2026

Copy link
Copy Markdown
Owner Author

Superseded by the upstream draft: wherobots#75. That PR depends on wherobots#74 in the upstream repository. Closing this duplicate; the source branch is retained for the upstream PR.

Co-authored with Codex.

@rbavery rbavery closed this Sep 21, 2026
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