{# T51.8 / VALIDATION (new) -- replaces the legacy 02b validation_results table when the upstream CLI shipped per_endpoint_report_view + scan_validation_summary projections. Falls back to silent nothing-rendered when the projections aren't present (legacy scans / pre-T51.8 CLI); the legacy ``validation_results.html`` partial still renders above this one for those cases. Style: inline rules using the existing CSS custom properties (--ink / --line / --accent / --ok). The mock in the spec doc has its own typography (IBM Plex / terracotta paper); this section pulls from the same report's house style instead, mirroring how ``validation_results.html`` was built. #} {% set vr = report.validation_result %} {% if vr and vr.per_endpoint_report_view %} {% set views = vr.per_endpoint_report_view %} {% set summary = vr.scan_validation_summary or {} %}
02c / VALIDATION

What the validator actually proved.

Per-endpoint library × proxy matrix, header reduction, cookie scenario, and rate-limit probe. Each card is one Bucket A endpoint; the spot-check disclaimer at the bottom calls out the limits of measuring a ~100-request sample.

{# Stat strip #}
Endpoints validated
{{ summary.get('endpoints_passed', 0) }} / {{ summary.get('endpoints_total', 0) }} passed
Best library × proxy
{% if summary.get('best_library_combo') %} {{ summary.best_library_combo.library }} {% if summary.best_library_combo.proxy_tier %} · {{ summary.best_library_combo.proxy_tier }} {% else %} · direct {% endif %} {% else %} {% endif %}
Worst rate delay
{% if summary.get('worst_safe_delay_s') is not none %} {{ '%.2f'|format(summary.worst_safe_delay_s) }} s {% else %} {% endif %}
Cost / 1 k req
{% if summary.get('cost_per_1k_avg_usd') is not none %} ${{ '%.3f'|format(summary.cost_per_1k_avg_usd) }} {% else %} {% endif %}
{% if summary.get('validated_at') %}Validated {{ summary.validated_at }}{% endif %} {% if summary.get('request_count_total') %} · {{ summary.request_count_total }} reqs{% endif %} {% if summary.get('duration_total_ms') %} · {{ (summary.duration_total_ms / 1000)|round(1) }} s wall-clock{% endif %} {% if summary.get('bytes_total_mb') %} · {{ '%.2f'|format(summary.bytes_total_mb) }} MB total{% endif %} · spot-check, not production-scale
{# Per-endpoint cards #} {% for view in views %}
{{ view.method }} {{ view.url_template or view.url }}
{{ view.endpoint_id }} · Bucket {{ view.bucket or 'A' }} · {% if view.best.library %} winner: {{ view.best.library }} {% if view.best.proxy_tier %}+ {{ view.best.proxy_tier }}{% else %}+ direct{% endif %} {% if view.best.elapsed_ms is not none %} · {{ view.best.elapsed_ms }} ms{% endif %} {% else %} all libraries blocked {% endif %}
{# Matrix #} {% for row in view.library_matrix %} {% endfor %}
datacenter residential winner latency
{{ row.library }} {% if row.datacenter.status == 'pass' %} ✔ {{ row.datacenter.code }} {% elif row.datacenter.status == 'block' %} ✗ {{ row.datacenter.code }} {% if row.datacenter.block_type %}/ {{ row.datacenter.block_type }}{% endif %} {% elif row.datacenter.status == 'skipped_phase_b' %} skipped (B) {% else %} skipped {% endif %} {% if row.residential.status == 'sampled' %} {{ row.residential.passed }} / {{ row.residential.sample_count }} ({{ row.residential.quality }}) {% elif row.residential.status == 'skipped_phase_b' %} skipped (B) {% else %} skipped {% endif %} {% if row.is_winner %}★{% endif %} {% if row.datacenter.elapsed_ms is not none %}{{ row.datacenter.elapsed_ms }} ms{% else %}—{% endif %}
{# Header strip #}
Required
{% if view.headers.required %} {{ view.headers.required | join(' · ') }} {% else %} {% endif %}
Dropped · tested
{% if view.headers.dropped_tested %} {{ view.headers.dropped_tested | join(' · ') }} {% else %} {% endif %}
Skipped · tier
{% if view.headers.skipped_by_tier %} {% set sk = view.headers.skipped_by_tier %} {{ sk[:5] | join(' · ') }} {% if sk | length > 5 %} · {{ sk | length - 5 }} more{% endif %} {% else %} {% endif %}
Cookies
{{ view.cookies.minimum_scenario }} {% if view.cookies.caveat %} point-in-time {% endif %}
{# Rate-limit rounds #} {% if view.rate_limit.rounds %}
Rate-limit probe {% if view.rate_limit.library_used %} · {{ view.rate_limit.library_used }}{% endif %} {% if view.rate_limit.proxy_used %} + {{ view.rate_limit.proxy_used }}{% endif %} {% if view.rate_limit.rotation_mode %} · {{ view.rate_limit.rotation_mode }} IP{% endif %}
{% for round in view.rate_limit.rounds %}
{{ round.delay_s }}s / round {% for i in range(round.fired) %} {% if i < round.passes %} {% else %} {% endif %} {% endfor %} {{ round.label }}
{% endfor %} {% if view.rate_limit.safe_delay_s is not none %}
→ Safe production delay: {{ '%.2f'|format(view.rate_limit.safe_delay_s) }} s last_safe × 1.5
{% endif %} {% if view.rate_limit.caveat %}
{{ view.rate_limit.caveat }}
{% endif %}
{% endif %} {# Bandwidth + evidence #}
Bandwidth: {{ view.bandwidth.display }} {% if view.bandwidth.per_1k_requests_mb is not none %} · {{ '%.1f'|format(view.bandwidth.per_1k_requests_mb) }} MB / 1k req {% endif %}
{{ view.bandwidth.request_count }} reqs
{% if view.warnings %}
{% for w in view.warnings %}
! {{ w }}
{% endfor %}
{% endif %}
Raw attempts · {{ view.bandwidth.request_count or 0 }} entries
{{ view | tojson(indent=2) }}
{% endfor %}

Bytes are approximations (headers counted as name+value+4; TLS handshake and HTTP/2 framing not included). Cost figures are a cost-band signal, not a billing-grade meter.

{% endif %}