chore: add documentation for the weighted graph - #656
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughChangesWeighted authorization graph
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
871dc67 to
c7e8fad
Compare
This comment was marked as outdated.
This comment was marked as outdated.
c7e8fad to
b86b212
Compare
This comment was marked as outdated.
This comment was marked as outdated.
b86b212 to
1ea7618
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/go/graph/README.md`:
- Line 49: Correct the exclusion weight rule in the README statement: when the
base edge reaches the sink, a successful subtract branch must suppress the base
result and produce weight zero; do not describe the result as max(base,
subtract).
- Around line 45-48: Clarify the weight definitions in the README by defining
how outgoing-edge contributions are derived from vertex weights, and revise the
edge monotonicity rule to apply only to edges that contribute to propagation.
Ensure the intersection rule permits a zero vertex weight when an outgoing edge
cannot reach the sink, without contradicting the monotonicity rule; use explicit
operator exceptions if propagation-scoped wording is insufficient.
- Line 27: Update Axiom 4 in the graph README to apply only to represented or
existing source, target, kind, and tupleset-relation combinations, rather than
requiring an edge for every possible combination. Preserve the uniqueness and
condition-accumulation requirements for combinations that do exist.
- Line 15: Update the reachability definition in the graph README to describe an
operator-aware, tuple-valid path rather than any directed path, ensuring it
accounts for tuple resolution and branch rejection required by Axioms 44 and 48.
Revise the later weight rules to use this propagation-valid reachability
definition consistently.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: af6f29a0-42b5-4488-9dac-478a90a5053c
📒 Files selected for processing (1)
pkg/go/graph/README.md
Description
Document some of the rules that govern the weighted authorization graph.
References
Review Checklist
mainSummary by CodeRabbit