Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: HasEntrypoints issues #1385 and #1260 #1422

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

miparnisari
Copy link
Member

@miparnisari miparnisari commented Mar 6, 2024

Description

Alternative PR to #1405.

This one only fixes the issues with no refactors.

References

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.65%. Comparing base (d3a0016) to head (1875f5f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1422      +/-   ##
==========================================
+ Coverage   85.62%   85.65%   +0.04%     
==========================================
  Files          85       85              
  Lines        7910     7913       +3     
==========================================
+ Hits         6772     6777       +5     
+ Misses        800      799       -1     
+ Partials      338      337       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@miparnisari miparnisari marked this pull request as ready for review March 6, 2024 01:46
@miparnisari miparnisari requested a review from a team as a code owner March 6, 2024 01:46
pkg/typesystem/typesystem.go Show resolved Hide resolved
pkg/typesystem/typesystem.go Show resolved Hide resolved
pkg/typesystem/typesystem.go Show resolved Hide resolved
@jon-whit
Copy link
Member

jon-whit commented Mar 7, 2024

Nice changes! Looks solid 👍

We'll want to revisit the case, for example:

type user
type employee

type document
    relations
        define editor: [employee]
        define viewer: [user] and editor  

and

type user
type employee

type document
  relations
    define restricted: [employee]
    define viewer: [user] but not restricted

The question is whether or not these should have entrypoints? In terms of semantics, should a relation involving intersection or exclusion have non-zero entrypoints if the two operands do not share at least one overlapping terminal subject type? My intuition tells me that the models above should have 0 entrypoints.

@miparnisari miparnisari merged commit 35854ad into main Mar 7, 2024
13 checks passed
@miparnisari miparnisari deleted the fix-has-entrypoints-fn-v2 branch March 7, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants