Commit Graph

23 Commits

Author SHA1 Message Date
9b7cbd5244 fix: resolve doctest failures, database bugs, and remove dead code
- Fix all 96 doctest failures across 20 files by adding hidden imports and
  proper test setup (68 pass, 33 intentionally ignored)
- Fix set_item_tags: wrap in transaction and replace item.id.unwrap() with
  proper error handling
- Fix get_items_matching: replace N+1 per-item meta queries with batch
  get_meta_for_items() call
- Fix get_item_matching: apply meta filtering instead of ignoring the parameter
- Remove duplicate doc comment in store_meta
- Remove dead code files: plugin.rs, plugins.rs, binary_detection.rs
  (never declared as modules)
- Apply cargo fmt formatting fixes
- Add keep.db to .gitignore
2026-03-12 11:58:44 -03:00
8a8a6e1c4b fix: correct critical bugs and improve pipe streaming performance
Critical bug fixes:
- save_item now returns real Item from database, not a hardcoded fake
- AsyncDataService::save() reuses self.sync_service instead of creating redundant instance
- GenerateStatus trait signature mismatch fixed (CLI/API decoupling)

Performance improvements (pipe path untouched):
- CompressionEngine::open() returns Box<dyn Read + Send> enabling true streaming
- mode_get eliminates triple full-file read (was sampling then re-reading entire file)
- FilteringReader adds fast-path bypass when no filters, pre-allocates temp buffer
- text.rs meta plugin processes &[u8] slice directly, eliminates data.to_vec() clone

API correctness:
- Tag parse errors now return 400 instead of being silently discarded
- compute_diff uses similar crate (LCS-based) instead of naive positional comparison

Cleanup:
- Modernize string formatting (format!({x})) across codebase
- Remove redundant DB query in get mode
- Derive Debug/ToSchema on public types
- Delete placeholder test files with no real assertions
- Extract parse_comma_tags utility function
2026-03-11 20:45:05 -03:00
Andrew Phillips
fdeb5f7951 Ugh 2026-02-19 13:57:39 -04:00
Andrew Phillips
9f7534f0ae docs: Improve Rustdoc for compression engine, delete mode, and parser modules
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 15:40:04 -03:00
Andrew Phillips
58b5c8187b docs: Add Rustdoc for modules, functions, and structs
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
2025-09-10 12:28:47 -03:00
Andrew Phillips
c07c83fb8f fix: make cmd mutable and remove unused import
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-08-29 14:32:18 -03:00
Andrew Phillips
fbdcb94ba1 fix: remove unused imports and parameters
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-08-29 14:31:27 -03:00
Andrew Phillips
6f05851282 fix: remove redundant validation in delete mode
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
2025-08-29 14:28:36 -03:00
Andrew Phillips
0fe61de89e fix: remove unused anyhow import
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
2025-08-25 17:49:10 -03:00
Andrew Phillips
378d42c2af fix: add services module and fix type annotation error
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
2025-08-25 15:32:26 -03:00
Andrew Phillips
a203059bb4 refactor: rename core module to services
Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat>
2025-08-25 14:21:20 -03:00
Andrew Phillips
53c63360cb fix: update module declarations and imports
Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat>
2025-08-25 13:03:59 -03:00
Andrew Phillips
7ec0603e00 feat: implement core services and refactor modes
Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat>
2025-08-24 23:56:06 -03:00
Andrew Phillips
c4b2a5d7e7 fix: update config type references and method calls
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
2025-08-16 12:03:13 -03:00
Andrew Phillips
b6389419c0 fix: remove unused imports and resolve config module conflicts
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
2025-08-15 16:39:11 -03:00
Andrew Phillips
56f4d8aad5 feat: implement unified settings system
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
2025-08-15 16:36:58 -03:00
Andrew Phillips
a3eb9e7056 fix: address critical memory safety, error handling, concurrency and security issues
This commit fixes several critical issues across the codebase:
1. Memory safety & resource leaks: Added proper cleanup for compression engine processes using RAII patterns
2. Error handling: Replaced unsafe unwrap() calls with proper error propagation using ok_or_else()?
3. Concurrency issues: Improved diff mode thread safety with proper error handling and RAII guards
4. Security concerns: Added validation for item IDs to prevent path traversal vulnerabilities
5. Database design: Wrapped database operations in transactions for atomicity in save/update modes

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
2025-08-09 23:33:06 -03:00
Andrew Phillips
dd8f828ed3 refactor: update function parameters to use references where appropriate 2025-05-14 22:09:23 -03:00
Andrew Phillips
bbdfe19836 feat: add compression and digest support with database schema updates 2025-05-14 09:45:51 -03:00
Andrew Phillips
9feec61759 style: reorder imports and reformat code for consistency 2025-05-10 10:06:33 -03:00
Andrew Phillips (aider)
1207dfc2c0 fix: correct invalid self import in delete.rs
The original line `use crate::db::self;` was invalid because `self` cannot be used in a `use` statement outside of a list. Changed to `use crate::db;` to properly import the module.
2025-05-10 08:41:08 -03:00
Andrew Phillips (aider)
6c3f717b8d fix: add missing log/rusqlite imports and remove unused imports 2025-05-10 08:39:50 -03:00
Andrew Phillips (aider)
93d06b4429 refactor: Move mode_delete function to src/modes/delete.rs 2025-05-10 08:37:03 -03:00