clash-verge-draft and clash-verge-logging did not inherit
[workspace.lints], so cargo's missing_lints_inheritance warned and the
strict clippy set never applied to them. Inheriting the lints surfaced
six errors, now fixed:
- draft: drop the data lock before cloning the snapshot and before
returning in with_data_modify (significant_drop_tightening)
- draft: require T: Send + Sync on acquire_data_modify_permit so its
future is Send (future_not_send)
- draft bench: scope an allow for the runtime-init panic
- logging: make Logger::new const (missing_const_for_fn)
- logging: return the builder directly from generate_file_log_writer,
which never failed (unnecessary_wraps)
The three unused-dependency warnings that remain under
--all-features are cfg artifacts, not dead deps: tauri-build is only
called when the clippy feature is off, tauri-plugin-devtools is
compiled out when tokio-trace is enabled alongside tauri-dev, and
clash-verge-logging in clash-verge-signal is only referenced by the
Linux-only body of that crate.
* refactor(log): migrate logging to tracing-estuary pipeline
Swap flexi_logger + clash-verge-logger wiring for the tracing-estuary
crate: buffered file sink with explicit panic/exit drains, live level
switching, and tokio-trace/chrome-trace behind crate features.
AsyncLogger moves in-house (VecDeque ring); file format and rotation
stay unchanged.
* fix(log): reset sidecar writer in place and re-pin service-ipc v2.6.7
Rebuilding the sidecar FileLogWriter on config changes leaked flexi's
unstoppable flusher thread plus an fd each time; the writer is now flushed
and reset in place, matching what the service crate does.
get_clash_logs_by_service drops the CompactString conversion layer now that
service-ipc v2.6.7 returns plain Vec<String>, and AsyncLogger is renamed
LogRing to match.
* refactor(log): span-based observability and log noise cleanup
Instrument spans carry the structure flat lines never could: the core-start
spine (mode, readiness/owner generations, pid, config file), proxy apply and
clear routes with guard generations, service IPC sessions with refusal codes
and outcomes, profile-switch terminal outcomes, subscription fetch strategies,
core upgrades with per-proxy version probes, backup flows, timer tasks, config
generation uids, and the startup setup flow; running-mode changes emit one
guarded transition event each.
~90 hand-written noise lines are gone or demoted (entry+success pairs, polled
getter echoes, phase brackets, window sub-steps, platform install chatter);
errors keep their anyhow chain, operation name, and item id, and swallowed
retry results surface per attempt.
- Add Cargo.toml for workspace management, including dependencies and profiles.
- Create clash-verge-draft crate with basic structure, including a benchmark for Draft functionality.
- Implement Draft management with shared state and asynchronous modifications.
- Add tests for Draft functionality to ensure correctness.
- Create clash-verge-logging crate for logging utilities with structured log types and macros.
- Update src-tauri to use new crates and remove unnecessary configurations.
- Refactor existing code to utilize the new Draft and logging functionalities.