Skip to content

Conversation

@tolgaozen
Copy link
Member

@tolgaozen tolgaozen commented Nov 13, 2025

…pth config details

Summary by CodeRabbit

  • Documentation
    • Added a new "Depth Configuration" section describing traversal depth for permission checks, defaults, and examples.
    • Converted and expanded example blocks to show depth usage in checks, entity and subject filtering, and scenario examples.
    • Clarified semantics, guidance, cross-links, and performance notes related to using depth in permission queries.

@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Walkthrough

Updated testing documentation: converted multiple example fences from JavaScript to YAML, added a new "Depth Configuration" section describing depth usage and defaults, expanded example blocks with depth-related fields, and adjusted contextual notes and links to reflect depth-enabled checks and filters.

Changes

Cohort / File(s) Summary
Docs: testing guide
docs/getting-started/testing.mdx
Swapped several example code fences from JavaScript to YAML across Scenarios, Access Check, Entity Filtering, and Subject Filtering. Added a new "Depth Configuration" section with defaults, minimums, usage guidance and examples. Inserted depth fields into example blocks and updated contextual notes and cross-links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single documentation file changed; mostly format conversions and added explanatory content.
  • Review focus:
    • Accuracy and clarity of the Depth Configuration text (defaults, minimums, semantics).
    • Correctness of YAML examples and added depth fields.
    • Consistency of updated notes and cross-links.

Poem

🐇 I swapped my JS hops for YAML trails so deep,
I measure depth where permissions sleep,
Examples bloom and notes grow clear,
A rabbit's cheer for docs we hold dear! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: updating documentation examples to use YAML format and adding depth configuration details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs-update-testing-scenarios

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9081071 and e045643.

📒 Files selected for processing (1)
  • docs/getting-started/testing.mdx (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Analyze (go)
  • GitHub Check: Test with Coverage
  • GitHub Check: Test with Coverage
🔇 Additional comments (2)
docs/getting-started/testing.mdx (2)

179-188: Excellent YAML syntax corrections; previous //' comments have been properly converted to #`.

The conversion from JavaScript-style to valid YAML comments is complete across all examples (checks, entity_filters, and subject_filters). The inline comments are now syntactically correct and properly formatted.

Also applies to: 228-237, 245-253


192-217: Well-structured new Depth Configuration section with clear guidance.

The new section effectively explains the depth parameter, including:

  • Clear depth rules with default (100) and minimum (3) values
  • Practical example demonstrating depth usage in YAML syntax
  • Actionable guidance for when to use different depth values

This addition provides necessary context for users configuring permission checks and filtering operations with depth limits.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/getting-started/testing.mdx (2)

228-237: Replace invalid // YAML comments with # comments in entity_filters example.

Same YAML syntax issue: // is not valid in YAML; use # for comments.

Apply this diff to fix the YAML syntax:

 ```yaml
 entity_filters:
-      - entity_type: "repository" // entity that you want to filter 
-        subject: "user:1" // subject that you want to perform data filtering 
-        depth: 100 // depth limit for permission check (optional, default: 100, minimum: 3)
-        context: null // additional data provided during an access check to be evaluated
+      - entity_type: "repository" # entity that you want to filter 
+        subject: "user:1" # subject that you want to perform data filtering 
+        depth: 100 # depth limit for permission check (optional, default: 100, minimum: 3)
+        context: null # additional data provided during an access check to be evaluated
         assertions: 
           push : ["1", "3", "4", "5"] // IDs of the resources that we expected to return
           edit : []

---

`245-253`: **Replace invalid `//` YAML comments with `#` comments in subject_filters example.**

Same YAML syntax issue: `//` is not valid in YAML; use `#` for comments.


Apply this diff to fix the YAML syntax:

```diff
 ```yaml
 - subject_reference: "user"
         entity: "repository:1"
-        depth: 100 // depth limit for permission check (optional, default: 100, minimum: 3)
-        context: null // additional data provided during an access check to be evaluated
+        depth: 100 # depth limit for permission check (optional, default: 100, minimum: 3)
+        context: null # additional data provided during an access check to be evaluated
         assertions:
-          push : ["1", "43"] // IDs of the users that we expected to return
+          push : ["1", "43"] # IDs of the users that we expected to return
-          edit : ["58"]
+          edit : ["58"]

</blockquote></details>

</blockquote></details>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2159746 and 9081071.

📒 Files selected for processing (1)
  • docs/getting-started/testing.mdx (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Test with Coverage
  • GitHub Check: Analyze (go)
  • GitHub Check: Scan Container for Vulnerabilities
  • GitHub Check: Test with Coverage
🔇 Additional comments (1)
docs/getting-started/testing.mdx (1)

192-217: Depth Configuration section is well-structured and comprehensive.

The new Depth Configuration section clearly explains the depth parameter with defaults, minimums, usage guidelines, and practical examples. Once the YAML syntax issues are fixed, this addition will significantly improve user understanding of how to optimize permission checks.

@tolgaozen tolgaozen merged commit 85b5a3e into master Nov 13, 2025
13 of 14 checks passed
@tolgaozen tolgaozen deleted the docs-update-testing-scenarios branch November 13, 2025 16:55
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