Files
QuoteForge/bible-local
Mikhail ChusavitinandClaude Opus 5.5 44a09d4420 fix(sync): stop MariaDB connection leak and cut per-cycle sync waste
- ConnectionManager reuses a stale-but-healthy pool instead of dialing a new
  one every 30s, and closes every pool it replaces (one client held ~30
  connections). Pool capped at 2 connections, idle released after 1 min.
- Background sync every 1 min with ±30% jitter, scheduled from cycle start;
  users-status online threshold = interval × 1.3. One heartbeat per cycle.
- Partnumber books: read headers only, fetch partnumbers_json per book when
  new/incomplete; empty book counts as complete; an incomplete book is
  re-pulled once per process (server book lists BOT_AGIBOT_G2_PERF missing
  from qt_partnumber_book_items).
- NeedSync in one UNION ALL query; SyncQtSettings skips unchanged rewrite.
- Migration 035: server-maintained server_updated_at on qt_configurations and
  qt_projects. Clients pull only changed rows after one full pull per process;
  servers without 035 and old clients keep full pulls.
- Migrator: fresh GORM statement per verify query and history insert; files
  with two verify checks failed to record.

ADL: bible-local/decisions/2026-10-26-mariadb-single-pool.md,
bible-local/decisions/2026-10-26-incremental-config-project-pull.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:46:59 +03:00
..

QuoteForge Bible

Project-specific architecture and operational contracts.

Files

File Scope
01-overview.md Product scope, runtime model, repository map
02-architecture.md Local-first rules, sync, pricing, versioning
03-database.md SQLite and MariaDB data model, permissions, migrations
04-api.md HTTP routes and API contract
05-config.md Runtime config, paths, env vars, startup behavior
06-backup.md Backup contract and restore workflow
07-dev.md Development commands and guardrails
09-vendor-spec.md Vendor BOM and CFXML import contract
10-agent-api-guide.md End-to-end API guide for agents pricing servers from a TZ
11-lot-suggestions.md lot_suggestion column in qt_vendor_partnumber_seen — write/read contract for manual UI mappings
issue-plan-2026-10-26.md Open issue plan, implementation status and validation
decisions/ Architectural decision log, one file per decision

Rules

  • bible-local/ is the source of truth for QuoteForge-specific behavior.
  • Keep these files in English.
  • Update the matching file in the same commit as any architectural change.
  • Remove stale documentation instead of preserving history in place.

Quick reference

  • Local DB path: see 05-config.md
  • Runtime bind: loopback only
  • Local backups: see 06-backup.md
  • Release notes: releases/<version>/RELEASE_NOTES.md