mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-28 06:24:43 +00:00
Closes #368 ## What - Add containment-style tags filter to LocalFileStore._matches_search_filter with AND semantics (chunk must contain every expected tag). Matches the design note in the issue: frontmatter tags: [user:alice] plus the markdown chunker include_frontmatter_in_metadata=true lets multi-agent deployments scope recalls to a single user without per-user workspaces. - Promote tags context parameter in SearchStep and SearchV2Step to search_filter[tags], mirroring the existing start_date/end_date promotion. Accept both list[str] and comma-separated strings (trimmed). Explicit search_filter.tags takes precedence. - Add _tag_contains helper on LocalFileStore (covers list/set/tuple, scalar, and None inputs) and move the final two early-returns of _matches_search_filter to a combined boolean so pylint keeps the function's return-count under the limit. - Unit tests: containment semantics at the filter layer, list+CSV promotion in both SearchStep and SearchV2Step, precedence over top-level context. ## Why - The v0.4.x user-facing change removed an explicit user-scoping parameter. The documented workaround (separate workspaces per user) is heavyweight; the maintainer suggestion (store user:<name> in frontmatter tags) needed the corresponding search-side filter to be actionable in practice. - Using containment (AND) rather than exact equality keeps the frontmatter format natural: mix of user:<name>, project:<proj>, domain tags still works without calling multiple filters. - Using a reserved top-level tags key keeps the behavior explicit and the metadata semantics stable (metadata keys still use exact equality, which is what callers need for conversation_date style filters). ## Not in scope - Does NOT flip include_frontmatter_in_metadata default to true — that's a deploy-time config decision and changes memory usage. Docs update to note the knob is tracked separately. - No vector or keyword index changes; filtering stays post-hoc consistent with date/path/metadata filters today. ## Testing - [x] New unit tests (4) for filter semantics, list and CSV promotion, precedence, SearchV2Step — all PASS - [x] Existing search step test suite — 36/36 PASS (no regressions) - [x] Pre-commit: check-ast, black, flake8, pylint, pyroma, add-trailing-comma, whitespace, private-key — all PASS |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_as_embedding_lazy.py | ||
| test_auto_dream.py | ||
| test_auto_fin.py | ||
| test_auto_memory_cc.py | ||
| test_background_steps.py | ||
| test_base_agent_wrapper.py | ||
| test_base_component.py | ||
| test_cc_agent_wrapper.py | ||
| test_codex_agent_wrapper.py | ||
| test_common_steps.py | ||
| test_component_registry.py | ||
| test_config_parser.py | ||
| test_crud_steps.py | ||
| test_daily_paper.py | ||
| test_daily_steps.py | ||
| test_default_file_chunker.py | ||
| test_dingtalk_wait.py | ||
| test_embedded_consumer_compat.py | ||
| test_evolve_utils.py | ||
| test_faiss_index_maintenance.py | ||
| test_file_catalog.py | ||
| test_file_graph.py | ||
| test_file_store_consistency.py | ||
| test_http_client.py | ||
| test_injected_job_kwargs.py | ||
| test_job.py | ||
| test_json_file_chunker.py | ||
| test_jsonl_file_chunker.py | ||
| test_keyword_index.py | ||
| test_link_expansion.py | ||
| test_local_embedding_store.py | ||
| test_logging_config.py | ||
| test_markdown_file_chunker.py | ||
| test_outbound_proxy.py | ||
| test_packaging.py | ||
| test_path_permission.py | ||
| test_prompt_handler.py | ||
| test_read_image_steps.py | ||
| test_read_with_neighbors.py | ||
| test_reme_cli.py | ||
| test_runtime_context.py | ||
| test_search_step.py | ||
| test_service.py | ||
| test_service_utils.py | ||
| test_shell_step.py | ||
| test_source_format_merge.py | ||
| test_status_step.py | ||
| test_tokenizer.py | ||
| test_utils.py | ||
| test_wikilink_utils.py | ||
| test_write_metadata_lock.py | ||