b166477202
fix: harden security, eliminate panics, remove dead code, add Dockerfile
...
Security:
- Use constant-time password comparison (subtle crate) to prevent timing attacks
- Replace permissive CORS with configurable origin-restricted CORS
- Add TLS warning when password auth is used without HTTPS
Bug fixes:
- Convert MetaPlugin panics to anyhow::Result (get_meta_plugin, outputs_mut, options_mut)
- Replace item.id.unwrap() with proper error handling across 15 call sites
- Fix panic on unknown column type in list mode
- Fix conflicting PIPESIZE constant (was 8192 vs 65536, now unified to 8192)
- Add 256MB filter chain buffer limit to prevent OOM
- Gracefully skip unregistered plugins instead of panicking
Dead code removal:
- Delete unused filter parser files (filter_parser.rs, filter.pest, parser/ module)
- ~260 lines of dead PEG parser code removed
Code consolidation:
- Add is_content_binary_from_metadata() helper (was duplicated in 4 places)
- Simplify save_item_raw() to delegate to save_item_raw_streaming() (~90 lines removed)
Incomplete features:
- Populate filter_plugins in status output from global registry
- Add FallbackMagicFileMetaPlugin (was referenced but never implemented)
- Document init_plugins() as intentional no-op
Infrastructure:
- Add Dockerfile (static musl binary on scratch, 4.8MB)
- Add .dockerignore
- Add cors_origin to ServerConfig and config.rs
2026-03-13 07:57:36 -03:00
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
f3a4894699
docs: Add Rustdoc comments for info and mcp modules and grep plugin
...
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat >
2025-09-10 14:30:54 -03:00
Andrew Phillips
88c7290a7b
docs: Add comprehensive documentation for modes, services, and plugins
...
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat >
2025-09-10 14:29:16 -03:00
Andrew Phillips
935f829b42
refactor: Trim whitespace from end of each line in table output
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:53:54 -03:00
Andrew Phillips
9a6b0ceced
fix: Use trim_fmt() before trim_end() for comfy-table output
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:52:48 -03:00
Andrew Phillips
8cb7559d5d
fix: Trim trailing whitespace from printed tables
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:52:01 -03:00
Andrew Phillips
2dab5b9a51
refactor: Unstyle the info table
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:47:43 -03:00
Andrew Phillips
33a9049a1f
refactor: Fix compilation by adding imports and adjusting table methods
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:31:35 -03:00
Andrew Phillips
26a8712d82
refactor: Enhance table generation and clean up dependencies
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:29:50 -03:00
Andrew Phillips
bf257b5ff3
refactor: Improve comfy_table usage and consistency
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:19:10 -03:00
Andrew Phillips
fb19499383
fix: Remove unused imports from various modules
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:12:54 -03:00
Andrew Phillips
1a0478a545
fix: Correct table cell alignment and string conversion
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:12:22 -03:00
Andrew Phillips
9f328a376f
refactor: Migrate from prettytable to comfy-table for output formatting
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:09:47 -03:00
Andrew Phillips
e91431f6b6
feat: Add debugging for max_value_width calculation in info mode
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 17:53:19 -03:00
Andrew Phillips
08f37697d8
fix: Correctly calculate max value width for info table
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 17:51:07 -03:00
Andrew Phillips
12665032a3
fix: Resolve build errors by importing log::debug and removing unused imports
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 17:46:28 -03:00
Andrew Phillips
762fdfd876
fix: Truncate all info table value cells and add debug logging
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 17:45:22 -03:00
Andrew Phillips
d15ba05a44
fix: Correctly calculate info table column width for truncation
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 17:38:56 -03:00
Andrew Phillips
aa8b942f2d
feat: Improve info table rendering by truncating wide columns
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 17:35:14 -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
bf5ea8dc08
feat: add tag support to --info mode
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-29 14:25:21 -03:00
Andrew Phillips
692a403a7e
fix: make id mandatory for delete and optional for get/info
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-29 14:24:19 -03:00
Andrew Phillips
d32a460e38
refactor: remove KEEP_META_* environment variable parsing
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-29 14:09:12 -03:00
Andrew Phillips
219c368c05
feat: enforce numeric IDs for --info command
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-29 12:42:38 -03:00
Andrew Phillips
66f9b71258
feat: handle numeric tags as ids for info mode
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-29 12:40:15 -03:00
Andrew Phillips
f0a2cf32ac
chore: add derive_more and smart-default crates
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-27 21:36:44 -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
ff85bb611b
fix: resolve borrow of partially moved value errors and update error variant
...
Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat >
2025-08-25 13:13:46 -03:00
Andrew Phillips
ee0545b739
fix: resolve ownership and borrowing errors and add serde traits
...
Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat >
2025-08-25 13:06:54 -03:00
Andrew Phillips
7a5bcf2722
refactor: update info mode to use ItemService
...
Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat >
2025-08-24 23:58:50 -03:00
Andrew Phillips
5c66ac3d8a
fix: remove unused config parameter in mode functions
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:11:31 -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
0d1ae9ff12
feat: add --output-format option for json/yaml support in info/status/list modes
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-10 11:21:04 -03:00
Andrew Phillips (aider)
970d69af70
chore: remove unused imports
2025-05-22 14:02:24 -03:00
Andrew Phillips (aider)
a68d75351f
refactor: remove magic function and related code
2025-05-22 13:57:00 -03:00
Andrew Phillips
91cceff3e8
refactor: remove digest type and value handling
2025-05-22 09:06:51 -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
62aeb05e76
refactor: improve option handling and variable naming in show_item
2025-05-13 18:18:29 -03:00
Andrew Phillips (aider)
c167f28d17
fix: resolve compilation errors in info.rs by adding imports and fixing type handling
2025-05-13 18:10:37 -03:00
Andrew Phillips (aider)
975acf2dc3
refactor: extract item display logic into show_item function
2025-05-13 18:08:19 -03:00
Andrew Phillips (aider)
9046d0b558
refactor: replace if let with match in mode_info handling
2025-05-13 18:04:58 -03:00
Andrew Phillips (aider)
5727c831dc
fix: resolve type mismatches by cloning Options and handling Result correctly in info.rs
2025-05-13 18:02:41 -03:00
Andrew Phillips (aider)
36a0eb56c1
fix: resolve type mismatches in info mode handling
2025-05-13 17:58:20 -03:00
Andrew Phillips (aider)
485b36ce02
feat: add digest type and value to info output
2025-05-13 17:55:48 -03:00