test: migrate TestCRUD off subject IDs - #458
Conversation
Ory Network rejects relation tuples carrying a subject_id:
rpc error: code = InvalidArgument
desc = subject_id is not supported; please migrate to subject sets
The rejection is unconditional — plain strings, UUIDs and namespaced
IDs are all refused, under legacy and OPL namespaces alike — so the
tuples this test writes are subject sets now.
The `ory is allowed s r n o1` assertion is dropped rather than adapted.
`is allowed` takes a plain subject and sends it as a subject_id, so the
server rejects the check with the same error: the command is unusable
against Ory Network, not merely deprecated, and no reachable tuple
makes it answer true — every permission chain has to terminate in a
subject ID. Asserting the broken behaviour here would only cement it,
so the comment records what happened and the command needs its own fix.
Note that CI on this branch is expected to stay red until #457 lands:
master's browser login is rate limited, and the packages that fail on
that are unrelated to this change. The failure fixed here has been
present all along and only surfaces in the runs where relationtuples
gets past its login at all.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tg5VWFUb7824qkrooUdvBA
|
Warning Review limit reached
Next review available in: 34 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
|
Folded back into #457 so the two land together and one PR can go green. Split out, neither PR could pass on its own: #457 unmasks this #457 also carries a real fix for Branch |
What
TestCRUDincmd/cloudx/relationtuplesfails against Ory Network:The tuples it writes now use subject sets.
Scope of the rejection
I probed this before changing anything — it is not a data-shape quirk in the test:
"s"(plain string)id: 0)user:alice"s"update opl)So writing a
subject_idis refused unconditionally, under both namespace kinds.The dropped assertion
ory is allowed s r n o1is removed rather than adapted, because the command itself no longer works against Ory Network. It takes a plain subject and sends it as asubject_id, so the check is rejected with the same error:And no reachable configuration makes it answer
true: a subject-set tuple grants access to the members of a set, membership can only be expressed by a tuple whose subject is a plain ID, and that is exactly what is refused. Every permission chain has to terminate in a subject ID.Asserting
{"allowed":false}would have encoded a broken command as expected behaviour, so the test records what happened in a comment instead.ory is allowedbeing unusable against Ory Network looks like a real CLI bug and wants its own issue — flagging rather than filing, since the right fix depends on whether the server change is intended.Why this is separate
This failure predates the branch it was found on and is unrelated to it. It was invisible because the rate limiting fixed in #457 killed
relationtuplesinTestMainbeforeTestCRUDever ran, which is why it shows up in only some of master's red runs.CI here is expected to stay red until #457 lands — master's browser login is rate limited, and the packages that fail on that have nothing to do with this change. Verified locally instead:
TestCRUDpasses, and so does the wholerelationtuplespackage (34s).🤖 Generated with Claude Code
https://claude.ai/code/session_01Tg5VWFUb7824qkrooUdvBA