ReMe/tests/unit
xyf2020 43a407bc4f
Some checks failed
Tests ReMe / Unit Tests - py3.11 (push) Has been cancelled
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Tests ReMe / Unit Tests - py3.12 (push) Has been cancelled
Tests ReMe / Unit Tests - py3.13 (push) Has been cancelled
feat: add start_date/end_date time filter support for search job (#317)
* feat: add start_date/end_date time filter support for search job

- Add _extract_date_from_path to extract validated YYYY-MM-DD from chunk paths
- Add start_date/end_date filtering in _matches_search_filter
- Implement progressive recall in FaissLocalFileStore.vector_search
- Promote start_date/end_date from context to search_filter in SearchStep
- Add start_date/end_date parameters to search job in default.yaml
- Add unit tests for date filter functionality

* fix: validate/normalize date filters and harden _extract_date_from_path

Address three code-review comments on the time_filter search feature:

1. Validate/normalize start_date and end_date before string comparison.
   _matches_search_filter does lexicographic comparison against path_date
   (always canonical YYYY-MM-DD). Raw caller values like '2026-2-28' or
   'abc' would produce silently wrong results. Now SearchStep normalizes
   valid dates via extract_daily_date (with strptime fallback for
   non-zero-padded input) and silently ignores invalid dates with a
   logger.warning, removing them from the filter.

2. Clarify behavior for paths without embedded dates.
   Added optional strict_date_filter parameter (default False). When True
   and at least one date bound is active, chunks whose path yields no date
   (e.g. digest/personal/topic.md) are excluded. When False (default),
   the existing behavior is preserved — dateless paths pass through.

3. Harden _extract_date_from_path against non-standard suffixes.
   Previously parts[1].split('.')[0] accepted '2026-05-18.anything' as a
   valid date. Now only exact 'YYYY-MM-DD' (dir) and 'YYYY-MM-DD.md'
   (day-index) forms are accepted.
2026-07-03 15:58:04 +08:00
..
__init__.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +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 fix(auto-memory): preserve message timestamps (#310) 2026-07-01 17:15:07 +08:00
test_base_component.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_bm25_index_perf.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +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_common_steps.py docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +08:00
test_component_registry.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_config_parser.py feat(mem): Enhance daily note system with metadata handling and write functionality (#295) 2026-06-25 21:54:56 +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 docs: rename vault_dir to workspace_dir in documentation and examples (#286) 2026-06-22 16:58:57 +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 init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08: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 start_date/end_date time filter support for search job (#317) 2026-07-03 15:58:04 +08:00
test_job.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_keyword_index.py Update version to 0.4.0.2 and improve tokenizer index handling (#290) 2026-06-24 15:01:07 +08:00
test_link_expansion.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_markdown_file_chunker.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_packaging.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_prompt_handler.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08: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 init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_runtime_context.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_search_step.py feat: add start_date/end_date time filter support for search job (#317) 2026-07-03 15:58:04 +08:00
test_service.py init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
test_service_utils.py refactor(transfer): drop orphaned ingest step, make service discovery cross-platform (#300) 2026-06-29 14:49:23 +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