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
22cd07284b
fix: Resolve compilation errors for multiple definitions and parser issues
...
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat >
2025-09-10 16:12:11 -03:00
Andrew Phillips
9f48d7980b
docs: document src/services/types.rs, src/modes/common.rs, and src/services/error.rs
...
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat >
2025-09-10 15:27:45 -03:00
Andrew Phillips
a7bcad40bb
docs: Add comprehensive rustdoc to common module functions
...
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat >
2025-09-10 12:53:21 -03:00
Andrew Phillips
bb45af93fc
fix: Ensure all match arms return the same type in table style setting
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 19:08:37 -03:00
Andrew Phillips
a8542d7dee
fix: Resolve compilation errors and warnings
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 19:07:58 -03:00
Andrew Phillips
b9059da814
fix: Resolve multiple ColumnConfig definitions and type mismatches
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 19:04:30 -03:00
Andrew Phillips
0ab5c93845
feat: Add comprehensive table styling options
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 19:02:33 -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
b41d710a35
fix: Use ASCII_FULL for tables when stdout is not a TTY
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:44:16 -03:00
Andrew Phillips
fc7ca8318b
style: Use solid inner borders for tables
2025-09-08 18:44:15 -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
8d56120b88
refactor: Remove unused size_column function
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:30:16 -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
eccdb0e13e
refactor: Remove duplicated functionality by relying on comfy-table
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 18:26:39 -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
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
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
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
44d039a7c2
refactor: Move terminal width detection to common utility function
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-09-08 17:25:36 -03:00
Andrew Phillips
fc54b8ff8f
fix: remove duplicate meta_type and replace meta_name with meta_type
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-27 21:17:48 -03:00
Andrew Phillips
1159bbe0f5
fix: update meta plugin function calls and imports
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-27 14:02:59 -03:00
Andrew Phillips
6e8ff406c8
fix: remove unused digest field from Settings struct
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-26 23:52:07 -03:00
Andrew Phillips
34c942e73b
refactor: unify digest plugin type handling
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-26 23:44:56 -03:00
Andrew Phillips
a92c22b58c
feat: add ellipsis when truncating strings and only apply max_len for terminal output
...
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat >
2025-08-26 08:45:48 -03:00
Andrew Phillips
f6454d94f3
refactor: remove unused code and fields
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-25 18:26:01 -03:00
Andrew Phillips
1880d1059e
fix: remove unused mutability from meta_plugin variables
...
Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat >
2025-08-25 13:10:52 -03:00
Andrew Phillips
15e2103f66
feat: handle meta:<name> column type pattern
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:55:38 -03:00
Andrew Phillips
9f5f999989
fix: implement PartialEq for OutputFormat and remove unused imports
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:28:31 -03:00
Andrew Phillips
1145f637c7
feat: add OutputFormat enum and remove unused imports
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:28:13 -03:00
Andrew Phillips
172c7ec91d
refactor: remove unused functions and output format enum
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:27:32 -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
6e4b690bd8
feat: use humansize crate and which crate for program lookup
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-12 16:23:11 -03:00
Andrew Phillips
7c1c5bd9c9
fix: resolve compilation errors by adding missing ErrorKind import and removing unused imports
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-10 11:34:44 -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
9f93d6965f
feat: change size formatting to k8s style (e.g. 3Gi, 4Ti)
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-10 11:13:10 -03:00
Andrew Phillips
a5bc9373a9
fix: remove unused imports in common.rs to eliminate build warnings
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-10 00:27:44 -03:00
Andrew Phillips
0f06d31423
fix: remove unused imports, unnecessary mutable variables, and dead code
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-10 00:27:02 -03:00
Andrew Phillips
469e3640b8
fix: resolve compilation errors by fixing mutable references and removing unused imports
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:23:58 -03:00
Andrew Phillips
e1c0c81445
fix: resolve compilation errors by adding missing imports and fixing Result types
...
- Import `anyhow`, `clap::Command`, `log::debug`, and I/O traits
- Fix all `Result` return types to include error type `anyhow::Error`
- Replace `anyhow::anyhow!` with `anyhow!` macro calls
- Fix transaction handling in `mode_save`
- Add missing trait imports for I/O operations and string parsing
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:19:00 -03:00
Andrew Phillips
58f047ba6d
fix: improve error messages and refactor large functions in save/diff modes
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:00:33 -03:00
Andrew Phillips
ca6a1a455c
fix: ignore KEEP_META_PLUGINS when searching for metadata environment variables
...
Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat >
2025-07-29 12:17:49 -03:00
Andrew Phillips
ed22df4b98
fix: add missing IntoEnumIterator import for MetaPluginType::iter() usage
...
Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat >
2025-07-29 12:01:16 -03:00
Andrew Phillips
14c2c347cb
fix: lookup meta plugins by meta name instead of type name
...
Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat >
2025-07-29 12:00:29 -03:00