237a581429
fix: add server streaming support, fix pre-existing compilation errors
...
Server changes for client mode streaming:
- POST /api/item/ now streams body via async channel → ChannelReader
→ save_item_raw_streaming when compress=false or meta=false
- Add POST /api/item/{id}/meta endpoint for client-side metadata
- Add save_item_raw_streaming<R: Read> to SyncDataService
- Add add_item_meta to AsyncDataService
Fix pre-existing issues that were hidden behind swagger cfg gate:
- Remove #[cfg(feature = "swagger")] from item module so it compiles
with just the server feature
- Fix parse_comma_tags usage (returns Vec, not Result)
- Fix TextDiff temporary value lifetime issue
- Fix io::Error::new → io::Error::other
- Fix ok_or_else → ok_or for Copy types
- Inline format args throughout server code
- Fix empty line after doc comment in pages.rs
- Add cfg_attr for unused_mut where mcp feature gates mutation
- Add type_complexity allow on create_auth_middleware
- Distinguish task error vs save error in spawn_blocking handlers
Co-Authored-By: andrew/openrouter/hunter-alpha <noreply@opencode.ai >
2026-03-12 18:02:56 -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
d7c2abb43d
chore: remove unused test helpers
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 13:09:38 -03:00
Andrew Phillips
d82a1c0414
fix: escape reserved keyword 'gen' in test helper function
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 13:02:24 -03:00
Andrew Phillips
26efd30436
fix: resolve compilation errors by fixing reserved keyword usage and removing unused imports
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 13:01:46 -03:00
Andrew Phillips
2f78e45444
feat: add helper functions for creating temporary files with random binary content and asserting file sizes
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 11:26:25 -03:00
Andrew Phillips
60ec6da886
feat: add populated test database and directory helper functions
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 11:26:06 -03:00
Andrew Phillips
23681240d8
feat: add binary file helpers and file assertion utilities to test module
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 11:25:44 -03:00
Andrew Phillips
b9438f2791
feat: add test helpers for database setup and file content comparison
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 11:25:19 -03:00
Andrew Phillips
5d44be21fa
feat: add compression engine test helpers and refactor tests
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 11:24:38 -03:00
Andrew Phillips
d5c956e626
feat: create common test helpers to reduce duplication across test modules
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-15 11:23:17 -03:00
Andrew Phillips
acbeb297b2
fix: enable and fix all existing tests by updating module imports and test implementations
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-14 17:09:13 -03:00
Andrew Phillips
0abb76e785
feat: implement comprehensive tests for all modules including database, meta plugins, compression engines, modes, server auth, and utilities to complete Phase 2
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-14 12:18:36 -03:00
Andrew Phillips
4e23dd36e1
feat: implement Phase 2 test structure and modules
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-14 12:15:57 -03:00
Andrew Phillips
9142cdde2d
refactor: split compression tests into separate module files as planned
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-14 11:57:56 -03:00