-
Notifications
You must be signed in to change notification settings - Fork 0
Tenant Workspace Persistence
Huzefaaa2 edited this page Jul 3, 2026
·
5 revisions
CAVRA R2.2 starts with a public-safe tenant/workspace persistence contract and reference stores.
| Component | Purpose |
|---|---|
TenantWorkspaceStore |
JSON reference store for local tenant and workspace records. |
SQLiteTenantWorkspaceStore |
SQLite reference store for local tenant and workspace records. |
ActivityStore / SQLiteActivityStore
|
Runtime decision and session history can carry and filter by tenant_id and workspace_id. |
ApprovalStore / SQLiteApprovalStore
|
Approval queues and approval history can carry and filter by tenant_id and workspace_id. |
assert_tenant_workspace_scope |
Rejects actor/resource tenant or workspace mismatches. |
build_tenant_persistence_contract |
Publishes required tenant/workspace fields and isolation rules. |
build_tenant_persistence_readiness |
Produces the R2.2 foundation readiness result. |
- Every tenant-scoped record must include
tenant_id. - Every workspace-scoped record must include
tenant_idandworkspace_id. - Actor
tenant_idmust match resourcetenant_id. - Actor
workspace_idmust match resourceworkspace_idwhen the resource is workspace-scoped. - Production Managed or Enterprise deployments should bind this contract to Postgres with row-level security or equivalent tenant predicates.
The current public reference implementation includes scoped helpers for local JSON and SQLite persistence:
-
list_decisions_for_scope,list_sessions_for_scope, andsummarize_sessions_for_scopeon activity stores. -
list_for_scopeon approval stores. - Nullable
tenant_idandworkspace_idSQLite columns with in-place migration for existing local databases.
Production deployments should carry the same predicates into the managed database layer and run cross-tenant negative tests before production readiness gates pass.
python3 scripts/validate_tenant_persistence_readiness.py
python3 -m pytest tests/test_tenancy.py tests/test_activity.py tests/test_approvals.py -qDetailed repo document: Tenant And Workspace Persistence.
CAVRA Field Compass
Before the agent acts, CAVRA asks: who is acting, what will change, what policy applies, and what evidence will prove it?
Before the agent acts, CAVRA asks: who is acting, what will change, what policy applies, and what evidence will prove it?
| Start | Build | Operate | Assure |
|---|---|---|---|
| Quick Start | CLI | Enterprise Guide | AISPM |
| Reader Paths | Policy Syntax | Deployments | Evidence |
| Community | GUI | Troubleshooting | Conclusion |
Textbook home: Before the Agent Acts |
Development archive: development and testing artifacts |
Source repository: github.com/Huzefaaa2/cavra
- Foreword And Reader Paths
- Why CAVRA Exists
- Runtime Authority Model
- Architecture
- Editions
- Install And Deploy
- Community Guide
- Enterprise Guide
- CLI Reference
- GUI And Sandbox
- AISPM Guide
- Policy And Evidence
- Operations And Integrations
- Labs And Use Cases
- Appendices And FAQ
- Policy Language Reference
- Troubleshooting Playbook
- Technology Stack
- Unified Enterprise Roadmap
- Conclusion