OOB registry / layout consistency check.
Fails loud at startup when the OOB registry contains blocks (e.g.
shell_actions_oob) that no layout template defines. Without the matching
{% region %} or {% block %}, the registered region is inert — OOB
swaps would silently fail at render time, so reachingapp.check()with
an orphaned registration is almost always a bug.
Severity tiering:
optional=False(default): ERROR. Render-time pre-check would raiseBlockNotFoundErroron a request hitting this layout, so flagging at startup is the earlier, cheaper signal.optional=True: WARNING. Apps that intentionally register regions for some-but-not-all layouts opt in; the render path silently skips them.
Apps that need the pre-0.5.0 behavior can demote globally with
app.override_contract_severity("oob_registry", Severity.WARNING).
contracts.rules_oob_registry
| 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
check_oob_registry_coverage
function
def check_oob_registry_coverage(oob_registry: OOBRegistry | None, layout_templates: list[str], kida_env: Environment | None) -> list[ContractIssue]
Emit ERROR/WARNING issues for OOB blocks absent from all layouts.
For each block in the OOB registry, checks whether at least one layout template defines that block. Non-optional orphans emit ERROR (render would raise); optional orphans emit WARNING (render silently skips).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
oob_registry
|
OOBRegistry | None
|
— | |
layout_templates
|
list[str]
|
— | |
kida_env
|
Environment | None
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/rules_oob_registry.py:1