Rename tenant to workspace; teams become workspace folders#8
Merged
Conversation
Replace all uses of the old tenant model with the workspace model: - WhoAmITenant → WhoAmIWorkspace, response field tenant → workspace - ProvisionResponse.tenantId / VerifyResponse.tenantId → workspaceId - /tenant/ path root → /workspace/ (old /tenant/ and /teams/ roots are now removed roots that raise BrainContractError) - Error messages, docstrings, examples, and README updated to match - New tests assert /tenant/ and /teams/ prefixes raise; old passthrough tests replaced with /workspace/ and /workspace/teams/ equivalents
There was a problem hiding this comment.
1 issue found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="README.md">
<violation number="1" location="README.md:259">
P2: Team-folder example path is missing the leading `/`. Copying this path makes it unqualified and can be rewritten to `/private/notes/...` instead of workspace storage.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| | `/private/...` | Private to the calling user | | ||
| | `/tenant/...` | Entire tenant | | ||
| | `/teams/<slug>/...` | That team-space | | ||
| | `/workspace/...` | Entire workspace (use `workspace/teams/<slug>/` for team folders) | |
There was a problem hiding this comment.
P2: Team-folder example path is missing the leading /. Copying this path makes it unqualified and can be rewritten to /private/notes/... instead of workspace storage.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.md, line 259:
<comment>Team-folder example path is missing the leading `/`. Copying this path makes it unqualified and can be rewritten to `/private/notes/...` instead of workspace storage.</comment>
<file context>
@@ -256,18 +256,17 @@ All document paths must end in `.md`. Writable roots:
| `/private/...` | Private to the calling user |
-| `/tenant/...` | Entire tenant |
-| `/teams/<slug>/...` | That team-space |
+| `/workspace/...` | Entire workspace (use `workspace/teams/<slug>/` for team folders) |
-Unqualified paths (no leading `/`) are automatically rewritten to `/private/notes/<slug>.md`. Invalid roots (`/actions/`, `/raw/`, unknown namespaces) raise `BrainContractError` before any network call.
</file context>
Suggested change
| | `/workspace/...` | Entire workspace (use `workspace/teams/<slug>/` for team folders) | | |
| | `/workspace/...` | Entire workspace (use `/workspace/teams/<slug>/` for team folders) | |
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.
Summary
tenantconcept withworkspaceacross code, API surface, and docsteamsare now a folder convention under/workspace/teams/<slug>/, not a separate scope/private/and/workspace/(plus read-only/system/)workspaceAPITest plan
tenantreferencesSummary by cubic
Renamed the “tenant” model to “workspace” across the SDK and API, and moved teams to folders under
/workspace/teams/<slug>/. This is a breaking change that standardizes writable roots to/private/and/workspace/.Refactors
WhoAmITenant→WhoAmIWorkspace; responsetenant→workspace;tenantId→workspaceId./tenant/→/workspace/; removed/teams/as a root. Legacy/tenant/and/teams/now raiseBrainContractError.Migration
/tenant/...→/workspace/...;/teams/<slug>/...→/workspace/teams/<slug>/....tenant→workspace,tenantId→workspaceId,WhoAmITenant→WhoAmIWorkspace./private/or/workspace/; using/teams/or other removed roots will error.Written for commit 2191cb1. Summary will update on new commits.