Introduce the foundational observability layer for the sync pipeline: - MetricsLayer: Custom tracing subscriber layer that captures span timing and structured fields, materializing them into a hierarchical Vec<StageTiming> tree for robot-mode performance data output - logging: Dual-layer subscriber infrastructure with configurable stderr verbosity (-v/-vv/-vvv) and always-on JSON file logging with daily rotation and configurable retention (default 30 days) - SyncRunRecorder: Compile-time enforced lifecycle recorder for sync_runs table (start -> succeed|fail), with correlation IDs and aggregate counts - LoggingConfig: New config section for log_dir, retention_days, and file_logging toggle - get_log_dir(): Path helper for log directory resolution - is_permanent_api_error(): Distinguish retryable vs permanent API failures (only 404 is truly permanent; 403/auth errors may be environmental) Database changes: - Migration 013: Add resource_events_synced_for_updated_at watermark columns to issues and merge_requests tables for incremental resource event sync - Migration 014: Enrich sync_runs with run_id correlation ID, aggregate counts (total_items_processed, total_errors), and run_id index - Wrap file-based migrations in savepoints for rollback safety Dependencies: Add uuid (run_id generation), tracing-appender (file logging) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
66 lines
1.3 KiB
TOML
66 lines
1.3 KiB
TOML
[package]
|
|
name = "lore"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "Gitlore - Local GitLab data management with semantic search"
|
|
authors = ["Taylor Eernisse"]
|
|
license = "MIT"
|
|
|
|
[[bin]]
|
|
name = "lore"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
# Database
|
|
rusqlite = { version = "0.38", features = ["bundled"] }
|
|
sqlite-vec = "0.1"
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
# CLI
|
|
clap = { version = "4", features = ["derive", "env"] }
|
|
clap_complete = "4"
|
|
dialoguer = "0.12"
|
|
console = "0.16"
|
|
indicatif = "0.18"
|
|
comfy-table = "7"
|
|
open = "5"
|
|
|
|
# HTTP
|
|
reqwest = { version = "0.12", features = ["json"] }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
|
|
|
|
# Async streaming for pagination
|
|
async-stream = "0.3"
|
|
futures = { version = "0.3", default-features = false, features = ["alloc"] }
|
|
|
|
# Utilities
|
|
thiserror = "2"
|
|
dirs = "6"
|
|
url = "2"
|
|
urlencoding = "2"
|
|
rand = "0.8"
|
|
sha2 = "0.10"
|
|
flate2 = "1"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2"
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
|
tracing-appender = "0.2"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
wiremock = "0.6"
|
|
|
|
[profile.release]
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|