{% macro method_section(method, scope, confidence_reasons, compact=False) %}
Method & caveats
{% if compact %}

Source

{{ scope.cluster | cluster_display }} · {{ scope.database | cluster_display }} · table {{ scope.table_used }}. Comparison: {{ (method.comparison_type or "") | humanize_comparison or "n/a" }}. Rule-based scorecard from mechanical features only. Missing feature inputs are reported as missing — not scored as safe.

{% else %}

What this report is and isn't

Rule-based scorecard for {{ scope.cluster | cluster_display }} · {{ scope.database | cluster_display }}, built from mechanical features only{% if method.comparison_type %}, compared against {{ method.comparison_type | humanize_comparison | lower }}{% endif %}. It reports what was measured, not why. Missing feature inputs are reported as such — they are not scored as safe.

Schema, source table, and constraints
Schema
{{ method.schema_version }}
{% if method.comparison_type %}
Comparison
{{ method.comparison_type | humanize_comparison }}
{% endif %} {% if method.producer_limit is not none %}
Producer limit
{{ method.producer_limit }} (returned {{ method.result_row_count }}, truncated: {{ method.result_truncated | lower }})
{% endif %}
Tenant / database
{{ scope.cluster | cluster_display }} · {{ scope.database | cluster_display }}
Table
{{ scope.table_used }}
{% if method.interpretation_constraints %}
Constraints
{% for c in method.interpretation_constraints %}{{ c | humanize_constraint }}{% if not loop.last %}; {% endif %}{% endfor %}
{% endif %} {% if confidence_reasons %}
Confidence reasons
{% for r in confidence_reasons %}{{ r | humanize_reason }}{% if not loop.last %}; {% endif %}{% endfor %}
{% endif %}
{% endif %}
{% endmacro %}