Contract checks for per-record access grant usage.
contracts.rules_access_grants
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Detect scalar grant checks inside iteration (N+1 list-render trap).
Flag per-row scalarcheck_accesscalls inside handler loops.
List fragments should useaccessible_to() (set-based)
instead of callingcheck_accessonce per row. Env-aware like
…
_ScalarAccessInLoopFinder
class
Detect scalar grant checks inside iteration (N+1 list-render trap).
check_access_grant_scalar_loops
function
def check_access_grant_scalar_loops(router: Router, config: Any) -> list[ContractIssue]
Flag per-row scalarcheck_accesscalls inside handler loops.
List fragments should useaccessible_to() (set-based)
instead of callingcheck_accessonce per row. Env-aware like
sse_auth_gate: ERROR in production, WARNING in staging, silent in
development.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
router
|
Router
|
— | |
config
|
Any
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/rules_access_grants.py:1