Feat/storage visibility - #213
Open
Ekyoz wants to merge 3 commits into
Open
Conversation
xaviave
requested changes
Aug 7, 2026
xaviave
left a comment
Contributor
There was a problem hiding this comment.
Manque de tests sur les nouveaux enums utilise par les services ainsi que des tests sur testant des erreurs, des refus etc. essaye au maximum de faire des tests dans chaques categories si possibles (dans le pyproject:pytest ) :
"chaos: marks fault injection tests (Redis outage, gRPC failure simulation)",
"concurrency: marks tests for race conditions and concurrent access",
"contract: marks gRPC proto contract verification tests",
"e2e: marks end-to-end tests requiring full Docker Compose stack",
"edge_case: marks tests for boundary conditions and edge cases",
"flaky: marks known-flaky tests for the quarantine plugin (tests/fixtures/flakiness.py)",
"grpc: marks tests for gRPC service functionality",
"idempotency: marks tests for retry and duplicate request handling",
"integration: marks tests that require external service connections (deselect with '-m \"not integration\"')",
"property: marks property-based tests using Hypothesis",
"regression: marks tests for previously fixed bugs",
"smoke: marks critical path tests that should always pass",
"stability: marks long-running stability and soak tests",
"stress: marks stress/load tests for performance under pressure",
"unit: marks a plain unit test with no other applicable category",
"validation: marks tests for input validation and schema checking",
…gistry access - Added `ChatHistoryTools`, `UserProfileTools`, and `RegistryTools` to enhance agent capabilities. - Updated `pyproject.toml` to include the new optional dependency `agno`. - Introduced new module structure for toolkits under `digitalkin.community.agno.toolkits`. - Enhanced `ModuleServer` to include module type in initialization. - Updated registry models to support new module types and setups. - Improved error handling and logging in registry services. feat(storage): add Visibility field to StorageRecord and expand Scope type - Import and surface `Visibility` enum in `storage_strategy.py`, `default_storage.py`, and `grpc_storage.py` - Add `visibility` field to `StorageRecord` with default `Visibility.UNSPECIFIED` - Deserialize visibility from proto in `GrpcStorage._to_record()` - Deserialize visibility from JSON dict in `DefaultStorage._load_from_file()` - Expand `Scope` literal to include `\"user\"` and `\"organization\"` scopes Signed-off-by: Alexandre <a.tresallet@digitalkin.ai> feat(storage): add ContextStorage enum and circuit-breaker handling - Introduce ContextStorage enum to type storage context values instead of raw strings, resolved via _resolve_context() into concrete storage keys - Add Visibility enum for record read-access scope, decoupled from context-based ownership - Add circuit-breaker fast-fail detection in GrpcStorage to log open-breaker rejections quietly during outages refactor(storage): accept pre-resolved context in DefaultStorage DefaultStorage methods previously accepted a ContextStorage value and resolved it internally via _resolve_context on every call. Since context resolution now happens upstream, storage methods take a plain resolved string context directly, dropping the redundant resolution step and the now-unused ContextStorage import. Signed-off-by: Alexandre <a.tresallet@digitalkin.ai> chore(release): bump version to 1.0.2.dev5 fix(context): Fix context give to search_record for add user/org options Signed-off-by: Alexandre <a.tresallet@digitalkin.ai> chore(release): bump version to 1.0.2.dev6 Signed-off-by: Alexandre <a.tresallet@digitalkin.ai> chore(release): Add changelog for 1.0.2.dev6 and delete some dead code Signed-off-by: Alexandre <a.tresallet@digitalkin.ai> feat(filesystem): add ContextFile scopes (mission/setup/user/organization) Introduce a typed `ContextFile` enum (mirroring the storage `ContextStorage` pattern) replacing the `Literal["mission", "setup"]` context argument on the filesystem service. Adds the two read-only cross-owner scopes USERS and ORGANIZATIONS: `get_file` / `get_files` / `FileFilter` now accept `ContextFile`, and `_context_enum` maps every kind to its wire enum (incl. CONTEXT_USERS / CONTEXT_ORGANIZATIONS / CONTEXT_UNSPECIFIED). Only the kind is sent on the wire; the concrete owner id is resolved server-side. Enum values stay singular so Pydantic coerces existing string call sites. fix(storage): map UNSPECIFIED context to the unspecified wire enum `ContextStorage.UNSPECIFIED` was silently resolved to the mission context (CONTEXT_MISSIONS) instead of being passed through. It now resolves to a `unspecified:` kind marker mapped to CONTEXT_UNSPECIFIED, matching the filesystem service and letting the server apply its default. Public callers are unaffected since the default context stays MISSIONS. chore(release): bump version to 1.0.2.dev7 Signed-off-by: Alexandre <a.tresallet@digitalkin.ai> changelog(1.0.2.dev7): Add changelog file for filesystem change explanations Signed-off-by: Alexandre <a.tresallet@digitalkin.ai>
Ekyoz
force-pushed
the
feat/storage-visibility
branch
from
August 7, 2026 12:49
9481697 to
0efad9f
Compare
…t/storage-visibility # Conflicts: # .bumpversion.toml # pyproject.toml # src/digitalkin/__version__.py # src/digitalkin/services/filesystem/grpc_filesystem.py # src/digitalkin/services/storage/grpc_storage.py # uv.lock
… enum - Replace ContextFile and ContextStorage with a single Context enum in digitalkin.models.services.services - Remove models/services/filesystem.py, now superseded by services.py - Update storage and filesystem strategies (default, grpc) to use the new shared Context type instead of separate per-service enums - Update grpc_filesystem and grpc_storage tests to match the new type - Update 1.0.2.dev6 and 1.0.2.dev7 changelogs to document the rename
xaviave
approved these changes
Aug 7, 2026
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.
No description provided.