Worked Examples
Developer reference for team membership — Workspace
Workspace team membership uses distinct controls for collaboration roles, review participation, and authenticated approval authority. This reference documents the underlying contracts, permission boundaries, and revocation mechanisms, including their limitations.
Application: Workspace
Component: Collaboration Architecture, Shared Review Rooms, Research Approvals, Session Revocation
Document type: Developer reference and acceptance protocol
Source inspected: 957738a1e76aa3347027f6af006c08c5d3db5307 (20 November 2026)
Verification status: Source inspected; companion synthetic checker tested locally; deployed enforcement not verified
Estimated reading time: 22–26 minutes
Team membership has three distinct meanings in Workspace: a browser-local collaboration role, a Review Room invitation, and an authenticated Research approval grant. Only the last of those is a persisted backend authorization grant; treating them as interchangeable would misstate who can access research after a role change.
Goal
Document the source-level membership and approval contracts, then establish an auditable test for the primary requirement: a revoked collaborator cannot perform the protected action, while the research project and its historical evidence remain unchanged. This is narrower than complete offboarding. Full access removal must additionally test account sessions, other grants, local observer capabilities, exported copies, and already-issued attestations.
Scope: Workspace’s inspected implementation, not a speculative organization/team service. No general, server-backed team directory or project membership CRUD API has been established by the inspected collaboration components.
Requirements
- A verified source checkout pinned to the commit recorded above. Capture the exact backend build and running image digest separately if assessing staging or production.
- A disposable test project, separate synthetic owner, editor/reviewer, and unrelated user; use synthetic artifacts and a disposable PostgreSQL database for integration testing.
- Named project ID, owner identity, intended role, approval dimension, grant ID, review scope, retention expectations, and authorized observer capabilities.
- Baseline hashes and revisions for the project, artifacts, and signed approval records. Obtain hashes before changing permissions and again afterward.
- Evidence of authorized access checks through actual authenticated requests. Never use browser-supplied role strings as proof of server authorization.
- No production database migrations, account revocations, or credential changes without a separate approved change plan.
01. Capability and authority map
| Mechanism | Authority and storage | What a grant means | What it does not mean |
|---|---|---|---|
| Collaboration Architecture | Browser-local ledger sc_workspace_collaboration_architecture_v1 |
Descriptive actor, project policy, and locally calculated capabilities | No new server account, tenant membership, project ACL, or backend access |
| Shared Review Rooms | Browser-local ledger sc_workspace_review_rooms_v1 |
Local invitation, review-state capability, frozen scoped snapshot | No automatic email delivery, account creation, or live co-editing |
| Research Approvals (SC-ED-01) | Authenticated backend and PostgreSQL | Owner-issued editor or dimension-specific approval authority |
Not general edit/read access to every private project artifact |
| Session revocation | Restricted host/operator and session-verification layer | Invalidates selected sessions or accounts where enabled | Does not recall downloaded documents or invalidate signed proof in every downstream service without separate checks |
The browser-local controls are documented by the collaboration and Review Room release notes; SC-ED-01 is implemented by a separate authenticated router. Do not combine their role names into one implied permission system. See Collaboration Architecture, Shared Review Rooms and SC-ED-01 backend.
02. Canonical identity and project boundaries
The Collaboration Architecture ownerActorId and actorId identify local descriptive actors. They are not equivalent to the server-resolved Workspace identity. An actor label is not proof of a real person’s identity, and local grants do not authorize private backend project reads.
Authenticated approval routes use require_service_identity, which can resolve an authenticated session, accepted Sustainable Catalyst Identity bearer, or an allowed server-proxy identity path depending on deployment configuration. The authenticated user_key determines the grant owner or caller. A request body must not supply the authoritative acting identity. See security.py and research_approvals.py.
Private Research Projects are independently scoped by owner. A collaboration reviewer grant does not waive the owner check for GET /v1/private-research/reporting-studio/research-projects/api/projects/{project_id}; a different account should still be denied, using the actual route and credentials rather than a synthetic actor string.
03. Browser-local role vocabulary
The Collaboration Architecture helper defines the following roles and capabilities. These are local coordination decisions, not server ACL entries.
| Local role | Capabilities in inspected helper |
|---|---|
owner |
view-copy, comment, propose-change, review-proposals, approve-proposal, export-review, manage-policy |
editor |
view-copy, comment, propose-change, review-proposals, export-review |
contributor |
view-copy, comment, propose-change, export-review |
reviewer |
view-copy, comment, propose-change, review-proposals, export-review |
observer |
view-copy, comment |
In effectiveRole(policy, actorId), an ungranted or revoked actor falls back to observer. removeGrant removes the explicit grant but therefore does not guarantee zero local capabilities. In addition, setGrant is a pure local helper and does not by itself prove that a user acting as an owner made the change; the surrounding interface and audit chain must be assessed. Source: sc-workspace-collaboration-architecture-v1.js.
04. Local membership schemas
The repository contains JSON Schema Draft 2020-12 definitions. The local collaboration policy schema requires schema, id, projectId, ownerActorId and grants, with up to 80 grants; each grant requires actorId and role. The actor schema requires an ID, display name, and role.
{
"schema": "sc-workspace-collaboration-policy/1.0",
"id": "policy-synthetic-01",
"projectId": "project-synthetic-01",
"ownerActorId": "actor-owner-synthetic",
"grants": [{
"actorId": "actor-reviewer-synthetic",
"role": "reviewer",
"grantedAt": "2026-11-20T18:00:00Z",
"grantedByActorId": "actor-owner-synthetic"
}]
}
Synthetic example only. These fields describe a local policy; publishing or importing the JSON does not establish verified identity, server access, or institutional employment. Sources: policy schema and actor schema.
05. Review Room invitation and state contract
Review Rooms have separate roles: owner, editor, reviewer, observer. The invitation schema exposes draft, issued, accepted, declined, revoked. The helper’s roleFor(room, actorId) regards any invitation except declined or revoked as active for the local role lookup. Consequently, an issued invitation already supplies the declared local role before acceptance; this must not be mistaken for identity verification or server authorization.
After revocation, the local role falls back to observer. In the inspected helper the observer retains view-room and export-room, but not comment. A revoked Review Room invitation therefore cannot meet the stronger assertion “no access remains” without separately narrowing the room visibility model and validating exported copies. See Review Room runtime and invitation schema.
Snapshot freezes are explicit operations; comments and review-state transitions are local audit events and do not mutate the canonical project. Export is an explicit disclosure of room data; no revocation mechanism can retroactively remove already downloaded bytes.
06. Authenticated Research approval grants
SC-ED-01 exposes /v1/research-approvals and persists grants and requests separately from browser-local collaboration. The owner can grant editor or approver:scientific, approver:rights, approver:ownership, approver:publication and approver:area-publication. Grants specify a project ID; the code also accepts the special * scope, primarily relevant to area publication. Avoid wildcard scope where a bounded project grant suffices.
An editor grant permits a reviewer to raise an approval request on another owner’s project through the Research approval path; it is not a general private-project file access grant. Approval decisions require the appropriate dimension grant and separate requester and decider, subject to narrowly defined owner confirmation and owner-self-authorization exceptions.
| Method | Path after /v1/research-approvals |
Purpose |
|---|---|---|
| GET | /profile |
Policy and role metadata |
| POST | /grants |
Owner creates or reuses an active role grant |
| GET | /grants |
List grants scoped to authenticated owner or grantee |
| POST | /grants/{grant_id}/revoke |
Owner stamps revocation; does not delete historical request records |
| POST | /grants/{grant_id}/attestation |
Grantee requests signed proof of an active editor grant |
| POST | /requests |
Authorized owner/editor raises a dimension-specific approval request |
| POST | /requests/{approval_id}/decide |
Authenticated eligible decider signs a decision |
| GET | /requests/{approval_id}/record |
Authorized participant retrieves the historical decision record |
Source: backend route definitions. The route list does not constitute proof that a particular deployment has enabled or published these routes.
07. Grant request, response and idempotency
For a disposable staging project, a backend grant request has this shape. Authentication must come from an authorized session or server-side identity integration; granteeUserKey identifies the target, not the caller.
POST /v1/research-approvals/grants
Content-Type: application/json
{
"granteeUserKey": "synthetic-reviewer",
"role": "approver:scientific",
"projectId": "synthetic-project"
}
A successful response contains an item with grantId, ownerScope, grantee, role, projectId, grantedAt and revokedAt, and a created boolean on creation. Reissuing the same owner/grantee/role/project while the exact grant is active returns created: false. It does not mean a previously revoked grant is silently reactivated; creating a new one may yield a new grant ID. Do not infer idempotency across all scopes or after revocation.
The grant request model rejects extra fields. A role outside the allowed enumeration or a self-grant produces a validation error. A foreign or missing project is not exposed to another account. Confirm the actual error response under the relevant identity configuration.
08. Revocation and its precise semantics
Revocation is an authenticated owner operation:
POST /v1/research-approvals/grants/rag_synthetic_123/revoke
# Body: not required by this source-level route contract.
# Use the approved staging auth flow. Never paste tokens into tickets or docs.
The backend sets revoked_at if it was previously null and returns the current grant record; a repeated call keeps the existing timestamp. active_grant filters out rows with revoked_at IS NOT NULL. A new approval decision by a former dimension approver should therefore fail unless another matching active grant or applicable exception exists.
Do not equate this with removing every user capability. The same account may hold a second grant, a wildcard grant, a different session, a local Review Room copy, or an exported dataset. A revoked editor can no longer request a new signed editor attestation through this grant; whether Research independently rejects a previously signed, unexpired attestation requires explicit downstream testing. The attestation source TTL is 3600 seconds, not a guarantee of post-revocation rejection.
09. Signed decision evidence and scientific separation
Research approvals maintain separate scientific, rights, ownership and publication dimensions. A decision record is signed using the Workspace Research export key (Ed25519) and refers to an exact research-object or research-area revision through a subject reference with a SHA-256 digest.
research-object:synthetic-report#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
The authentication source resolves the requester and decider. The decided request is final in the source-level workflow; migration 053 adds a database trigger blocking update or delete of already decided requests. This is stronger evidence for a historical decision than a mutable browser-local comment, but still does not independently establish that a scientific conclusion is correct.
Owner-self-authorization, where separately enabled, requires additional step-up and a written declaration, and its disclosure is explicitly not independent review. See approval migration, signed approval implementation.
10. Session revocation is a separate authority
The source implements a restricted host-side operator command, not a public team administration button. Examples in the module include revoke-session and revoke-user. The command refuses operation where session revocation is not enforced and requires the security schema. It writes durable audit records.
Do not copy a user key or session ID from an unverified browser role. Identity-link and account-level revocation can disrupt access across Workspace and other Sustainable Catalyst services. Use an approved change request, real identity reconciliation, and a rollback plan; do not perform these actions on production to test an article. The existence of the Python command proves only that the capability is implemented in source, not that its production trust chain is enabled.
Source: session_operator.py, session_revocation.py and revocation migration.
Procedure
- Identify the authority: decide whether the record is a local Collaboration policy, Review Room invitation, backend Research approval grant, or actual authenticated session. Do not apply one mechanism’s role semantics to another.
- Define bounded access: project ID, exact actor or authenticated subject, role, approval dimension, object/review scope, expiry, and why the access is necessary. Require separate approval for broad scopes.
- Record the baseline: verify an authorized positive action before revocation; capture grant ID, project revision/fingerprint, artifact digests, signed approval record digests and current session identity. Preserve evidence without sharing raw secrets or research content.
- Revoke through the authoritative layer: for local coordination, remove the explicit grant or revoke the invitation; for an approval grant, call the authorized backend revoke route; for genuine account/session suspension, use the separate approved operator process.
- Re-test from the revoked actor: attempt the exact protected action with the same legitimate identity, and any alternate active grants or previously issued attestation. Test fresh and existing sessions as applicable.
- Re-test retained authority: the project owner should still reach the project and historical records. Compare project revision, project fingerprint, artifact SHA-256 and signed decision record hashes before/after.
- Record residual access: observer fallback, prior exported copies, outstanding signed attestations, wildcard grants and other sessions. Any unresolved access channel prevents a full-offboarding claim.
- Document release evidence: source SHA, deployment image digest, migration state, CI result, immutable sanitized receipts, staging session behavior and independent governance assessment.
11. Authentication and authorization decision sequence
- Resolve the authenticated caller using the source-supported mechanism. Do not accept
roleoractorIdfrom the browser as a substitute for identity. - Find the project under its authoritative owner. Use the same response for a missing project and a foreign project where required, so private identifiers are not exposed.
- Resolve the exact role/dimension/project grant with
revoked_at IS NULL. Account for wildcard*grants explicitly and reject overlapping/ambiguous authority in policy review. - Enforce separation between requester and decider. With SC Identity configured, approval may require fresh identity step-up and exact revision confirmation.
- Persist a typed decision receipt; do not use a successful HTTP code as proof of scientific review, publication permission, or identity robustness.
The actual call path must be tested for each configured authentication mode. Read require_service_identity and may_decide and active_grant before designing a new client.
12. Failure semantics
| Observed response | Likely source-level cause | Next check |
|---|---|---|
401 |
Missing or invalid identity | Authentication mode, session validity and issuer configuration |
403 |
Caller lacks approver role; requester/decider conflict; fresh step-up missing | Grant dimension, active status, authenticated principal, step-up evidence |
404 |
Foreign/missing project; unknown or non-owned grant; inactive editor grant for attestation | Owner-scoped project and grant ID; avoid exposing a foreign identity |
409 |
Same subject/dimension already pending; decision already final; subject revision changed | List existing request and compare immutable subject reference |
422 |
Invalid role, self-grant, malformed subject reference, incomplete decision body | Schema and request validation, not automatic retry |
503 |
Configured identity/signing/session dependency unavailable | Dependency health and explicit feature gates; fail closed where required |
Codes vary by route and deployment. Treat this matrix as source-informed triage, not a substitute for observing the exact request, server build, and sanitized error details.
13. Regression test: local roles and Review Rooms
Run the companion source-helper-smoke.js against an actual checkout pinned to the same commit. It checks local helper behavior; it does not modify project data or authenticate to the backend.
git -C "$SC_WORKSPACE_REPO" rev-parse HEAD
# Expected for this article:
# 957738a1e76aa3347027f6af006c08c5d3db5307
SC_WORKSPACE_REPO=/path/to/verified/workspace \
node source-helper-smoke.js
Expected behavioral observations: a local reviewer loses review-proposals after removeGrant yet retains view-copy through observer fallback; an issued Review Room invitation already has the reviewer role; revocation removes commenting while the observer can still view and export the room; canonical project contents remain unchanged. These are exact-source expectations, not claims of server permissions.
14. Regression test: authenticated Research approvals
The repository’s own tests provide the strongest immediately available implementation starting point. Run them only with synthetic records and a disposable PostgreSQL database. The test module explicitly skips database integration tests when SC_WORKSPACE_DATABASE_URL is not PostgreSQL; a green test run with skips is not evidence of route behavior.
cd /path/to/verified/workspace/backend
python -m pytest -q -rs tests/test_research_approvals_sc_ed01.py
# For full integration, an operator must provide a DISPOSABLE PostgreSQL test database
# and verify that no integration tests were skipped.
python -m pytest -q -rs tests/test_rhprod05_session_revocation.py
python -m pytest -q -rs tests/test_sc_research_project01_project_workspace.py
Key upstream cases include test_revoked_grant_cannot_decide_and_rejection_is_signed, test_refusals, test_signed_record_carries_authenticated_actors, and test_projects_are_isolated_between_accounts. Their existence is confirmed by source inspection; these repository tests were not executed for this article.
15. Revocation verification matrix
| Test | Expected | Claim supported |
|---|---|---|
Owner grants approver:scientific to a separate reviewer |
Allowed before revocation | Role action is reachable |
| Owner revokes exact grant and reviewer attempts same decision | Denied with the same authenticated subject | Future dimension-specific action denied |
| Reviewer requests new signed editor attestation after editor grant is revoked | Inactive grant rejected | No fresh proof from this grant |
| Previously issued signed editor attestation is presented to Research | Independent downstream policy result recorded | Outstanding-proof risk measured; not assumed |
| Other active/wildcard grants inspected | No unintended alternative privilege | Effective authorization bounded |
| Revoked local/room role re-evaluated | Observer fallback reported | Local capabilities accurately described |
| Owner views project, artifacts, and signed historical approvals | Unchanged fingerprints and counts | Evidence preserved |
| Foreign account attempts owner-only read/write | Denied without resource disclosure | Cross-owner isolation |
| Old/new signed sessions checked after authorized account revocation | Results captured per session and token scope | Session revocation semantics |
| Prior exported or cached files inventoried | Residual material explicitly listed | No false claim of retroactive deletion |
16. Evidence receipt and offline checker
The companion membership_evidence.py accepts an intentionally synthetic evidence packet that records a grant, protected-action before/after probes, and project integrity evidence. It validates structure and consistency only; it neither invokes the Workspace API nor authenticates an actor.
cd /path/to/extracted/article-kit
python membership_evidence.py synthetic-revocation-evidence.json \
--out synthetic-validator-output.json
python -m unittest -v test_membership_evidence
Expected synthetic result: result: "structural_pass" with deployedAuthorizationVerified: false, fullOffboardingVerified: false and independentReviewVerified: false. For real acceptance, replace synthetic inputs with a separate, privacy-reviewed and authenticated staging receipt; do not relabel it as production evidence without an authorized production exercise.
Before/after equality is meaningful only where the comparison uses authoritative versions and complete artifact inventories. SHA-256 demonstrates byte continuity, not source legality, scientific correctness, or proof of identity.
Symptoms
- A former reviewer can still open a copied review package after local role removal.
- A revoked Review Room invitation remains visible as an observer; the interface appears to imply complete access removal.
- A reviewer can act on an issued invitation before marking it accepted in the local helper.
- A Research approval decision succeeds after the expected grant was revoked, or fails despite the owner expecting a different role.
- An already-issued signed attestation is accepted by a downstream Research workflow after its issuing grant was revoked.
- Project documents or historical approval records appear changed after a membership operation.
- A test suite passes but skipped every PostgreSQL integration test.
Cause
Common causes are authority confusion (browser-local grants used as server authorization), fallback role semantics (observer still has capabilities), reliance on an invitation status without verified identity, an outstanding token or signed attestation, a broader grant that survives a narrower revocation, a stale client view, or incorrect test isolation. A missing/incorrect migration or a disabled enforcement setting may independently prevent reliable session revocation.
Scientific-content loss is a separate incident. If project fingerprints or immutable approval records differ, stop the membership operation and diagnose data mutation or a faulty comparison before making further changes.
Troubleshooting
- Local role removed but viewing remains: inspect
effectiveRole/roleFor; check the observer capability table. Do not file a server-security victory based on local fallback. - Invitation behaves as accepted: inspect whether status is
issued; the inspected helper counts it as locally role-bearing. Require a separate accepted-only policy if that is the intended product behavior, with regression tests. - Backend action still succeeds: confirm the exact authenticated principal, project, approval dimension, all matching active grants (including
*), and whether the operation used an older signed record or a fresh grant lookup. - Revoked person retains session access: distinguish grant revocation from operator session revocation. Verify the deployment’s revocation enforcement configuration and actual session-verification path.
- Approval record missing or altered: preserve database snapshots, signed receipt hashes, and audit records. Inspect migration
053, not only the API response. - Tests silently skip: inspect
pytest -rs, PostgreSQL test database metadata, and the count of executed integration cases.
Resolution
Choose the smallest correction supported by the authoritative layer. For local review coordination, remove the intended invitation or grant while explicitly disclosing observer fallback; never claim account suspension. For Research publishing, revoke the authenticated grant, verify denial of new privileged decisions, and inspect any other active scope. For an incident requiring genuine account access termination, escalate to the restricted session/identity operator with approved authorization and preservation requirements.
Do not delete or re-create the canonical project to remove a reviewer. Retain historical approval records and a copy of sanitized before/after evidence. Where signed attestations cannot be revoked immediately, record the exposure window and require an independently verified downstream check or compensating control.
Verification
Mark the acceptance requirement verified only when all of the following are evidenced in the target deployment:
- The revoked authenticated identity is denied the exact protected action, including any alternative grants and relevant issued proofs.
- Owner and unrelated-account checks demonstrate correct project isolation; no unauthorized content appears in responses.
- Project revision/fingerprint, all in-scope artifact digests, and historical signed approval records remain intact.
- Existing sessions, local observer rights, issued invitations, downloaded copies and downstream attestation reuse are assessed rather than ignored.
- Evidence identifies source commit, image digest, deployed feature settings, database migration head, CI run, test identities, scope and observation time.
- Independent reviewer signs off on the authorization conclusions and on the distinction between scientific validity and software access controls.
A partial pass may support approval grant revoked or privileged decision denied. It does not support the blanket statement revoked members lose all access.
17. Source and deployment verification gates
| Evidence | Available for this article | Required before deployed-verified status |
|---|---|---|
| Source SHA and file anchors | Inspected at 957738a1... |
Confirm deployed image is built from this SHA or reconcile differences |
| Local collaborator helper tests | Smoke harness supplied; syntax checked only | Execute against matching checkout and record result |
| Companion synthetic packet checker | Executed locally; 37 unit tests passed | Keep separate from actual authorization evidence |
| SC-ED-01 PostgreSQL integration | Repository test code inspected; not executed | Run on disposable PostgreSQL and report no relevant skips |
| Staging session/identity | Not inspected | Validate owner, reviewer, foreign user, revoked proof and signed response |
| Migration 053 / session revocation schema | Migration source inspected | Verify applied migration inventory, recovery plan, database backup |
| Production revocation | Not tested | Approved change window and independent acceptance receipt |
Do not record a supported WordPress release version or “last verified” date from the module name, a GitHub commit date, or this synthetic fixture. Those metadata fields require deployment-specific evidence.
18. Data minimization and audit integrity
Keep only opaque project references, grant IDs, roles, timestamps, policy versions, sanitized status codes, digest values, and independently verifiable receipt IDs in support tickets. Avoid email addresses, full user identifiers, session tokens, authentication headers, raw reviewer comments, private research material, and unredacted approval payloads. If an incident needs a forensic export, use the institution’s authorized restricted evidence repository and retention procedure.
Preserve both prior and subsequent states. A current grant list cannot independently prove when access was originally granted or whether an older approval was valid at decision time. A revocation timestamp establishes a recorded event; successful denial under the same authenticated context establishes enforcement.
19. Independent scientific and institutional assessment
Team membership must preserve legitimate research responsibility. Check whether the approving person was independent of the requester, understood the evidence under review, held the appropriate disciplinary competence, and examined the exact scientific revision. A signed approval can establish who authorized a decision and what record they referenced; it cannot independently validate an experimental result.
Approval records may remain historically valid after a reviewer’s present-day access is revoked. Preserve that chronology and distinguish retrospective review validity from current access eligibility. Also retain ownership transfers, exclusions, competing interests, incomplete data and unresolved rights issues in the institution’s decision record.
20. Implementation risks requiring explicit follow-up
- Local fallback: local actor and Review Room helpers currently treat missing/revoked membership as observer; observer capabilities remain.
- Invitation transition: a freshly issued Review Room invitation is used for local role resolution even before acceptance.
- Attestation reuse: editor attestations are signed for up to 3,600 seconds; downstream handling after grant revocation was not verified here.
- Granularity: an approval-grant endpoint is not a unified project-team ACL, document permission or account directory.
- Integrity vs authority: a local FNV-1a fingerprint used for portable packages is not cryptographic identity or tamper-proof evidence; signed backend approval records have different guarantees.
- Provenance: keeping research bytes unchanged does not prove the methods or conclusions were scientifically reviewed.
Technical references
- Authenticated grants, approval decisions, signed attestations
- Approval grants, requests, finality trigger
- Approval unit and PostgreSQL integration tests
- Authenticated identity and route policy
- Restricted operator session revocation
- Durable session revocation checks
- Revocation unit tests
- Local collaboration runtime
- Review Room invitation runtime
- Collaboration policy schema
- Review invitation schema
- Portable response/revision checks
- Private project owner-isolation integration tests
Source baseline: 957738a1e76aa3347027f6af006c08c5d3db5307; reference version is a source commit, not a verified production release. References are commit-pinned to make later changes auditable.
