Commit Graph

5 Commits

Author SHA1 Message Date
ZhenYi
0b5dc98ce5 refactor(db): simplify read-replica to single connection for CNPG
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
CNPG's cluster-ro service already handles load balancing and failover,
so the application-level Vec + random_range is redundant.

- db_read: Vec<DatabaseConnection> → Option<DatabaseConnection>
- database_read_replicas returns Option<String> instead of Vec<String>
- health checks now explicitly ping both writer() and reader()
- remove unused rand dependency from libs/db
2026-04-26 01:03:39 +08:00
ZhenYi
beae9bdea0 feat(observability): Phase 6 OTLP tracing for gRPC + config helper
- libs/rpc: slog → tracing; 8 gRPC methods instrumented with
  info_span + Instrument for W3C trace propagation
- libs/session_manager: slog → tracing dependency
- libs/config: add redis_url() singleton helper for adminrpc
2026-04-21 23:05:37 +08:00
ZhenYi
d09af7c326 feat(config): add storage configuration module 2026-04-20 15:44:54 +08:00
ZhenYi
1fed9fc8ab fix(git/hook): address review findings — fs blocking, redis timeout, backoff, slog
- sync/mod.rs: wrap scan_skills_from_dir in spawn_blocking to avoid
  blocking the async executor; use to_path_buf() to get owned PathBuf
- pool/worker.rs: replace 500ms poll sleep with cancellation-is_cancelled
  check (eliminates artificial latency); add exponential backoff on Redis
  errors (1s base, 32s cap, reset on success)
- pool/redis.rs: add 5s timeout on pool.get() for all three methods
  (next, ack_raw, nak_with_retry) to prevent indefinite blocking on
  unresponsive Redis
- sync/gc.rs: add comment explaining why git gc --auto non-zero exit
  is benign
- webhook_dispatch.rs: remove unnecessary format! wrappers in slog macros
- config/hook.rs: document max_concurrent intent (K8s operator/HPA, not
  the single-threaded worker itself)
2026-04-17 13:20:31 +08:00
ZhenYi
93cfff9738 init 2026-04-15 09:08:09 +08:00