language icon indicating copy to clipboard operation
language copied to clipboard

fix: algebaric operation loop should be classified as loop in compile time

Open adriantam opened this issue 5 months ago • 0 comments

Description

If the graph's loop only consists of RewriteEdge or ComputedEdge, classified them as compile time loop instead of runtime loop.

This means the following type of model

model
  schema 1.1
type user

type document
  relations
    define admin: [user]
    define action1: admin and action2 and action3
    define action2: admin and action1 and action3
    define action3: admin and action1 and action2

will be classified as compile time loop instead of runtime loop. This allows us to match the current openfga server behaviour.

References

Review Checklist

  • [ ] I have clicked on "allow edits by maintainers".
  • [ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • [ ] The correct base branch is being used, if not main
  • [ ] I have added tests to validate that the change in functionality is working as expected

adriantam avatar Sep 17 '24 17:09 adriantam