feat: extract TaskStore into pluggable store abstraction layer#40
Merged
tjb-tech merged 1 commit intoHKUDS:mainfrom Mar 26, 2026
Merged
feat: extract TaskStore into pluggable store abstraction layer#40tjb-tech merged 1 commit intoHKUDS:mainfrom
tjb-tech merged 1 commit intoHKUDS:mainfrom
Conversation
Mirrors the existing transport/ pattern (Transport ABC + FileTransport + factory). Existing imports (`from clawteam.team.tasks import TaskStore`) keep working via lazy re-export. New layout: store/base.py — BaseTaskStore ABC with get_stats default impl store/file.py — FileTaskStore (moved from team/tasks.py, unchanged) store/__init__ — get_task_store() factory, reads CLAWTEAM_TASK_STORE config.py — task_store field + env var mapping 17 new tests, 201 total passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transport/pattern (TransportABC →FileTransport→ factory) for task storageBaseTaskStoreABC intoclawteam/store/base.pywith a defaultget_stats()implementationFileTaskStoreatclawteam/store/file.py(behavior unchanged)get_task_store()factory that checksCLAWTEAM_TASK_STOREenv var / config before falling back to filetask_storefield toClawTeamConfig+ env var mapping inget_effective()from clawteam.team.tasks import TaskStore) keep working via lazy re-exportThis is Phase 1 from the roadmap — it unblocks adding Redis/SQL backends later without touching any existing callers.
New layout
Test plan