{% for r in s["runs"] %}
{% set run_cls = "pass" if r.get("passed") else "fail" %}
{% set failed_str = "false" if r.get("passed") else "true" %}
Run {{ r.get('run','?') }} — {% if r.get('passed') %}PASS{% else %}FAIL{% endif %} | goals: {{ r.get('goals','?') }} | expectations: {{ r.get('expectations','?') }} | turns: {{ r.get('turns','?') }}{% if r.get('duration_s') %} | {{ _fmt_duration(r['duration_s']) }}{% endif %}
{% if r.get('session_id') and ces_base %}
{% endif %}
{% if r.get('session_parameters') %}
⚙ Session Parameters
{{ json.dumps(r['session_parameters'], indent=2) | escape }}
{% endif %}
{% if "error" in r %}
Error: {{ r["error"] | escape }}
{% else %}
{% for step in r.get('step_details', []) %}
{% set s_cls = "pass" if step["status"] == "Completed" else "fail" %}
Goal: {{ step["goal"] | escape }}
Criteria: {{ step["success_criteria"] | escape }}
Status: {{ step["status"] | escape }}
{% if step.get('justification') %}
Justification: {{ step["justification"] | escape }}
{% endif %}
{% endfor %}
{% for exp in r.get('expectation_details', []) %}
{% set e_cls = "met" if exp["status"] == "Met" else "not-met" %}
{{ exp["status"] | escape }} {{ exp["expectation"] | escape }}
{% if exp.get('justification') %}
Justification: {{ exp["justification"] | escape }}
{% endif %}
{% endfor %}
{% if r.get('_processed_trace') %}
Conversation Trace ({{ r.get('turns','?') }} turns)
{% for item in r['_processed_trace'] %}
{% set kind = item[0] %}
{% if kind == "user" %}
User: {{ item[1] | escape }}
{% elif kind == "agent" %}
Agent: {{ item[1] | escape }}
{% elif kind in ("tool_call", "tool_pair") %}
{% set lbl, _, args = item[1].partition(" with args ") %}
{% set lbl = lbl.replace("Tool Call: ", "").replace("Tool Call (Output): ", "").split("/")[-1] %}
🔧 {{ lbl | escape }}
{% if args %}
Input:
{{ args | escape }}
{% endif %}
{% if kind == "tool_pair" %}
{% set _, _, result = item[2].partition(" with result ") %}
{% if result %}
Output:
{{ result | escape }}
{% endif %}
{% endif %}
{% elif kind == "tool_resp" %}
{% set lbl, _, result = item[1].partition(" with result ") %}
{% set lbl = lbl.replace("Tool Response: ", "").split("/")[-1] %}
📤 {{ lbl | escape }}
{% if result %}
{{ result | escape }}
{% endif %}
{% else %}
{{ item[1] | escape }}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}