ReMe/tests/unit
jinliyl cf22ef3b1d
feat: add codex auth modes, background embedding/index repair, and qwenpaw logging (#371)
* feat(codex): add authentication mode support with thread-safe logging

- Implement _CodexAuthConfig dataclass for resolved auth settings
- Add auth_mode parameter with auto/api_key/oauth options
- Separate API key and OAuth authentication flows
- Force specific login method based on auth mode
- Add explicit API key validation requirement
- Serialize concurrent logger initialization in thread lock
- Close logging handlers properly during cleanup
- Update default config with auth_mode presets for codex and codex_oauth
- Add comprehensive tests for authentication modes and concurrent logging

* feat(file_store): implement background embedding backfill and keyword index repair

- Add _after_embedding_backfill hook in FAISS local file store
- Schedule startup embedding repair without delaying component readiness
- Cancel and collect embedding backfill task during component shutdown
- Log progress at fixed percentage boundaries for long-running operations
- Process embedding backfill in configurable batch sizes with progress reporting
- Rebuild keyword index in bounded batches with detailed mismatch diagnostics
- Format stdlib logs consistently with QwenPaw console output using relative paths
- Run embedding backfill as background task that doesn't block component startup
- Add comprehensive tests for background embedding and keyword index repair scenarios

* fix(file-store): repair graph-chunk consistency on load

- Add _repair_graph_chunk_consistency method to detect and fix mismatched graph/chunk states
- Clear torn graph/chunk state when missing or orphaned chunks are detected
- Ensure keyword index sync handles empty chunks properly
- Add comprehensive tests for graph-chunk consistency scenarios
- Update test utilities to properly seed graph/chunk snapshots
- Increment version to 0.4.1.2

* feat(file_io): enhance list step response format and add comprehensive logging

- Format list output with bullet points for better readability
- Add explicit "No files found" message when directory is empty
- Include detailed timing information for file store startup phases
- Add logging for chunk loading, graph consistency checks, and keyword indexing
- Provide detailed metrics for embedding backfill operations
- Add comprehensive test coverage for empty directory scenarios
- Include batch processing statistics for embedding operations

* feat(logger): add QwenPaw logging integration with forwarding mechanism

- Introduce _ForwardToLoggerHandler to forward log records to target logger
- Add qwenpaw logger integration that forwards ReMe logs to QwenPaw handlers
- Maintain ReMe logger stability for modules that cache it at import time
- Enable QwenPaw handlers to take effect without ReMe reconfiguration
- Add comprehensive tests for stdlib forwarding to QwenPaw sinks
- Support explicit REME_DISABLE_LOGURU=false to keep original Loguru backend
- Preserve existing logging behavior when QwenPaw is not configured

* fix(file_store): serialize concurrent FAISS dump operations to prevent corruption

- Add asyncio lock to ensure only one FAISS dump operation runs at a time
- Generate unique temporary filenames using UUID tokens for atomic replacement
- Implement proper cleanup of temporary files in finally block
- Add comprehensive test to verify concurrent dumps are serialized
- Ensure atomic writes by replacing both index and idmap files together
- Prevent partial state writes during concurrent access scenarios
2026-07-20 14:47:34 +08:00
..
__init__.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_as_embedding_lazy.py refactor(embedding): defer provider construction until first remote call (#361) 2026-07-15 20:46:36 +08:00
test_auto_dream.py feat(evolve): enhance agent reply processing and logging capabilities (#293) 2026-06-24 22:08:47 +08:00
test_background_steps.py feat(index): add file size limits and oversized file handling (#362) 2026-07-15 21:01:18 +08:00
test_base_component.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00
test_bm25_index_perf.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_cc_agent_wrapper.py feat(agent): add Codex agent wrapper and ReMe MCP bridge (#358) 2026-07-17 13:39:18 +08:00
test_channel_notify.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_channel_sink.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_claim_channel.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_codex_agent_wrapper.py feat: add codex auth modes, background embedding/index repair, and qwenpaw logging (#371) 2026-07-20 14:47:34 +08:00
test_common_steps.py feat(lme): add cli execution and agentic search tooling (#334) 2026-07-08 17:43:09 +09:00
test_component_registry.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_config_parser.py fix: enforce markdown chunk byte limits (#370) 2026-07-17 22:03:58 +08:00
test_cron_job.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_crud_steps.py feat: add codex auth modes, background embedding/index repair, and qwenpaw logging (#371) 2026-07-20 14:47:34 +08:00
test_daily_steps.py fix(auto-memory): preserve message timestamps (#310) 2026-07-01 17:15:07 +08:00
test_default_file_chunker.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00
test_evolve_utils.py fix(auto-memory): preserve message timestamps (#310) 2026-07-01 17:15:07 +08:00
test_file_catalog.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_file_graph.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_file_store_consistency.py feat: add codex auth modes, background embedding/index repair, and qwenpaw logging (#371) 2026-07-20 14:47:34 +08:00
test_hermes_agent_plugin.py feat(plugins): add Hermes Agent memory provider (#365) 2026-07-17 14:06:12 +08:00
test_http_client.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00
test_job.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00
test_json_file_chunker.py feat(chunker): better json chunker and json chunker (#325) 2026-07-08 15:18:59 +08:00
test_jsonl_file_chunker.py feat(chunker): better json chunker and json chunker (#325) 2026-07-08 15:18:59 +08:00
test_keyword_index.py refactor(embedding): defer provider construction until first remote call (#361) 2026-07-15 20:46:36 +08:00
test_link_expansion.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_lme_final_answer_review.py chore(benchmark): remove longmemeval final answer review file (#366) 2026-07-16 20:32:28 +08:00
test_local_embedding_store.py fix(embedding): make input truncation CJK-aware (#337) 2026-07-13 17:43:48 +09:00
test_logging_config.py feat: add codex auth modes, background embedding/index repair, and qwenpaw logging (#371) 2026-07-20 14:47:34 +08:00
test_markdown_file_chunker.py fix: enforce markdown chunk byte limits (#370) 2026-07-17 22:03:58 +08:00
test_packaging.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_prompt_handler.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00
test_read_image_steps.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_read_with_neighbors.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_reme_cli.py feat(core): add shell execution and runtime memory status (#344) 2026-07-14 16:31:41 +08:00
test_runtime_context.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00
test_search_step.py feat(benchmark): add LongMemEval golden answer validation (#335) 2026-07-13 21:26:27 +08:00
test_service.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_service_utils.py feat(benchmark): add lme benchmark steps (#326) 2026-07-07 18:53:39 +09:00
test_shell_step.py feat(core): add shell execution and runtime memory status (#344) 2026-07-14 16:31:41 +08:00
test_status_step.py feat(core): add shell execution and runtime memory status (#344) 2026-07-14 16:31:41 +08:00
test_tokenizer.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_utils.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_wikilink_utils.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_write_metadata_lock.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00