{% comment %} One judged conversation on the scenario result page: a repetition, or the whole result of a single-rep run. Context: rep (see infra.ui._rep_view). {% endcomment %}
{% if rep.agentic %}

Agentic Safety

{{ rep.agentic.status }}
{% for check in rep.agentic.checks %}
{{ check.status }}{{ check.id }} — {{ check.summary }} {% if check.expected or check.observed %}
Expected: {{ check.expected|default:'—' }} · Observed: {{ check.observed|default:'—' }}
{% endif %} {% if check.evidence_span_ids %}
Evidence spans: {{ check.evidence_span_ids|join:', ' }}
{% endif %}
{% endfor %}
{% endif %} {% if rep.summary %}

Judge verdict

{% include "partials/severity_badge.html" with sev=rep.severity %}

{{ rep.summary }}

{% endif %} {% if rep.has_grade %} {# Judge-specific output: score / dimension scores, yes-no, checklist items, feedback. #}

Judge grade

{% if rep.grade.score %}{{ rep.grade.score }}/10{% endif %} {% if rep.grade.abstained is not None %}{% if rep.grade.abstained %}abstained{% else %}answered{% endif %}{% endif %} {% if not rep.summary %}{% include "partials/severity_badge.html" with sev=rep.severity %}{% endif %}
{% if rep.grade.fields %}
{% for label, value in rep.grade.fields %}
{{ label }}
{{ value }}
{% endfor %}
{% endif %} {% for label, value in rep.grade.notes %}

{{ label }}

{{ value }}

{% endfor %} {% for label, value in rep.grade.json_notes %}
{{ label }}
{{ value }}
{% endfor %}
{% endif %} {% if rep.issues or rep.positives or rep.recommendations %}

Issues found ({{ rep.issues|length }})

{% if rep.issues %}
    {% for x in rep.issues %}
  • •{{ x }}
  • {% endfor %}
{% else %}

None.

{% endif %}

Positive behaviours ({{ rep.positives|length }})

{% if rep.positives %}
    {% for x in rep.positives %}
  • ✓{{ x }}
  • {% endfor %}
{% else %}

None recorded.

{% endif %}

Recommendations ({{ rep.recommendations|length }})

{% if rep.recommendations %}
    {% for x in rep.recommendations %}
  • →{{ x }}
  • {% endfor %}
{% else %}

None.

{% endif %}
{% endif %} {% if rep.conversation %}

Conversation ({{ rep.turns }} turn{{ rep.turns|pluralize }})

{% for m in rep.conversation %}

{{ m.speaker }}{% if m.turn %} · turn {{ m.turn }}{% endif %}

{{ m.content }}

{% endfor %}
{% endif %} {% if rep.rationale %}

Judge rationale

{{ rep.rationale }}

{% endif %} {% if rep.trace %}

Target trace

spans the target exported under this rep's {{ rep.trace.trace_ids|length }} trace{{ rep.trace.trace_ids|length|pluralize }}
{% if rep.trace.trace_ids %}
{% for tid in rep.trace.trace_ids %} {{ tid|slice:":12" }}… {% endfor %}
{% endif %} {% if rep.trace.spans %} {% if rep.trace.hidden_spans %}

+ {{ rep.trace.hidden_spans }} more span{{ rep.trace.hidden_spans|pluralize }} (shorter / beyond preview).

{% endif %} {% else %}

The target exported no spans under this rep's trace{{ rep.trace.trace_ids|length|default:0|pluralize }} (tracing was on; the target's OTel may not be wired for this deployment).

{% endif %}
{% endif %} {% if rep.tokens or rep.other %}
{% if rep.tokens %}

Token usage ({{ rep.total_tokens }} total)

{% for t in rep.tokens %}

{{ t.role }}

{{ t.input|default:"0" }} in · {{ t.output|default:"0" }} out

{% endfor %}
{% endif %} {% if rep.other %}
{% for key, value in rep.other.items %}
{{ key }}{{ value }}
{% endfor %}
{% endif %}
{% endif %} {% if rep.images %}

Attached image{{ rep.images|length|pluralize }}

{% for uri in rep.images %}
attached image
{{ uri }}
{% endfor %}
{% endif %}