Skip to content

Feat/storage visibility - #213

Open
Ekyoz wants to merge 3 commits into
feat/tool-kin-registryfrom
feat/storage-visibility
Open

Feat/storage visibility#213
Ekyoz wants to merge 3 commits into
feat/tool-kin-registryfrom
feat/storage-visibility

Conversation

@Ekyoz

@Ekyoz Ekyoz commented Aug 7, 2026

Copy link
Copy Markdown
Member

No description provided.

@Ekyoz
Ekyoz requested a review from xaviave August 7, 2026 10:34
@Ekyoz Ekyoz self-assigned this Aug 7, 2026
@Ekyoz
Ekyoz deployed to testpypi August 7, 2026 12:11 — with GitHub Actions Active

@xaviave xaviave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Comment thread src/digitalkin/models/services/filesystem.py Outdated
Comment thread src/digitalkin/models/services/storage.py Outdated
Comment thread src/digitalkin/services/storage/grpc_storage.py Outdated
Comment thread src/digitalkin/services/storage/grpc_storage.py Outdated
Comment thread src/digitalkin/services/storage/grpc_storage.py Outdated
…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
Ekyoz force-pushed the feat/storage-visibility branch from 9481697 to 0efad9f Compare August 7, 2026 12:49
…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
@Ekyoz
Ekyoz requested a review from xaviave August 7, 2026 13:56
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants