contracts.rules_reactive

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Reactive bus contract checks.

Validates DependencyIndex configuration at app.check() time:

  • Block references point to real template blocks
  • Derivation graph is a DAG (no cycles)
  • Declared emitted paths are registered in the dependency…

Reactive bus contract checks.

Validates DependencyIndex configuration at app.check() time:

  • Block references point to real template blocks
  • Derivation graph is a DAG (no cycles)
  • Declared emitted paths are registered in the dependency index
  • Audience-filtered scopes have connection-aware subscribers

contracts.rules_reactive

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_reactive_block_existence
function
def check_reactive_block_existence(dep_index: DependencyIndex, env: Environment) -> list[ContractIssue]

Verify every BlockRef in the index references a real template block.

Parameters

Name Type Default Description
dep_index DependencyIndex —
env Environment —
check_reactive_derivation_dag
function
def check_reactive_derivation_dag(dep_index: DependencyIndex) -> list[ContractIssue]

Detect cycles in the derivation graph.

Cycles are handled safely at runtime (BFS visited set), but always indicate a configuration error. Surfacing at check time is better than silent infinite-expansion prevention at runtime.

Parameters

Name Type Default Description
dep_index DependencyIndex —
check_reactive_emitted_paths
function
def check_reactive_emitted_paths(dep_index: DependencyIndex, emitted_paths: object) -> list[ContractIssue]

Warn when declared ChangeEvent paths are not registered in the index.

Parameters

Name Type Default Description
dep_index DependencyIndex —
emitted_paths object —
check_reactive_audience_scopes
function
def check_reactive_audience_scopes(audience_scopes: object, connection_scopes: object) -> list[ContractIssue]

Warn when audience-filtered events target scopes without ConnectionInfo.

Parameters

Name Type Default Description
audience_scopes object —
connection_scopes object —

View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/rules_reactive.py:1