honcho/docs/v2/contributing
Vineeth Voruganti 07c79e20e3 fix(db): lazy retrying session + review fixes for connection backoff
Address Codex/CodeRabbit review on PR #758.

- Replace eager checkout with HonchoAsyncSession: a lazy AsyncSession that
  checks out its connection (with retry) on the first DB-touching call, not at
  construction. Request handlers doing non-DB work (embedding/file/LLM) before
  their first query no longer pin a connection across it, while the API path
  still gets checkout retry. Only the checkout is retried — the statement runs
  once via super(), so writes are never duplicated. Tracing's set_config moves
  into the same lazy acquire hook.
- Roll the session back on a retryable checkout failure before retrying, so a
  failed autobegin can't leave it pending-rollback.
- Lower default POOL_TIMEOUT to 5s and validate it stays under the retry budget
  for pooled (non-null) POOL_CLASS; update config.toml.example and v2/v3 docs.
- Clamp pool overflow gauge to >= 0 (was negative before the pool fills).
- Remove double-sleep in the deriver idle poll (true backoff cap, not 2x);
  make in-flight instrumentation registration idempotent.
- Tests: HonchoAsyncSession lazy/idempotent acquire, statement-runs-once,
  tracing, commit/rollback flag reset, get_db no-acquire-at-entry, polling-loop
  single-sleep, and the POOL_TIMEOUT/retry-budget validator.
2026-06-01 01:12:35 -04:00
..
configuration.mdx fix(db): lazy retrying session + review fixes for connection backoff 2026-06-01 01:12:35 -04:00
guidelines.mdx feat: retry on more httpx exceptions (#467) 2026-04-03 12:20:53 -04:00
license.mdx Add Pre-commit Hooks (#165) 2025-07-22 15:17:53 -04:00
self-hosting.mdx Self-hosting docs overhaul: single-provider default, restructured config guide (#510) 2026-04-07 22:49:57 -04:00