Open
Conversation
Implement workspace_id-based scoping for FileStorage and RedisStorage. Scope artifacts, workflows, and vectors by workspace while preserving legacy behavior when workspace_id is omitted. Propagate workspace scope through bootstrap and executor wiring, and add coverage for isolation, sharing, defaults, validation, and bootstrap roundtrip behavior.
Use the unscoped tools prefix when REDIS_DEPS_PREFIX is omitted so deps remain rooted at the base Redis namespace instead of a workspace-scoped workflow prefix. Add coverage for fallback behavior and explicit REDIS_DEPS_PREFIX precedence.
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.
Problem
Multi-agent deployments need separate sessions to share artifacts and workflows within a client boundary while preventing cross-client data leakage. py-code-mode previously scoped persistence only by storage root/prefix, so there was no first-class way to isolate one tenant's stored artifacts/workflows from another while still allowing collaboration inside the same tenant.
What changed
workspace_idsupport toFileStorageandRedisStorageworkspace_idis omittedworkspace_idthrough bootstrap so subprocess-backed sessions reconstruct the same scoped storageREDIS_DEPS_PREFIXstill resolves to the root namespace instead of a workspace-scoped workflow prefixDesign notes
SessionconceptTesting
uv run pytest tests/test_workspace_scoped_storage.py tests/test_bootstrap.py tests/test_storage.py tests/test_executor_protocol.py tests/test_subprocess_namespace_injection.py tests/test_subprocess_vector_store.py -n 0uv run pytest tests/container/test_server.py tests/test_workspace_scoped_storage.py tests/test_bootstrap.py -n 0uv run ruff check .