Suppport cluster redis - #149
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Redis Cluster support for LangGraph checkpointers by introducing a cluster-aware saver that uses per-thread hash tags to keep multi-key lifecycle operations within a single Redis Cluster hash slot.
Changes:
- Introduces
RedisClusterSaverand wires it intoAgentFactoryviacheckpointer.type: redis_cluster. - Extends
CheckpointerConfigand YAML agent spec handling/tests to accept and pass throughredis_clusteroptions. - Updates docs and templates to describe the new backend and clarify the trust boundary for dotted-path tools in headless YAML specs.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_yaml_agent_tool.py | Adds coverage for long-text stream truncation behavior (currently needs assertion fix). |
| tests/test_yaml_agent_spec.py | Verifies YAML spec passes through redis_cluster checkpointer config. |
| tests/test_redis_cluster_checkpointer.py | Validates Redis Cluster hash-tagged key layout for thread-scoped keys. |
| tests/test_checkpointer_config.py | Extends normalization/validation tests to include redis_cluster and ensures _build_checkpointer uses the cluster saver. |
| README.md | Documents redis_cluster backend and selection guidance (one wording mismatch with actual error messages). |
| docs/yaml_agent_spec.md | Documents redis_cluster config and adds warning about trusted dotted-path tools in headless specs. |
| docs/tools.md | Adds warning about treating headless YAML specs/dotted tools as trusted configuration. |
| docs/templates/headless_subagent.yaml | Adds template guidance about dotted-path tool trust. |
| automa_ai/config/checkpointer.py | Adds redis_cluster to supported types and validation rules. |
| automa_ai/checkpoint/redis_cluster.py | Implements RedisClusterSaver with per-thread hash tags for cluster-safe key grouping. |
| automa_ai/checkpoint/init.py | Exports RedisClusterSaver. |
| automa_ai/agents/agent_factory.py | Adds redis_cluster construction path in _build_checkpointer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7228b9ed4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… into suppport_cluster_redis
No description provided.