Skip to content

fix(llm-helper): a server-side statement_timeout on the audit store's pool; pgweb restarted on failure - #62

Merged
acn-ericlaw merged 3 commits into
mainfrom
fix/audit-statement-timeout
Nov 17, 2026
Merged

acn-ericlaw merged 3 commits into
mainfrom
fix/audit-statement-timeout

Conversation

@acn-ericlaw

Copy link
Copy Markdown
Collaborator

What

  • _postgres_audit_store passes options=-c statement_timeout=<llm.transcript.audit.postgres.timeout.ms> to the pool, beside connect_timeout and the pool's wait; the test of the connection keys pins the option (the configured and the default case). README row; CHANGELOG Unreleased Changed.
  • dev/postgres-up.sh runs pgweb with --restart on-failure.
  • Gates: ruff clean, basedpyright 0 errors, pytest green.

Why

The live drive of the transcript audit store (mercury-composable docs/test-reports/transcript-audit-live-drive.md, 2026-11-17) showed a stopped PostgreSQL failing a write by type within the connection timeout, as designed, and the sweep repairing the record afterwards - but a paused one, a TCP black hole, holding the pooled connection's statement, and with it the audit function's mailbox, for the outage's length. The statement now times out on the server after the same timeout.ms, so a stalled database behaves like a stopped one: a logged failure, repaired by the sweep. pgweb exited when its database was stopped under it and did not come back after the restart; the up-script restarts it. In lockstep with the Node pack.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com

acn-ericlaw and others added 3 commits November 17, 2026 17:27
… pool, and pgweb restarted on failure

The live drive of the transcript audit store showed a paused PostgreSQL holding the pooled connection's
statement, and with it the audit function's mailbox, for the outage's length, while a stopped one failed
within the connection timeout as designed; the statement now times out on the server after the same
timeout.ms. The development browser did not outlive its database's restart; the up-script restarts it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…as PR #62

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…low-up PR #62)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@acn-ericlaw
acn-ericlaw merged commit c60a43b into main Nov 17, 2026
5 checks passed
@acn-ericlaw
acn-ericlaw deleted the fix/audit-statement-timeout branch November 17, 2026 09:33
acn-ericlaw added a commit that referenced this pull request Nov 17, 2026
…FC-0012 thread closed, the fact's -D note corrected

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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