Skip to content

feat: fix enforcement failure when renaming domain parameter from 'dom' to arbitrary names - #1611

Merged
hsluoyz merged 5 commits into
masterfrom
copilot/fix-domain-token-renaming-issue
Dec 21, 2025
Merged

feat: fix enforcement failure when renaming domain parameter from 'dom' to arbitrary names#1611
hsluoyz merged 5 commits into
masterfrom
copilot/fix-domain-token-renaming-issue

Conversation

Copilot AI commented Dec 20, 2025

Copy link
Copy Markdown
Contributor

fix: #1606

Copilot AI self-assigned this Dec 20, 2025
@CLAassistant

CLAassistant commented Dec 20, 2025

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hsluoyz
hsluoyz marked this pull request as ready for review December 20, 2025 13:27
Copilot AI and others added 3 commits December 20, 2025 13:34
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix enforcement result issue when renaming domain token Fix enforcement failure when renaming domain parameter from 'dom' to arbitrary names Dec 20, 2025
Copilot AI requested a review from hsluoyz December 20, 2025 13:41
@hsluoyz

hsluoyz commented Dec 20, 2025

Copy link
Copy Markdown
Member

@copilot fix linter CI error:

<html>
<body>
<!--StartFragment--><div class="mt-1 mb-3 px-3" style="box-sizing: border-box; margin-top: 4px !important; margin-bottom: 16px !important; padding-right: 16px !important; padding-left: 16px !important; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Noto Sans&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div class="mx-0 mx-md-1" style="box-sizing: border-box; margin-right: 4px !important; margin-left: 4px !important;"><h2 class="text-bold h4" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; font-size: 16px !important; font-weight: 600 !important;">Annotations</h2><div class="color-fg-muted text-small" style="box-sizing: border-box; color: rgb(89, 99, 110) !important; font-size: 12px !important;">2 errors and 2 warnings</div></div></div>
golangciissues found
--
golangci: enforcer.go#L513`if len(assertion.Tokens) > 2` has complex nested blocks (complexity: 7) (nestif)

<!--EndFragment-->
</body>
</html>Annotations
2 errors and 2 warnings
[golangci](https://github.com/casbin/casbin/actions/runs/20395176569/job/58610115355#step:4:27)
issues found
[golangci: enforcer.go#L513](https://github.com/casbin/casbin/pull/1611/files#annotation_43246857045)
`if len(assertion.Tokens) > 2` has complex nested blocks (complexity: 7) (nestif)

Extract domain matching logic into separate helper functions to reduce
nested if complexity from 7 to acceptable levels. This maintains the
same functionality while improving code readability.

Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>

Copilot AI commented Dec 20, 2025

Copy link
Copy Markdown
Contributor Author

@copilot fix linter CI error:

...

Fixed in 5e67335. Refactored the domain token detection logic into separate helper functions (getDomainTokens() and registerDomainMatchingFunc()) to reduce the nestif complexity from 7 to acceptable levels. All tests still pass.

@github-actions

Copy link
Copy Markdown

Benchmark Comparison

Comparing base branch (4d32aaf)
vs PR branch (5e67335)

goos: linux
goarch: amd64
pkg: github.com/casbin/casbin/v3
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │     sec/op     │    sec/op     vs base                │
CachedRaw-4                                          14.14n ± ∞ ¹   14.14n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedBasicModel-4                                   172.1n ± ∞ ¹   168.0n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModel-4                                    169.9n ± ∞ ¹   169.3n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModelSmall-4                               185.7n ± ∞ ¹   195.4n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModelMedium-4                              201.0n ± ∞ ¹   207.1n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModelLarge-4                               163.3n ± ∞ ¹   170.2n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModelWithResourceRoles-4                   173.5n ± ∞ ¹   170.9n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModelWithDomains-4                         181.2n ± ∞ ¹   180.7n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedABACModel-4                                    2.776µ ± ∞ ¹   2.637µ ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedKeyMatchModel-4                                190.0n ± ∞ ¹   183.0n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModelWithDeny-4                            171.4n ± ∞ ¹   169.9n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedPriorityModel-4                                169.5n ± ∞ ¹   171.1n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedWithEnforceContext-4                           311.5n ± ∞ ¹   290.0n ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedRBACModelMediumParallel-4                      220.2n ± ∞ ¹   226.3n ± ∞ ¹       ~ (p=1.000 n=1) ³
HasPolicySmall-4                                     518.5n ± ∞ ¹   508.9n ± ∞ ¹       ~ (p=1.000 n=1) ³
HasPolicyMedium-4                                    529.8n ± ∞ ¹   572.1n ± ∞ ¹       ~ (p=1.000 n=1) ³
HasPolicyLarge-4                                     578.8n ± ∞ ¹   597.8n ± ∞ ¹       ~ (p=1.000 n=1) ³
AddPolicySmall-4                                     537.1n ± ∞ ¹   529.9n ± ∞ ¹       ~ (p=1.000 n=1) ³
AddPolicyMedium-4                                    729.7n ± ∞ ¹   723.7n ± ∞ ¹       ~ (p=1.000 n=1) ³
AddPolicyLarge-4                                     1.257µ ± ∞ ¹   1.293µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RemovePolicySmall-4                                  526.0n ± ∞ ¹   507.2n ± ∞ ¹       ~ (p=1.000 n=1) ³
RemovePolicyMedium-4                                 579.1n ± ∞ ¹   573.6n ± ∞ ¹       ~ (p=1.000 n=1) ³
RemovePolicyLarge-4                                  649.4n ± ∞ ¹   646.8n ± ∞ ¹       ~ (p=1.000 n=1) ³
Raw-4                                                14.18n ± ∞ ¹   14.18n ± ∞ ¹       ~ (p=1.000 n=1) ²
BasicModel-4                                         3.599µ ± ∞ ¹   3.477µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModel-4                                          5.377µ ± ∞ ¹   5.313µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/small-4                               51.65µ ± ∞ ¹   52.09µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/medium-4                              546.7µ ± ∞ ¹   528.6µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/large-4                               5.991m ± ∞ ¹   6.158m ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSmall-4                                     62.22µ ± ∞ ¹   62.52µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelMedium-4                                    594.5µ ± ∞ ¹   582.3µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelLarge-4                                     6.146m ± ∞ ¹   6.007m ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithResourceRoles-4                         5.231µ ± ∞ ¹   4.930µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDomains-4                               5.042µ ± ∞ ¹   4.845µ ± ∞ ¹       ~ (p=1.000 n=1) ³
ABACModel-4                                          2.763µ ± ∞ ¹   2.639µ ± ∞ ¹       ~ (p=1.000 n=1) ³
ABACRuleModel-4                                      4.203m ± ∞ ¹   4.090m ± ∞ ¹       ~ (p=1.000 n=1) ³
KeyMatchModel-4                                      6.044µ ± ∞ ¹   5.732µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDeny-4                                  6.818µ ± ∞ ¹   6.684µ ± ∞ ¹       ~ (p=1.000 n=1) ³
PriorityModel-4                                      4.177µ ± ∞ ¹   3.947µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDomainPatternLarge-4                    13.46µ ± ∞ ¹   13.78µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerSmall-4                                   73.69µ ± ∞ ¹   73.77µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerMedium-4                                  751.6µ ± ∞ ¹   759.5µ ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerLarge-4                                   9.077m ± ∞ ¹   8.990m ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithPatternLarge-4                     329.4m ± ∞ ¹   324.9m ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithDomainPatternLarge-4               12.06m ± ∞ ¹   12.50m ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithPatternAndDomainPatternLarge-4     331.9m ± ∞ ¹   335.4m ± ∞ ¹       ~ (p=1.000 n=1) ³
HasLinkWithPatternLarge-4                            1.112µ ± ∞ ¹   1.120µ ± ∞ ¹       ~ (p=1.000 n=1) ³
HasLinkWithDomainPatternLarge-4                      516.6n ± ∞ ¹   513.9n ± ∞ ¹       ~ (p=1.000 n=1) ³
HasLinkWithPatternAndDomainPatternLarge-4            1.109µ ± ∞ ¹   1.121µ ± ∞ ¹       ~ (p=1.000 n=1) ³
ConcurrentHasLinkWithMatching-4                      2.126µ ± ∞ ¹   2.150µ ± ∞ ¹       ~ (p=1.000 n=1) ³
geomean                                              5.480µ         5.446µ        -0.62%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05

                                                 │ base-bench.txt │             pr-bench.txt              │
                                                 │      B/op      │     B/op       vs base                │
CachedRaw-4                                           0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedBasicModel-4                                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModel-4                                     104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelSmall-4                                104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMedium-4                               104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelLarge-4                                96.00 ± ∞ ¹     96.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithResourceRoles-4                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDomains-4                          120.0 ± ∞ ¹     120.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedABACModel-4                                   1.507Ki ± ∞ ¹   1.504Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
CachedKeyMatchModel-4                                 152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDeny-4                             104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedPriorityModel-4                                 104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedWithEnforceContext-4                            240.0 ± ∞ ¹     240.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMediumParallel-4                       105.0 ± ∞ ¹     105.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicySmall-4                                      150.0 ± ∞ ¹     150.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyMedium-4                                     157.0 ± ∞ ¹     157.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyLarge-4                                      165.0 ± ∞ ¹     165.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicySmall-4                                      152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyMedium-4                                     170.0 ± ∞ ¹     170.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyLarge-4                                      413.0 ± ∞ ¹     469.0 ± ∞ ¹       ~ (p=1.000 n=1) ³
RemovePolicySmall-4                                   166.0 ± ∞ ¹     166.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyMedium-4                                  174.0 ± ∞ ¹     173.0 ± ∞ ¹       ~ (p=1.000 n=1) ³
RemovePolicyLarge-4                                   181.0 ± ∞ ¹     181.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
Raw-4                                                 0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
BasicModel-4                                        1.476Ki ± ∞ ¹   1.473Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModel-4                                         2.023Ki ± ∞ ¹   2.015Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/small-4                              19.79Ki ± ∞ ¹   19.86Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/medium-4                             187.3Ki ± ∞ ¹   187.1Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/large-4                              1.816Mi ± ∞ ¹   1.811Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSmall-4                                    19.91Ki ± ∞ ¹   19.98Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelMedium-4                                   190.1Ki ± ∞ ¹   190.1Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelLarge-4                                    1.844Mi ± ∞ ¹   1.844Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithResourceRoles-4                        2.676Ki ± ∞ ¹   2.668Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDomains-4                              1.789Ki ± ∞ ¹   1.781Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
ABACModel-4                                         1.502Ki ± ∞ ¹   1.497Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
ABACRuleModel-4                                     1.267Mi ± ∞ ¹   1.268Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
KeyMatchModel-4                                     3.002Ki ± ∞ ¹   2.992Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDeny-4                                 2.428Ki ± ∞ ¹   2.418Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
PriorityModel-4                                     1.726Ki ± ∞ ¹   1.719Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDomainPatternLarge-4                   8.487Ki ± ∞ ¹   8.493Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerSmall-4                                  11.67Ki ± ∞ ¹   11.68Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerMedium-4                                 123.0Ki ± ∞ ¹   123.0Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerLarge-4                                  1.287Mi ± ∞ ¹   1.287Mi ± ∞ ¹       ~ (p=1.000 n=1) ²
BuildRoleLinksWithPatternLarge-4                    86.04Mi ± ∞ ¹   86.19Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithDomainPatternLarge-4              4.491Mi ± ∞ ¹   4.497Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithPatternAndDomainPatternLarge-4    87.65Mi ± ∞ ¹   87.74Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
HasLinkWithPatternLarge-4                             177.0 ± ∞ ¹     177.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithDomainPatternLarge-4                       80.00 ± ∞ ¹     80.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithPatternAndDomainPatternLarge-4             177.0 ± ∞ ¹     177.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
ConcurrentHasLinkWithMatching-4                       622.0 ± ∞ ¹     622.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                                         ⁴                  +0.20%               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │   allocs/op    │  allocs/op    vs base                │
CachedRaw-4                                           0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedBasicModel-4                                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModel-4                                     4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelSmall-4                                4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMedium-4                               4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelLarge-4                                3.000 ± ∞ ¹    3.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithResourceRoles-4                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDomains-4                          4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedABACModel-4                                     18.00 ± ∞ ¹    18.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedKeyMatchModel-4                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDeny-4                             4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedPriorityModel-4                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedWithEnforceContext-4                            5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMediumParallel-4                       4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicySmall-4                                      6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyMedium-4                                     6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyLarge-4                                      7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicySmall-4                                      6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyMedium-4                                     7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyLarge-4                                      9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicySmall-4                                   7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyMedium-4                                  7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyLarge-4                                   8.000 ± ∞ ¹    8.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
Raw-4                                                 0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
BasicModel-4                                          17.00 ± ∞ ¹    17.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModel-4                                           35.00 ± ∞ ¹    35.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSizes/small-4                                480.0 ± ∞ ¹    480.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSizes/medium-4                              4.829k ± ∞ ¹   4.828k ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/large-4                               48.28k ± ∞ ¹   48.14k ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSmall-4                                      615.0 ± ∞ ¹    615.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelMedium-4                                    6.018k ± ∞ ¹   6.018k ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelLarge-4                                     60.32k ± ∞ ¹   60.31k ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithResourceRoles-4                          28.00 ± ∞ ¹    28.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDomains-4                                25.00 ± ∞ ¹    25.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACModel-4                                           17.00 ± ∞ ¹    17.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACRuleModel-4                                      40.09k ± ∞ ¹   40.09k ± ∞ ¹       ~ (p=1.000 n=1) ²
KeyMatchModel-4                                       37.00 ± ∞ ¹    37.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDeny-4                                   49.00 ± ∞ ¹    49.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
PriorityModel-4                                       22.00 ± ∞ ¹    22.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDomainPatternLarge-4                     72.00 ± ∞ ¹    72.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerSmall-4                                    797.0 ± ∞ ¹    797.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerMedium-4                                  8.741k ± ∞ ¹   8.741k ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerLarge-4                                   89.74k ± ∞ ¹   89.74k ± ∞ ¹       ~ (p=1.000 n=1) ²
BuildRoleLinksWithPatternLarge-4                     3.600M ± ∞ ¹   3.600M ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithDomainPatternLarge-4               145.2k ± ∞ ¹   145.2k ± ∞ ¹       ~ (p=1.000 n=1) ²
BuildRoleLinksWithPatternAndDomainPatternLarge-4     3.679M ± ∞ ¹   3.679M ± ∞ ¹       ~ (p=1.000 n=1) ³
HasLinkWithPatternLarge-4                             13.00 ± ∞ ¹    13.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithDomainPatternLarge-4                       5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithPatternAndDomainPatternLarge-4             13.00 ± ∞ ¹    13.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
ConcurrentHasLinkWithMatching-4                       21.00 ± ∞ ¹    21.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                                         ⁴                 -0.01%               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

🤖 This comment will be automatically updated with the latest benchmark results.

@hsluoyz hsluoyz changed the title Fix enforcement failure when renaming domain parameter from 'dom' to arbitrary names feat: fix enforcement failure when renaming domain parameter from 'dom' to arbitrary names Dec 21, 2025
@hsluoyz
hsluoyz merged commit b40e29c into master Dec 21, 2025
9 of 11 checks passed
hsluoyz added a commit that referenced this pull request Dec 21, 2025
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.

[Bug] Renaming the domain token name from 'dom' to 'dom1' unexpectedly alters enforcement result

3 participants