{# Shared solution presentation used by opportunity detail and admin solutions pages. Expects: sol (solution view model) create_pr_route_prefix (optional, defaults to /app) #} {% set create_pr_prefix = create_pr_route_prefix | default('/app') %} {% set compact_solution_notes = compact_solution_notes | default(false) %}

Solution v{{ sol.version_number }}

{% if sol.file_path %}

Target File

{{ sol.file_path }}

{% endif %}
{% with trust_tier=sol.trust_tier, template_name=sol.template_name, summary=None %} {% include "components/trust_badge.html" %} {% endwith %} {% if sol.local_build_execution_mode %} {{ sol.local_build_execution_mode.title }} {% endif %}
{% if sol.resolution_category == 'dbt_project_change' and sol.diff_lines %} {% with solution_id=sol.id, diff_lines=sol.diff_lines, compiled_original=sol.compiled_original, compiled_original_label=sol.compiled_original_label, compiled_modified=sol.compiled_modified, dry_run_original=sol.dry_run_original, dry_run_modified=sol.dry_run_modified, verification_sql=sol.verification_sql, verification_profile=sol.verification_profile, verification_output_mode=sol.verification_output_mode, verification_source_label=sol.verification_source_label, verification_warnings=sol.verification_warnings, verification_unavailable_reason=sol.verification_unavailable_reason, file_path=None %} {% include "components/code_viewer.html" %} {% endwith %} {% if (sol.explanation or sol.repository) and not compact_solution_notes %}

Notes

{% if sol.explanation %}

{{ sol.explanation }}

{% endif %} {% if sol.repository %}

{{ sol.repository }} {% if sol.commit_sha %} · {{ sol.commit_sha[:8] }}{% endif %}

{% endif %}
{% endif %} {% if (sol.opp_status == 'active' or (sol.local_execution_mode and sol.opp_status == 'pr_pending')) and sol.file_path and sol.config_id and sol.opp_id %} {% if sol.local_apply_enabled %}

Writes the generated change to {{ sol.file_path }} inside {{ sol.local_project_path }}. {% if sol.local_build_execution_mode %} {{ sol.local_build_execution_mode.description }} {% endif %}

{% elif sol.local_execution_mode %}

Local working tree not connected yet

Set the dbt project folder on this project configuration to enable Apply to Working Tree for {{ sol.file_path }}.

{% elif sol.repository %}
{% endif %} {% endif %} {% endif %} {% if sol.explanation and not compact_solution_notes and not (sol.resolution_category == 'dbt_project_change' and sol.diff_lines) %}

Notes

{{ sol.explanation }}

{% endif %} {% if sol.resolution_category == 'bigquery_infrastructure' %} {% if sol.current_setting and sol.recommended_setting %} {% with current_setting=sol.current_setting, recommended_setting=sol.recommended_setting, affected_resource=sol.affected_resource %} {% include "components/setting_comparison.html" %} {% endwith %} {% endif %} {% endif %} {% if sol.risk_justification or sol.validation_report %}
Risk & Validation Details
{% if sol.risk_justification %}

{{ sol.risk_justification }}

{% endif %} {% if sol.validation_report %} {% set report_tier = sol.validation_report.tier or sol.validation_report.overall_tier %} {% if report_tier %}

Tier: {{ report_tier | replace('_', ' ') | title }}

{% endif %} {% if sol.validation_report.error %}

{{ sol.validation_report.error }}

{% endif %} {% if sol.validation_report.steps %}
{% for step in sol.validation_report.steps %}
{% if step.result in ('pass', 'success', 'matched') or step.status == 'matched' %} {% elif step.result in ('fail', 'failure') %} {% else %} {% endif %} {{ step.name | default(step.type, true) | replace('_', ' ') | title }} {{ step.result | default(step.status, true) }}
{% if step.details and step.details is string %}

{{ step.details }}

{% endif %} {% if step.classification %}

Classification: {{ step.classification }}

{% endif %}
{% endfor %}
{% endif %} {% if sol.validation_report.dbt_compile %}

dbt Compile

{% set compile_meta = namespace(parts=[]) %} {% if sol.validation_report.dbt_compile.success %} {% set compile_meta.parts = compile_meta.parts + ['Success'] %} {% else %} {% set compile_meta.parts = compile_meta.parts + ['Not successful'] %} {% endif %} {% if sol.validation_report.dbt_compile.reason %} {% set compile_meta.parts = compile_meta.parts + [sol.validation_report.dbt_compile.reason | replace('_', ' ')] %} {% endif %} {% if sol.validation_report.dbt_compile.exit_code is not none %} {% set compile_meta.parts = compile_meta.parts + ['Exit ' ~ sol.validation_report.dbt_compile.exit_code] %} {% endif %} {% if sol.validation_report.dbt_compile.duration_ms is not none %} {% set compile_meta.parts = compile_meta.parts + [sol.validation_report.dbt_compile.duration_ms ~ 'ms'] %} {% endif %}

{{ compile_meta.parts | join(' · ') }}

{% if sol.validation_report.dbt_compile.stderr %}
{{ sol.validation_report.dbt_compile.stderr }}
{% endif %}
{% endif %} {% if sol.validation_report.dbt_parse %}

dbt Parse

{% if sol.validation_report.dbt_parse.success %}Success{% else %}Not successful{% endif %} {% if sol.validation_report.dbt_parse.exit_code is not none %} · Exit {{ sol.validation_report.dbt_parse.exit_code }}{% endif %} {% if sol.validation_report.dbt_parse.duration_ms is not none %} · {{ sol.validation_report.dbt_parse.duration_ms }}ms{% endif %} {% if sol.validation_report.dbt_parse.manifest_available %} · Manifest available{% endif %} {% if sol.validation_report.dbt_parse.optimized_sql_source == 'manifest_diff' %} · Optimized SQL via synced manifest diff{% endif %}

{% if sol.validation_report.dbt_parse.stderr %}
{{ sol.validation_report.dbt_parse.stderr }}
{% endif %}
{% endif %} {% if sol.validation_report.warnings %}
{% for warning in sol.validation_report.warnings %}

⚠ {{ warning }}

{% endfor %}
{% endif %} {% if sol.validation_report.timestamp %}

Validated: {{ sol.validation_report.timestamp }}

{% endif %} {% endif %}
{% endif %}