Module

contracts.rules_live_blocks

Live-block contract checks.

Validates each@app.live_block(route, block)declaration:

  • live_block_unreachable_route— the declared route is not registered.
  • live_block_unknown— the route's template has no block with that name.

Template is resolved viaroute_templates(populated by filesystem page mounting). Imperative routes without tracked templates skip block-level validation; the route-existence check still runs.

Functions

check_live_blocks 4 list[ContractIssue]
Validate live-block declarations against routes and templates.
def check_live_blocks(live_blocks: dict[tuple[str, str], LiveBlockSpec], router: Router, route_templates: dict[str, str], kida_env: Environment | None) -> list[ContractIssue]
Parameters
Name Type Description
live_blocks dict[tuple[str, str], LiveBlockSpec]
router Router
route_templates dict[str, str]
kida_env Environment | None
Returns
list[ContractIssue]