Commit graph

3 commits

Author SHA1 Message Date
2ab66a249b Fix review findings: wishlist qualifying count, improve docs, and lint cleanup
- Count only configs meeting min_count as qualifying in the wishlist
  copy-coverage check (previously ALL guid_to_rid entries inflated the
  denominator, producing phantom wishlist entries), pre-computed once
  per guid instead of per record
- Update stale write_improve_csv doc to match single-best-target
  behavior including cross-copy exclusion
- Borrow owned configs for the trash CSV join instead of cloning the Vec
- Build owned_final_configs via filter_map + flat_map without the
  throwaway intermediate Vec
- Remove runtime assertions on literal constants (clippy
  assertions_on_constants) and replace a redundant closure with the
  function reference (clippy redundant_closure)
- Apply rustfmt across the crate and drop a duplicated test-section header
2026-08-15 18:58:12 +02:00
a9a46ee551 refactor: modular architecture with unified error handling and DashMap concurrency
- Break monolithic records.rs into commands/, output/, parsing/ modules
- Add lib.rs with shared types (AppError, Car, BestCarRecord, etc.)
- Replace Arc<Mutex<HashMap>> with DashMap for concurrent access
- Add unified AppError enum with thiserror
- Add configurable CLI paths (--my-cars, --cars-db, --times-dir, --tracks-db)
- Add serde deserialization for Car struct
- Add CSV escaping for fields with commas/quotes/newlines
- Fix track name splitting: split_once -> rsplit_once for _a handling
- Add integration tests, proptest property-based tests, and unit tests
- Add rustfmt.toml configuration
- Update documentation (API, ARCHITECTURE, DATA_STRUCTURES, README)
2026-05-08 16:19:01 +02:00
6a68469239 Modernize dependencies, add wishlist features, improve error handling
- Remove once_cell and serde dependencies; use std::sync::LazyLock
  and manual serde_json::Value parsing instead
- Add wishlist support: load wishlist from my_cars.json, prefix
  missing cars with '+' in missing mode, add 'wishlist' command
  to show stale wishlist entries (prefixed with '-')
- Replace unwrap()/expect() with graceful eprintln warnings and
  early returns throughout (get_car_list, parse_car_times, etc.)
- Scope all Mutex locks tightly to avoid holding during I/O
  (print_best_times, print_best_cars, print_trash, print_wishlist_stale)
- Replace custom split_prefix_postfix with str::split_once
- Pass owned-car set into parse_all_times/parse_car_times via
  Arc<HashSet> instead of reading file per task
- Consolidate my_cars.json loading into single load_my_cars_data()
  returning both owned and wishlist sets
- Add .gitignore and Cargo.lock to version control
- Report task failures in parse_all_times join loop
2026-05-06 00:30:56 +02:00