Skip to content

refactor(schema): drop the retired org/group ownership relations - #1815

Draft
whoAbhishekSah wants to merge 1 commit into
mainfrom
refactor/drop-ownership-relations
Draft

refactor(schema): drop the retired org/group ownership relations#1815
whoAbhishekSah wants to merge 1 commit into
mainfrom
refactor/drop-ownership-relations

Conversation

@whoAbhishekSah

@whoAbhishekSah whoAbhishekSah commented Jul 29, 2026

Copy link
Copy Markdown
Member

Important

Keep as draft — merge only after the stored organization#owner, organization#member, and group#owner relations are cleaned up. SpiceDB rejects a schema that drops a relation while stored data still references it.

What this is

The last step of removing relation-based ownership: #1809 made the schema stop reading the org owner/member relations and the group owner relation, #1812 stopped writing them. This PR removes the declarations themselves, plus the code that only existed to clean up the old relations.

Changes

  • base_schema.zed: app/organization loses its owner and member relations; app/group loses owner. The group member relation stays — roles granted to a group reach its members through it.
  • Removing an org member no longer tries to delete org relations (none can exist); group membership cleanup deletes just the member relation.
  • unlinkGroupFromOrg deletes only the group#org identity link.
  • The e2e relation test now asserts that writing an org owner relation fails — the schema no longer has the relation, so the write is rejected. That locks the retirement in.

No behavior changes: everything here was already unreachable or a no-op after the cleanup.

🤖 Generated with Claude Code

Removes the owner and member relation declarations from app/organization
and the owner relation from app/group. The schema stopped reading them
(#1809) and Frontier stopped writing them (#1812); the per-environment
data cleanup removes the stored tuples. This lands last because SpiceDB
rejects a schema that drops a relation while stored data still uses it.

The group member relation stays: roles granted to a group reach its
members through it.

Also removes the code that only existed to clean up the old tuples:
- RemoveOrganizationMember no longer deletes org relations (none exist);
  group membership cleanup now deletes just the member relation.
- unlinkGroupFromOrg deletes only the group#org identity link.
- The e2e relation test asserts that writing an org owner relation now
  fails instead of asserting it grants nothing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Jul 29, 2026 6:10am

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c03aff5-02fa-4fd5-899d-ca2d8186d9d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 30427276111

Coverage decreased (-0.008%) to 46.893%

Details

  • Coverage decreased (-0.008%) from the base build.
  • Patch coverage: 11 of 11 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 38897
Covered Lines: 18240
Line Coverage: 46.89%
Coverage Strength: 14.37 hits per line

💛 - Coveralls

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.

2 participants