{# Vendored from packages/web/src/governor_web/templates/opportunities/_summary_cards.html and adapted for audit. v0.0.16: dropped every Savings card — "Estimated Savings", "Projected Savings", "Clearing Savings" — because audit doesn't run dry-runs and refuses to surface the existing detection rules' hardcoded-percentage savings figures. Audit (local_runtime_mode = True) now shows 2 cards: Active Opportunities + Query Cost. #} {% set coverage_pct = ((summary.with_solutions_count / summary.active_count) * 100) if summary.active_count else 0 %}

Active Opportunities

!
Current backlog across the project + rule types visible in this workspace.

{{ summary.active_count }}

{{ summary.with_solutions_count }} ready · {{ "%.0f"|format(coverage_pct) }}% coverage {% if summary.clearing_count > 0 %} · {{ summary.clearing_count }} under evaluation {% endif %}

Query Cost

!
Latest visible cost basis for each row, using latest job data or dry-run baseline when available.

{{ summary.total_query_cost | format_usd }}

{% set query_breakdown = [] %} {% if summary.build_query_cost %}{% set _ = query_breakdown.append('Build ' ~ (summary.build_query_cost | format_usd)) %}{% endif %} {% if summary.consumption_query_cost %}{% set _ = query_breakdown.append('Consumption ' ~ (summary.consumption_query_cost | format_usd)) %}{% endif %} {% if summary.other_query_cost %}{% set _ = query_breakdown.append('Query ' ~ (summary.other_query_cost | format_usd)) %}{% endif %} {% if query_breakdown %} {{ query_breakdown | join(' · ') }} {% else %} Per run {% endif %}
{% if not local_runtime_mode %}

Estimated Savings

!
Estimated per-run savings for the visible rows, using the latest execution basis for each row.

{{ summary.total_possible_savings | format_usd }}

{% if summary.total_query_cost > 0 and summary.total_possible_savings > 0 %} {{ "%.0f" | format(summary.total_possible_savings | float / summary.total_query_cost | float * 100) }}% of visible query cost {% else %} Per run {% endif %}
{% endif %} {% if not local_runtime_mode %} {# Projected Savings card — cloud only. Audit (local_runtime_mode) never shows it because the rules' savings numbers are hardcoded-percentage estimates we don't trust enough to display. #}

Projected Savings

!
Net savings projected from detection-rule heuristics across the visible rows.

{{ summary.total_savings | format_usd }}

{% set savings_breakdown = [] %} {% if summary.build_possible_savings %}{% set _ = savings_breakdown.append('Build ' ~ (summary.build_possible_savings | format_usd)) %}{% endif %} {% if summary.consumption_possible_savings %}{% set _ = savings_breakdown.append('Consumption ' ~ (summary.consumption_possible_savings | format_usd)) %}{% endif %} {% if summary.other_possible_savings %}{% set _ = savings_breakdown.append('Query ' ~ (summary.other_possible_savings | format_usd)) %}{% endif %} {% if summary.total_query_cost > 0 and summary.total_savings > 0 %} {{ "%.0f" | format(summary.total_savings | float / summary.total_query_cost | float * 100) }}% of visible query cost {% else %} {% if savings_breakdown %} {{ savings_breakdown | join(' · ') }} {% else %} Dry-run {% endif %} {% endif %}
{% endif %} {% if not local_runtime_mode %}

Clearing Savings

!
Expected savings from opportunities currently in clearing state — fixes applied, waiting for cost data to settle.

{{ summary.clearing_savings | default(0) | format_usd }}

{% if summary.clearing_count > 0 %} {{ summary.clearing_count }} settling {% else %} no clearing opportunities {% endif %}
{% endif %}